uniapp 购买记录状态

pull/3/head
Jruome 2023-05-29 21:16:34 +08:00
parent f98f1d5083
commit 9531301224
1 changed files with 23 additions and 20 deletions

View File

@ -113,7 +113,6 @@ import store from '@/store/index';
const res = await memberGradeInfo() const res = await memberGradeInfo()
this.memberData = res.data this.memberData = res.data
this.form.userPhone = store.state.app.userInfo.mobile this.form.userPhone = store.state.app.userInfo.mobile
this.form.userName = store.state.app.userInfo.nickName
} finally{ } finally{
uni.hideLoading(); uni.hideLoading();
} }
@ -132,24 +131,28 @@ import store from '@/store/index';
* *
*/ */
goPay() { goPay() {
if(this.activeIndex.length){ this.$refs.uForm.validate().then(res => {
this.$set(this, 'pay_close', true); if (this.activeIndex.length) {
const orderInfos = this.activeIndex.map((item) => { this.$set(this, 'pay_close', true);
return { const orderInfos = this.activeIndex.map((item) => {
...this.memberData[item], return {
gearId:this.memberData[item].id ...this.memberData[item],
} gearId: this.memberData[item].id,
}) }
this.payInfo = { })
userPhone: store.state.app.userInfo.mobile, this.payInfo = {
userName: this.form.userName, userPhone: store.state.app.userInfo.mobile,
orderInfos userName: this.form.userName,
} orderInfos
}else{ }
this.$util.Tips({ }else{
title: '请选择档次套餐' this.$util.Tips({
}) title: '请选择档次套餐'
} })
}
}).catch(errors => {
// uni.$u.toast('')
})
}, },
/** /**
* 事件回调 * 事件回调