优化会员,商品,下单

This commit is contained in:
wwz
2025-03-15 12:03:34 +08:00
parent e6ca187e5a
commit fc957feb72
19 changed files with 484 additions and 978 deletions

View File

@@ -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>