更改支付逻辑
This commit is contained in:
parent
9ac0246e02
commit
adbc75f4e0
46
pages.json
46
pages.json
|
|
@ -169,29 +169,29 @@
|
|||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/shop/index",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分商城",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/shop/detail",
|
||||
"style": {
|
||||
"navigationBarTitleText": "积分明细",
|
||||
"navigationStyle": "custom",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "pages/user/shop/shopinfo",
|
||||
"style": {
|
||||
"navigationBarTitleText": "商品详情",
|
||||
"navigationBarTextStyle": "black"
|
||||
}
|
||||
},
|
||||
// {
|
||||
// "path": "pages/user/shop/index",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "积分商城",
|
||||
// "navigationStyle": "custom",
|
||||
// "navigationBarTextStyle": "black"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "path": "pages/user/shop/detail",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "积分明细",
|
||||
// "navigationStyle": "custom",
|
||||
// "navigationBarTextStyle": "black"
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// "path": "pages/user/shop/shopinfo",
|
||||
// "style": {
|
||||
// "navigationBarTitleText": "商品详情",
|
||||
// "navigationBarTextStyle": "black"
|
||||
// }
|
||||
// },
|
||||
{
|
||||
"path": "pages/user/address/index",
|
||||
"style": {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
||||
<view class="listrigth">
|
||||
<view>{{item.biz_name}}</view>
|
||||
<view :class="[checkIn(item.biz_code)?'':'colorStyle']">{{checkIn(item.biz_code)?'-':'+'}}{{item.amount}}</view>
|
||||
<view :class="[checkIn(item.biz_code)?'colorStyle':'']">{{checkIn(item.biz_code)?'+':'-'}}{{item.amount}}</view>
|
||||
</view>
|
||||
<view class="listrigth2">
|
||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||
|
|
|
|||
|
|
@ -290,12 +290,13 @@
|
|||
|
||||
} else if (msg.type == 'createOrder') {
|
||||
console.log(msg, 'createOrder执行')
|
||||
this.listinfoid = msg.data.id //下单需要的id
|
||||
uni.cache.set('order_detailinfoid', msg.data.id);
|
||||
// this.listinfoid = msg.data.id //下单需要的id
|
||||
this.orderInfo = msg.data
|
||||
if (this.radiovalue1 == 1) {
|
||||
this.showpopupclickdds() //微信支付
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
handlemessage() {
|
||||
|
|
@ -314,7 +315,7 @@
|
|||
orderfoodindex() {
|
||||
uni.pro.navigateTo('index/coupons/index', {
|
||||
orderfood: 0,
|
||||
orderId: this.listinfoid,
|
||||
orderId: uni.cache.get('order_detailinfoid'),
|
||||
amount: this.listinfo.amounts
|
||||
})
|
||||
},
|
||||
|
|
@ -331,7 +332,7 @@
|
|||
},
|
||||
async paymodfiyOrderInfo() {
|
||||
let res = await this.api.paymodfiyOrderInfo({
|
||||
orderId: this.listinfoid
|
||||
orderId: uni.cache.get('order_detailinfoid')
|
||||
})
|
||||
},
|
||||
// 去结算
|
||||
|
|
@ -369,25 +370,26 @@
|
|||
shopId_id: uni.cache.get('shopUser')
|
||||
})
|
||||
} else {
|
||||
if(this.amountVIP.amount > this.listinfo.amount){
|
||||
if (this.amountVIP.amount > this.listinfo.amount) {
|
||||
this.ispws = true
|
||||
this.showpopupclick() //生成订单
|
||||
this.$nextTick(() => {
|
||||
this.$refs.payPwd.onPayUp();
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: "余额不足"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
// 微信支付
|
||||
async showpopupclickdds() {
|
||||
let res = await this.api.payorderPay({
|
||||
orderId: this.listinfoid
|
||||
orderId: uni.cache.get('order_detailinfoid')
|
||||
}) //判断是否支付成功
|
||||
if (res.code == 0) {
|
||||
// uni.showLoading({
|
||||
|
|
@ -418,8 +420,8 @@
|
|||
// .radiovalue1
|
||||
// });
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/order_detail?orderId=' + this
|
||||
.listinfoid
|
||||
url: '/pages/order/order_detail?orderId=' + uni.cache
|
||||
.get('order_detailinfoid')
|
||||
});
|
||||
}, 500)
|
||||
// uni.redirectTo({
|
||||
|
|
@ -440,8 +442,8 @@
|
|||
// .radiovalue1
|
||||
// });
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/order_detail?orderId=' + this
|
||||
.listinfoid
|
||||
url: '/pages/order/order_detail?orderId=' + uni.cache
|
||||
.get('order_detailinfoid')
|
||||
});
|
||||
}, 500)
|
||||
},
|
||||
|
|
@ -456,7 +458,7 @@
|
|||
async accountPayevent(pwd) {
|
||||
this.ispws = false
|
||||
let res = await this.api.accountPay({
|
||||
orderId: this.listinfoid,
|
||||
orderId: uni.cache.get('order_detailinfoid'),
|
||||
memberId: this.amountVIP.id,
|
||||
pwd: pwd
|
||||
})
|
||||
|
|
@ -473,22 +475,26 @@
|
|||
// .radiovalue1
|
||||
// });
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/order_detail?orderId=' + this
|
||||
.listinfoid
|
||||
url: '/pages/order/order_detail?orderId=' + uni.cache
|
||||
.get('order_detailinfoid')
|
||||
});
|
||||
}, 500)
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
} else if (res.data == 1) {
|
||||
setTimeout(() => {
|
||||
// 去充值
|
||||
this.goRecharge()
|
||||
}, 2000)
|
||||
} else {
|
||||
setTimeout(res => {
|
||||
uni.redirectTo({
|
||||
url: '/pages/order/order_detail?orderId=' + uni.cache.get(
|
||||
'order_detailinfoid')
|
||||
});
|
||||
}, 500)
|
||||
}
|
||||
|
||||
|
||||
// else if (res.data == 1) {
|
||||
// setTimeout(() => {
|
||||
// // 去充值
|
||||
// this.goRecharge()
|
||||
// }, 2000)
|
||||
// }
|
||||
},
|
||||
|
||||
clickselect(b) {
|
||||
|
|
@ -785,4 +791,19 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.u-popupflex-colum {
|
||||
width: 400rpx;
|
||||
padding: 80rpx 40rpx;
|
||||
border-radius: 50rpx;
|
||||
background: #FFFFFF;
|
||||
|
||||
.u-popupflex-columview {
|
||||
font-family: SourceHanSansCN-Bold-, SourceHanSansCN-Bold;
|
||||
font-weight: normal;
|
||||
color: #000;
|
||||
font-weight: bold;
|
||||
margin-bottom: 50rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue