|
@@ -15,8 +15,8 @@
|
|
|
<view class="amount-money">¥{{ amuntMoney | NumFormat }}</view>
|
|
|
</view>
|
|
|
<view class="container-button">
|
|
|
- <view class="btn btn-home" v-if="payStatus" @click="this.$api.switchTabTo('/pages/tabBar/home/index')">回到首页</view>
|
|
|
- <view class="btn btn-home" v-else @click="toAgainPay">重新支付</view>
|
|
|
+ <view class="btn btn-home" v-if="payBtnStatus" @click="toAgainPay">继续下一笔支付</view>
|
|
|
+ <view class="btn btn-home" v-else @click="this.$api.switchTabTo('/pages/tabBar/home/index')">回到首页</view>
|
|
|
<view class="btn btn-open" @click="details">查看订单</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -37,11 +37,13 @@
|
|
|
textLeft:this.$store.state.isIphone
|
|
|
},
|
|
|
payType:'',
|
|
|
- payStatus:false,
|
|
|
+ payStatus:true,
|
|
|
+ payBtnStatus:false,
|
|
|
amuntMoney:0,
|
|
|
- successText:'本次支付失败',
|
|
|
+ successText:'订单支付失败',
|
|
|
isIphoneX:this.$store.state.isIphoneX,
|
|
|
CustomBar:this.CustomBar,// 顶部导航栏高度
|
|
|
+ mapStateArr:[11,12,13,21,22,23,111]
|
|
|
|
|
|
}
|
|
|
},
|
|
@@ -59,22 +61,41 @@
|
|
|
this.initData(option)
|
|
|
},
|
|
|
methods:{
|
|
|
+ initOrderInfo() {
|
|
|
+ this.orderInfo = uni.getStorageSync('orderInfo')
|
|
|
+ uni.removeStorageSync('orderInfo')
|
|
|
+ },
|
|
|
initData(option){
|
|
|
- const data = JSON.parse(option.data);
|
|
|
+ const data = JSON.parse(option.data)
|
|
|
+ console.log('==========>',data)
|
|
|
this.orderId = data.data.orderId
|
|
|
this.payType = data.data.type
|
|
|
this.amuntMoney = data.data.payAmount
|
|
|
if(this.payType == 'success'){
|
|
|
this.payStatus = true
|
|
|
- this.successText = '本次支付成功'
|
|
|
+ this.successText = '订单支付成功'
|
|
|
}else{
|
|
|
this.payStatus = false
|
|
|
- this.successText = '本次支付失败'
|
|
|
+ this.successText = '订单支付失败'
|
|
|
}
|
|
|
- console.log(this.orderId)
|
|
|
+ console.log('主订单Id======>',this.orderId)
|
|
|
+ this.PayOrderCheckoutCounter(this.orderId)
|
|
|
+ },
|
|
|
+ PayOrderCheckoutCounter(orderId){//初始化支付信息
|
|
|
+ this.PayService.PayOrderCheckoutCounter({ orderId : orderId }).then(response =>{
|
|
|
+ this.isRepuest = true
|
|
|
+ const status = response.data.order.status //主订单状态
|
|
|
+ this.mapStateArr.forEach(value => {
|
|
|
+ if(status === value){
|
|
|
+ this.payBtnStatus = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(error =>{
|
|
|
+ this.$util.msg(error.msg,2000)
|
|
|
+ })
|
|
|
},
|
|
|
toAgainPay(){
|
|
|
- this.$api.navigateBack(2)
|
|
|
+ this.$api.navigateTo(`/pages/user/order/order-pay-list?orderId=${this.orderId}`)
|
|
|
},
|
|
|
details(){
|
|
|
this.$api.redirectTo('/pages/user/order/order-details?type=share&orderId='+this.orderId)
|