|
@@ -90,7 +90,7 @@
|
|
|
<view>
|
|
<view>
|
|
|
<button class="cu-btn round text-white bg-base"
|
|
<button class="cu-btn round text-white bg-base"
|
|
|
style="width: 180upx;height: 80upx;margin-right: 10upx;" @click="confirmTips">兑换</button>
|
|
style="width: 180upx;height: 80upx;margin-right: 10upx;" @click="confirmTips">兑换</button>
|
|
|
- <button @click="exchangeShow=false" class="cu-btn round line-gray"
|
|
|
|
|
|
|
+ <button @click="cancel" class="cu-btn round line-gray"
|
|
|
style="width: 180upx;height: 80upx;z-index: 99;">取消</button>
|
|
style="width: 180upx;height: 80upx;z-index: 99;">取消</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -179,6 +179,9 @@
|
|
|
this.confirmStyle.color = this.vuex_theme.bgColor;
|
|
this.confirmStyle.color = this.vuex_theme.bgColor;
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
+ if(this.vuex_isInterval){
|
|
|
|
|
+ this.queryOrder();
|
|
|
|
|
+ }
|
|
|
uni.$on('ADDRESS',(res)=>{
|
|
uni.$on('ADDRESS',(res)=>{
|
|
|
this.address=res
|
|
this.address=res
|
|
|
})
|
|
})
|
|
@@ -298,7 +301,8 @@
|
|
|
// uni.navigateTo({
|
|
// uni.navigateTo({
|
|
|
// url: `/pages/webview/payOrder?url=${res.data.data.qrCodeUrl}&orderId=${res.data.data.id}`
|
|
// url: `/pages/webview/payOrder?url=${res.data.data.qrCodeUrl}&orderId=${res.data.data.id}`
|
|
|
// })
|
|
// })
|
|
|
- this.queryOrder(res.data.data.id)
|
|
|
|
|
|
|
+ this.$u.vuex('vuex_orderId', res.data.data.id);
|
|
|
|
|
+ this.$u.vuex('vuex_isInterval', true);
|
|
|
window.location.href = res.data.data.qrCodeUrl
|
|
window.location.href = res.data.data.qrCodeUrl
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -308,18 +312,24 @@
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
//查询订单状态
|
|
//查询订单状态
|
|
|
- queryOrder(orderId){
|
|
|
|
|
|
|
+ queryOrder(){
|
|
|
let params = {
|
|
let params = {
|
|
|
- id: orderId
|
|
|
|
|
|
|
+ id: this.vuex_orderId
|
|
|
}
|
|
}
|
|
|
- this.interval = setInterval(() => {
|
|
|
|
|
- let res = this.$api.order.orderDetail(params)
|
|
|
|
|
|
|
+ this.interval = setInterval(async() => {
|
|
|
|
|
+ let res = await this.$api.order.orderDetail(params)
|
|
|
if(res.data.success && res.data.data.payStatus === '付款成功'){
|
|
if(res.data.success && res.data.data.payStatus === '付款成功'){
|
|
|
- that.$refs.exchangeSuccess.showSuccess(that.detail.imgUrl);
|
|
|
|
|
|
|
+ this.$refs.exchangeSuccess.showSuccess(this.detail.imgUrl);
|
|
|
|
|
+ this.$u.vuex('vuex_isInterval', false);
|
|
|
|
|
+ this.$u.vuex('vuex_orderId', 0);
|
|
|
clearInterval(this.interval)
|
|
clearInterval(this.interval)
|
|
|
}
|
|
}
|
|
|
}, 1500)
|
|
}, 1500)
|
|
|
},
|
|
},
|
|
|
|
|
+ cancel(){
|
|
|
|
|
+ this.exchangeShow = false;
|
|
|
|
|
+ this.resetData();
|
|
|
|
|
+ },
|
|
|
pufaPointChange(e) {
|
|
pufaPointChange(e) {
|
|
|
this.exChangeData.point = e.value
|
|
this.exChangeData.point = e.value
|
|
|
},
|
|
},
|