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) {
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() {
this.buyshow = true

View File

@ -29,7 +29,7 @@
</view>
<view class="user" v-else>
<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>

View File

@ -471,7 +471,6 @@
})
}
},
//
upaddress() {
if (this.updata.receiver) {
@ -534,16 +533,49 @@
},
//
signIninfo() {
signIn(this.patientId).then(res => {
if (res.code == 200) {
this.selectPatientSignInifo();
this.$refs.uToast.show({
title: '今日签到成功',
type: 'success',
duration: '1000',
})
}
})
var that = this
const value = uni.getStorageSync('patientId');
const value2 = uni.getStorageSync('openid');
if (value && value2) {
AppIdentification(value).then(res => {
if (res.code == 200) {
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() {