This commit is contained in:
曹辉 2023-03-03 16:46:14 +08:00
parent 3ac085f866
commit 696329e063
3 changed files with 69 additions and 13 deletions

View File

@ -354,7 +354,31 @@
// //
numberchange(e) { numberchange(e) {
this.totalPrice = (this.updata.goodsPrice * this.updata.goodsCount).toFixed(2) this.totalPrice = (this.updata.goodsPrice * this.updata.goodsCount).toFixed(2)
this.Paidinprice = (Number(this.totalPrice) - Number(this.coupon.couponPrice)).toFixed(2) this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
if (this.couponId) {
this.goodsDetailslist.couponList.forEach(e => {
if (this.couponId == e.couponId) {
if (this.totalPrice >= e.couponConsumePrice) {
this.Paidinprice = (Number(this.totalPrice) - Number(this.coupon.couponPrice))
.toFixed(2)
} else {
this.couponId = null
this.Paidinprice = null
this.coupon = null
}
}
})
} else {
this.Paidinprice = null
}
}, },
buyshowtrue() { buyshowtrue() {
this.buyshow = true this.buyshow = true

View File

@ -29,7 +29,7 @@
</view> </view>
<view class="user" v-else> <view class="user" v-else>
<image class="img" src="../../static/user.png" mode=""></image> <image class="img" src="../../static/user.png" mode=""></image>
<image class="bjimg" src="../../static/userbeijing.png" mode=""></image> <image class="bjimg" :src="bjimg" mode=""></image>
<view class="login" @tap='gologin'> <view class="login" @tap='gologin'>
登录 登录
</view> </view>

View File

@ -471,7 +471,6 @@
}) })
} }
}, },
// //
upaddress() { upaddress() {
if (this.updata.receiver) { if (this.updata.receiver) {
@ -534,16 +533,49 @@
}, },
// //
signIninfo() { signIninfo() {
signIn(this.patientId).then(res => { var that = this
if (res.code == 200) { const value = uni.getStorageSync('patientId');
this.selectPatientSignInifo(); const value2 = uni.getStorageSync('openid');
this.$refs.uToast.show({ if (value && value2) {
title: '今日签到成功', AppIdentification(value).then(res => {
type: 'success', if (res.code == 200) {
duration: '1000', if (res.data.loginFlag) {
}) signIn(value).then(res => {
} if (res.code == 200) {
}) that.selectPatientSignInifo();
that.$refs.uToast.show({
title: '今日签到成功',
type: 'success',
duration: '1000',
})
} else {
that.$refs.uToast.show({
title: '签到失败',
type: 'error',
duration: '1000',
})
}
})
} else {
that.usershow = true
}
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
})
} else {
that.$refs.uToast.show({
title: '请先登录',
type: 'error',
duration: '2000',
url: '/pages/login/login'
})
}
}, },
// //
goodsList() { goodsList() {