This commit is contained in:
曹辉 2023-03-03 14:13:06 +08:00
parent 191f81a3a6
commit 87c7f1b694
4 changed files with 40 additions and 19 deletions

View File

@ -615,13 +615,6 @@
this.couponListtrue = []
this.couponListfalse = []
this.goodsDetailslist = res.data
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
this.updata.goodsName = this.goodsDetailslist.goodsName
this.updata.nurseStationId = this.goodsDetailslist.nurseStationId
this.updata.goodsUnit = res.data.goodsUnit
@ -630,11 +623,19 @@
this.updata.img = this.goodDetailsLists[0].attributePitureUrl
this.updata.goodsAttributeName = this.goodDetailsLists[0].attributeDetailsName
this.updata.goodsPrice = this.goodDetailsLists[0].goodsPrice
this.totalPrice = this.goodDetailsLists[0].goodsPrice
this.updata.goodsPrice = this.updata.goodsPrice.toFixed(2)
this.updata.attributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
this.updata.goodsStock = this.goodDetailsLists[0].goodsStock
this.updata.goodsAttributeId = this.goodDetailsLists[0].goodsAttributeId
this.updata.goodsAttributeDetailsId = this.goodDetailsLists[0].attributeDetailsId
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
} else {
var list = {}
this.goodsDetailslist.goodAttributeDetailsLists.forEach(e => {
@ -649,6 +650,13 @@
this.updata.goodsAttributeName = list.attributeDetailsName
this.updata.goodsPrice = list.goodsPrice
this.totalPrice = list.goodsPrice
this.goodsDetailslist.couponList.forEach(e => {
if (this.totalPrice >= e.couponConsumePrice) {
this.couponListtrue.push(e)
} else {
this.couponListfalse.push(e)
}
})
this.updata.attributeDetailsId = list.attributeDetailsId
this.updata.goodsStock = list.goodsStock
this.updata.img = list.attributePitureUrl

View File

@ -155,7 +155,7 @@
}
.nickname {
position: absolute;
top: 265rpx;
top: 275rpx;
left: 35%;
font-size: 30rpx;
}

View File

@ -52,7 +52,7 @@
{{item.useStatus=='EXPIRED'?'已过期':''}}
{{item.useStatus=='USED'?'已使用':''}}
</view>
<view class="btn" v-else>
<view class="btn" v-else @tap='goshoping'>
{{item.useStatus=='NOT_USED'?'使用':''}}
</view>
</view>
@ -112,6 +112,11 @@
}
this.getlist();
},
goshoping() {
uni.switchTab({
url: '/pages/shopping/shopping'
})
},
},
onReachBottom() { //
if (this.couponlist.length >= this.total) {} else {
@ -183,14 +188,17 @@
}
.btngq {
width: 109rpx;
height: 180rpx;
background: #DFDEDE;
width: 110rpx;
height: 50rpx;
border: 2rpx solid #DFDEDE;
border-radius: 24rpx;
font-size: 24rpx;
position: absolute;
top: 0;
right: 0;
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 180rpx;
line-height: 50rpx;
background: #DFDEDE;
}
.btn {
@ -203,14 +211,14 @@
top: 70rpx;
right: 20rpx;
text-align: center;
line-height: 49rpx;
line-height: 50rpx;
}
.time {
font-size: 24rpx;
position: absolute;
top: 120rpx;
left: 200rpx;
left: 240rpx;
}
.texts {
@ -218,7 +226,7 @@
font-weight: 800;
position: absolute;
top: 44rpx;
left: 200rpx;
left: 240rpx;
}
.title {

View File

@ -62,7 +62,7 @@
{{item.useStatus=='EXPIRED'?'已过期':''}}
{{item.useStatus=='USED'?'已使用':''}}
</view>
<view class="btn" v-if="item.useStatus=='NOT_USED'">
<view class="btn" v-if="item.useStatus=='NOT_USED'" @tap='goshoping'>
{{item.useStatus=='NOT_USED'?'使用':''}}
</view>
</view>
@ -172,6 +172,11 @@
url: '/pages/information/information'
})
},
goshoping() {
uni.switchTab({
url: '/pages/shopping/shopping'
})
},
},
onReachBottom() { //
if (this.couponlist.length >= this.total) {} else {