|
@@ -9,6 +9,9 @@
|
|
|
<view class="product-price">
|
|
<view class="product-price">
|
|
|
<text class="price-value">{{ commodityData.price?commodityData.price+' 积分':'' }}</text>
|
|
<text class="price-value">{{ commodityData.price?commodityData.price+' 积分':'' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
+ <view class="product-slotNo">
|
|
|
|
|
+ <text class="price-value">货道 {{ commodityData.slotNo }}</text>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex-null-2"></view>
|
|
<view class="flex-null-2"></view>
|
|
|
<view class="clickButton" @click="clickButton()">立即兑换</view>
|
|
<view class="clickButton" @click="clickButton()">立即兑换</view>
|
|
@@ -18,6 +21,7 @@
|
|
|
<img class="remind-img" v-if="state==1" src="@/static/icon_kcxq_cg.png">
|
|
<img class="remind-img" v-if="state==1" src="@/static/icon_kcxq_cg.png">
|
|
|
<img class="remind-img" v-if="state!=1" src="@/static/icon_kcxq_sb.png">
|
|
<img class="remind-img" v-if="state!=1" src="@/static/icon_kcxq_sb.png">
|
|
|
<view class="commodity-message">{{state==1?'兑换成功':'兑换失败'}}</view>
|
|
<view class="commodity-message">{{state==1?'兑换成功':'兑换失败'}}</view>
|
|
|
|
|
+ <view class="commodity-message">正在出货 请稍作等待</view>
|
|
|
<view class="flex-null-2"></view>
|
|
<view class="flex-null-2"></view>
|
|
|
<view class="clickButton" @click="bottomButton()">{{state==1?'返回':'重试'}}</view>
|
|
<view class="clickButton" @click="bottomButton()">{{state==1?'返回':'重试'}}</view>
|
|
|
<view class="flex-null-1"></view>
|
|
<view class="flex-null-1"></view>
|
|
@@ -85,8 +89,11 @@
|
|
|
methods: {
|
|
methods: {
|
|
|
async getCommodityInfo() {
|
|
async getCommodityInfo() {
|
|
|
let obj = {
|
|
let obj = {
|
|
|
|
|
+ mid:this.mid,
|
|
|
|
|
+ sid:this.sid,
|
|
|
|
|
+ pid:this.pid,
|
|
|
|
|
+ pri:this.pri,
|
|
|
token: uni.getStorageSync('token'),
|
|
token: uni.getStorageSync('token'),
|
|
|
- phone: uni.getStorageSync('phone'),
|
|
|
|
|
}
|
|
}
|
|
|
const {
|
|
const {
|
|
|
data
|
|
data
|
|
@@ -94,6 +101,10 @@
|
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
|
this.$set(this, 'commodityData', data.data);
|
|
this.$set(this, 'commodityData', data.data);
|
|
|
this.$set(this, 'pageType', 1);
|
|
this.$set(this, 'pageType', 1);
|
|
|
|
|
+ }else{
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.navigateBack();
|
|
|
|
|
+ }, 2000);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
clickButton() {
|
|
clickButton() {
|
|
@@ -125,18 +136,18 @@
|
|
|
},
|
|
},
|
|
|
async exchangeGoods() {
|
|
async exchangeGoods() {
|
|
|
let obj = {
|
|
let obj = {
|
|
|
|
|
+ mid:this.mid,
|
|
|
|
|
+ sid:this.sid,
|
|
|
|
|
+ pid:this.pid,
|
|
|
|
|
+ pri:this.pri,
|
|
|
token: uni.getStorageSync('token'),
|
|
token: uni.getStorageSync('token'),
|
|
|
- phone: uni.getStorageSync('phone'),
|
|
|
|
|
- mid: this.mid,
|
|
|
|
|
- sid: this.sid,
|
|
|
|
|
- pid: this.pid,
|
|
|
|
|
- pri: this.pri,
|
|
|
|
|
|
|
+ uid:uni.getStorageSync('userId')
|
|
|
}
|
|
}
|
|
|
const {
|
|
const {
|
|
|
data
|
|
data
|
|
|
} = await exchangeGoods(obj)
|
|
} = await exchangeGoods(obj)
|
|
|
if (data.code == 200) {
|
|
if (data.code == 200) {
|
|
|
- this.$set(this, 'state', data.data.state);
|
|
|
|
|
|
|
+ this.$set(this, 'state', 1);
|
|
|
this.$set(this, 'pageType', 2);
|
|
this.$set(this, 'pageType', 2);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -197,6 +208,15 @@
|
|
|
margin-bottom: 30rpx;
|
|
margin-bottom: 30rpx;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ .product-slotNo {
|
|
|
|
|
+ margin-top:40rpx;
|
|
|
|
|
+ font-size: 48rpx;
|
|
|
|
|
+ font-weight: 700;
|
|
|
|
|
+ color: #0183FA;
|
|
|
|
|
+ text-shadow: 0 2rpx 4rpx rgba(231, 76, 60, 0.2);
|
|
|
|
|
+ animation: pulse 2s infinite alternate;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
.product-price {
|
|
.product-price {
|
|
|
font-size: 56rpx;
|
|
font-size: 56rpx;
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|