更改支付逻辑
This commit is contained in:
46
pages.json
46
pages.json
@@ -169,29 +169,29 @@
|
|||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
"path": "pages/user/shop/index",
|
// "path": "pages/user/shop/index",
|
||||||
"style": {
|
// "style": {
|
||||||
"navigationBarTitleText": "积分商城",
|
// "navigationBarTitleText": "积分商城",
|
||||||
"navigationStyle": "custom",
|
// "navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "black"
|
// "navigationBarTextStyle": "black"
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"path": "pages/user/shop/detail",
|
// "path": "pages/user/shop/detail",
|
||||||
"style": {
|
// "style": {
|
||||||
"navigationBarTitleText": "积分明细",
|
// "navigationBarTitleText": "积分明细",
|
||||||
"navigationStyle": "custom",
|
// "navigationStyle": "custom",
|
||||||
"navigationBarTextStyle": "black"
|
// "navigationBarTextStyle": "black"
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
"path": "pages/user/shop/shopinfo",
|
// "path": "pages/user/shop/shopinfo",
|
||||||
"style": {
|
// "style": {
|
||||||
"navigationBarTitleText": "商品详情",
|
// "navigationBarTitleText": "商品详情",
|
||||||
"navigationBarTextStyle": "black"
|
// "navigationBarTextStyle": "black"
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
"path": "pages/user/address/index",
|
"path": "pages/user/address/index",
|
||||||
"style": {
|
"style": {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
<!-- <image :src="require('')" style="width: 76rpx;height: 76rpx;float: left;" mode=""></image> -->
|
||||||
<view class="listrigth">
|
<view class="listrigth">
|
||||||
<view>{{item.biz_name}}</view>
|
<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>
|
||||||
<view class="listrigth2">
|
<view class="listrigth2">
|
||||||
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
<view>{{$u.timeFormat(item.create_time, 'yyyy-mm-dd hh:MM:ss')}}</view>
|
||||||
|
|||||||
@@ -290,12 +290,13 @@
|
|||||||
|
|
||||||
} else if (msg.type == 'createOrder') {
|
} else if (msg.type == 'createOrder') {
|
||||||
console.log(msg, '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
|
this.orderInfo = msg.data
|
||||||
if (this.radiovalue1 == 1) {
|
if (this.radiovalue1 == 1) {
|
||||||
this.showpopupclickdds() //微信支付
|
this.showpopupclickdds() //微信支付
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handlemessage() {
|
handlemessage() {
|
||||||
@@ -314,7 +315,7 @@
|
|||||||
orderfoodindex() {
|
orderfoodindex() {
|
||||||
uni.pro.navigateTo('index/coupons/index', {
|
uni.pro.navigateTo('index/coupons/index', {
|
||||||
orderfood: 0,
|
orderfood: 0,
|
||||||
orderId: this.listinfoid,
|
orderId: uni.cache.get('order_detailinfoid'),
|
||||||
amount: this.listinfo.amounts
|
amount: this.listinfo.amounts
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -331,7 +332,7 @@
|
|||||||
},
|
},
|
||||||
async paymodfiyOrderInfo() {
|
async paymodfiyOrderInfo() {
|
||||||
let res = await this.api.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')
|
shopId_id: uni.cache.get('shopUser')
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
if(this.amountVIP.amount > this.listinfo.amount){
|
if (this.amountVIP.amount > this.listinfo.amount) {
|
||||||
this.ispws = true
|
this.ispws = true
|
||||||
this.showpopupclick() //生成订单
|
this.showpopupclick() //生成订单
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.payPwd.onPayUp();
|
this.$refs.payPwd.onPayUp();
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
title: "余额不足"
|
title: "余额不足"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 微信支付
|
// 微信支付
|
||||||
async showpopupclickdds() {
|
async showpopupclickdds() {
|
||||||
let res = await this.api.payorderPay({
|
let res = await this.api.payorderPay({
|
||||||
orderId: this.listinfoid
|
orderId: uni.cache.get('order_detailinfoid')
|
||||||
}) //判断是否支付成功
|
}) //判断是否支付成功
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
// uni.showLoading({
|
// uni.showLoading({
|
||||||
@@ -418,8 +420,8 @@
|
|||||||
// .radiovalue1
|
// .radiovalue1
|
||||||
// });
|
// });
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/order_detail?orderId=' + this
|
url: '/pages/order/order_detail?orderId=' + uni.cache
|
||||||
.listinfoid
|
.get('order_detailinfoid')
|
||||||
});
|
});
|
||||||
}, 500)
|
}, 500)
|
||||||
// uni.redirectTo({
|
// uni.redirectTo({
|
||||||
@@ -440,8 +442,8 @@
|
|||||||
// .radiovalue1
|
// .radiovalue1
|
||||||
// });
|
// });
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/order_detail?orderId=' + this
|
url: '/pages/order/order_detail?orderId=' + uni.cache
|
||||||
.listinfoid
|
.get('order_detailinfoid')
|
||||||
});
|
});
|
||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
@@ -456,7 +458,7 @@
|
|||||||
async accountPayevent(pwd) {
|
async accountPayevent(pwd) {
|
||||||
this.ispws = false
|
this.ispws = false
|
||||||
let res = await this.api.accountPay({
|
let res = await this.api.accountPay({
|
||||||
orderId: this.listinfoid,
|
orderId: uni.cache.get('order_detailinfoid'),
|
||||||
memberId: this.amountVIP.id,
|
memberId: this.amountVIP.id,
|
||||||
pwd: pwd
|
pwd: pwd
|
||||||
})
|
})
|
||||||
@@ -473,22 +475,26 @@
|
|||||||
// .radiovalue1
|
// .radiovalue1
|
||||||
// });
|
// });
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/order/order_detail?orderId=' + this
|
url: '/pages/order/order_detail?orderId=' + uni.cache
|
||||||
.listinfoid
|
.get('order_detailinfoid')
|
||||||
});
|
});
|
||||||
}, 500)
|
}, 500)
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else if (res.data == 1) {
|
} else {
|
||||||
setTimeout(() => {
|
setTimeout(res => {
|
||||||
// 去充值
|
uni.redirectTo({
|
||||||
this.goRecharge()
|
url: '/pages/order/order_detail?orderId=' + uni.cache.get(
|
||||||
}, 2000)
|
'order_detailinfoid')
|
||||||
|
});
|
||||||
|
}, 500)
|
||||||
}
|
}
|
||||||
|
// else if (res.data == 1) {
|
||||||
|
// setTimeout(() => {
|
||||||
|
// // 去充值
|
||||||
|
// this.goRecharge()
|
||||||
|
// }, 2000)
|
||||||
|
// }
|
||||||
},
|
},
|
||||||
|
|
||||||
clickselect(b) {
|
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>
|
</style>
|
||||||
Reference in New Issue
Block a user