优化会员,商品,下单
This commit is contained in:
@@ -90,7 +90,8 @@
|
||||
} from 'vue';
|
||||
|
||||
import {
|
||||
APIshopUser
|
||||
APIshopUser,
|
||||
APIshopUserInfo
|
||||
} from '@/common/api/member.js'
|
||||
|
||||
import {
|
||||
@@ -112,6 +113,8 @@
|
||||
},
|
||||
});
|
||||
|
||||
// 定义要触发的事件
|
||||
|
||||
const formInfo = reactive({
|
||||
nickName: "",
|
||||
telephone: "",
|
||||
@@ -302,13 +305,7 @@
|
||||
|
||||
|
||||
const registerMember = async () => {
|
||||
// if ( userHeadImg.value == "" || userHeadImg.value == null ) {
|
||||
// uni.showToast({
|
||||
// title: '请选择会员头像',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (formInfo.nickName == "" || formInfo.nickName == null) {
|
||||
uni.showToast({
|
||||
title: '请输入会员昵称',
|
||||
@@ -316,13 +313,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
// if ( this.birthDay == "" || this.birthDay == null ) {
|
||||
// uni.showToast({
|
||||
// title: '请选择日期',
|
||||
// icon: 'none'
|
||||
// });
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (formInfo.telephone == "" || formInfo.telephone == null) {
|
||||
uni.showToast({
|
||||
title: '请获取手机号',
|
||||
@@ -337,7 +328,7 @@
|
||||
});
|
||||
return;
|
||||
}
|
||||
let res = await APIshopUser({
|
||||
await APIshopUser({
|
||||
// id: uni.cache.get('userInfo').id,
|
||||
// shopId: uni.cache.get('shopId'),
|
||||
nickName: formInfo.nickName,
|
||||
@@ -345,7 +336,6 @@
|
||||
phone: formInfo.telephone,
|
||||
birthDay: formInfo.birthDay
|
||||
})
|
||||
// 定义自定义事件
|
||||
let APIshopUserInfores = await APIshopUserInfo({
|
||||
shopId: uni.cache.get('shopId')
|
||||
})
|
||||
@@ -355,11 +345,11 @@
|
||||
title: '会员加入成功',
|
||||
icon: 'none'
|
||||
})
|
||||
// 定义自定义事件
|
||||
setTimeout(() => {
|
||||
if (props.detailtype == 'detail') {
|
||||
uni.navigateBack()
|
||||
}
|
||||
uni.navigateBack()
|
||||
}, 1500)
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user