|
@@ -70,19 +70,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
-
|
|
|
+
|
|
|
<u-popup :show="tipShow" mode="center">
|
|
|
- <view class="tip-show">
|
|
|
- <view class="flex tip-show-title">
|
|
|
- <u-icon name="checkmark-circle" color="#EB7009" size="24"></u-icon>
|
|
|
- <text>兑换成功,已放入奖品库</text>
|
|
|
- </view>
|
|
|
- <view class="flex tip-show-btn">
|
|
|
- <view class="close" @click="tipShow = false">关闭</view>
|
|
|
- <navigator class="prize" :url="`/pages/prize/index`" hover-class="navigator-hover" @click="tipShow = false">前往查看</navigator>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </u-popup>
|
|
|
+ <view class="tip-show">
|
|
|
+ <view class="flex tip-show-title">
|
|
|
+ <u-icon name="checkmark-circle" color="#EB7009" size="24"></u-icon>
|
|
|
+ <text>兑换成功,已放入奖品库</text>
|
|
|
+ </view>
|
|
|
+ <view class="flex tip-show-btn">
|
|
|
+ <view class="close" @click="tipShow = false">关闭</view>
|
|
|
+ <navigator class="prize" :url="`/pages/prize/index`" hover-class="navigator-hover"
|
|
|
+ @click="tipShow = false">前往查看</navigator>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </u-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -110,7 +111,7 @@
|
|
|
onLoad(opthios) {
|
|
|
this.goodsId = opthios.id
|
|
|
},
|
|
|
- onShow(){
|
|
|
+ onShow() {
|
|
|
this.getDetail()
|
|
|
},
|
|
|
methods: {
|
|
@@ -188,7 +189,7 @@
|
|
|
valChange(e, item) {
|
|
|
let value = e.value
|
|
|
this.$set(item, 'exchangePrice', value * item.exValue)
|
|
|
- if(this.payInfo.quantity < value){
|
|
|
+ if (this.payInfo.quantity < value) {
|
|
|
uni.$u.toast('库存不足');
|
|
|
}
|
|
|
},
|
|
@@ -217,12 +218,12 @@
|
|
|
skuId: this.payInfo.skuId,
|
|
|
orderNum: this.orderNum,
|
|
|
}
|
|
|
- if(flag) return
|
|
|
- if(this.payInfo.quantity == 0){
|
|
|
+ if (flag) return
|
|
|
+ if (this.payInfo.quantity == 0) {
|
|
|
uni.$u.toast('库存不足');
|
|
|
return
|
|
|
}
|
|
|
- if(this.payInfo.quantity < this.orderNum){
|
|
|
+ if (this.payInfo.quantity < this.orderNum) {
|
|
|
uni.$u.toast('库存不足');
|
|
|
return
|
|
|
}
|
|
@@ -230,14 +231,14 @@
|
|
|
title: '兑换中'
|
|
|
});
|
|
|
flag = true
|
|
|
- $http.post('/api/v1/mp/user/exchange/submit', data).then(res=>{
|
|
|
+ $http.post('/api/v1/mp/user/exchange/submit', data).then(res => {
|
|
|
uni.hideLoading();
|
|
|
flag = false
|
|
|
- if(res.code == 0){
|
|
|
+ if (res.code == 0) {
|
|
|
this.choiceShow = false
|
|
|
this.tipShow = true
|
|
|
this.getDetail()
|
|
|
- }else{
|
|
|
+ } else if (res.code == 1021) {
|
|
|
uni.$u.toast(res.msg);
|
|
|
}
|
|
|
}).catch(() => {
|
|
@@ -460,24 +461,25 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .tip-show{
|
|
|
+
|
|
|
+ .tip-show {
|
|
|
width: 80vw;
|
|
|
background-color: #FFFFFF;
|
|
|
border-radius: 10rpx;
|
|
|
padding: 60rpx 40rpx;
|
|
|
-
|
|
|
- &-title{
|
|
|
+
|
|
|
+ &-title {
|
|
|
margin-bottom: 64rpx;
|
|
|
- text{
|
|
|
+
|
|
|
+ text {
|
|
|
margin-left: 20rpx;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- &-btn{
|
|
|
+
|
|
|
+ &-btn {
|
|
|
justify-content: space-around;
|
|
|
-
|
|
|
- .close{
|
|
|
+
|
|
|
+ .close {
|
|
|
width: 160rpx;
|
|
|
height: 60rpx;
|
|
|
line-height: 60rpx;
|
|
@@ -487,8 +489,8 @@
|
|
|
text-align: center;
|
|
|
border: 1px solid rgba(235, 112, 9, 100);
|
|
|
}
|
|
|
-
|
|
|
- .prize{
|
|
|
+
|
|
|
+ .prize {
|
|
|
width: 160rpx;
|
|
|
height: 60rpx;
|
|
|
line-height: 60rpx;
|
|
@@ -517,6 +519,7 @@
|
|
|
|
|
|
.btn {
|
|
|
padding: 20rpx 0;
|
|
|
+
|
|
|
/deep/ button {
|
|
|
width: 640rpx;
|
|
|
height: 90rpx;
|