更改支付逻辑

This commit is contained in:
魏啾 2024-05-31 09:23:39 +08:00
parent 9ac0246e02
commit adbc75f4e0
3 changed files with 69 additions and 48 deletions

View File

@ -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": {

View File

@ -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>

View File

@ -290,7 +290,8 @@
} 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() //
@ -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')
})
},
//
@ -377,6 +378,7 @@
})
} else {
uni.showToast({
icon: 'none',
title: "余额不足"
})
}
@ -387,7 +389,7 @@
//
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>