|
@@ -201,19 +201,29 @@
|
|
|
$http.post('/api/v1/mp/user/deliver/order/pay', data).then(ele => {
|
|
|
if (ele.code == 0) {
|
|
|
// #ifdef MP-ALIPAY
|
|
|
- uni.requestPayment({
|
|
|
- orderInfo: ele.data.pay_info,
|
|
|
- success() {
|
|
|
- uni.showToast({
|
|
|
- title: '支付成功',
|
|
|
- icon: 'success',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- setTimeout(() => {
|
|
|
- uni.redirectTo({
|
|
|
- url: `/packageGoods/order/index`
|
|
|
+ my.tradePay({
|
|
|
+ tradeNO: ele.data.pay_info,
|
|
|
+ success(res) {
|
|
|
+ if(res.resultCode == '9000'){
|
|
|
+ uni.showToast({
|
|
|
+ title: '支付成功',
|
|
|
+ icon: 'success',
|
|
|
+ duration: 2000
|
|
|
})
|
|
|
- }, 500)
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: `/packageGoods/order/index`
|
|
|
+ })
|
|
|
+ }, 500)
|
|
|
+ }else {
|
|
|
+ payIng = false
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: `/packageGoods/order/index`
|
|
|
+ })
|
|
|
+ }, 500)
|
|
|
+ }
|
|
|
+
|
|
|
},
|
|
|
fail() {
|
|
|
payIng = false
|