|
@@ -116,12 +116,12 @@
|
|
},
|
|
},
|
|
success: (res) => {
|
|
success: (res) => {
|
|
if(res.data.code == 1000) {
|
|
if(res.data.code == 1000) {
|
|
|
|
+ uni.hideLoading();
|
|
let isform = this.isform;
|
|
let isform = this.isform;
|
|
let store_id = this.store_id;
|
|
let store_id = this.store_id;
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
url: `/pages/myOrder/finsh?isform=${isform}&order_id=${this.order_id}&store_id=${store_id}`
|
|
url: `/pages/myOrder/finsh?isform=${isform}&order_id=${this.order_id}&store_id=${store_id}`
|
|
})
|
|
})
|
|
- //uni.navigateBack()
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
@@ -133,7 +133,9 @@
|
|
payMoney() {
|
|
payMoney() {
|
|
if(this.radio == 0) {
|
|
if(this.radio == 0) {
|
|
// 微信支付
|
|
// 微信支付
|
|
-
|
|
|
|
|
|
+ // uni.showLoading({
|
|
|
|
+ // title: '支付中'
|
|
|
|
+ // });
|
|
this.request({
|
|
this.request({
|
|
url:'/v1/payment/pay',
|
|
url:'/v1/payment/pay',
|
|
method: 'post',
|
|
method: 'post',
|
|
@@ -144,9 +146,7 @@
|
|
},
|
|
},
|
|
success:(res) => {
|
|
success:(res) => {
|
|
let { wx } = res.data.data;
|
|
let { wx } = res.data.data;
|
|
- // uni.showLoading({
|
|
|
|
- // title: '支付中'
|
|
|
|
- // });
|
|
|
|
|
|
+
|
|
uni.requestPayment({
|
|
uni.requestPayment({
|
|
provider: 'wxpay',
|
|
provider: 'wxpay',
|
|
timeStamp: wx.timeStamp,
|
|
timeStamp: wx.timeStamp,
|
|
@@ -154,9 +154,7 @@
|
|
package: wx.package,
|
|
package: wx.package,
|
|
signType: 'MD5',
|
|
signType: 'MD5',
|
|
paySign: wx.paySign,
|
|
paySign: wx.paySign,
|
|
-
|
|
|
|
success: (res) => {
|
|
success: (res) => {
|
|
- console.log("成功")
|
|
|
|
let isform = this.isform;
|
|
let isform = this.isform;
|
|
let order_id = this.order_id;
|
|
let order_id = this.order_id;
|
|
let store_id = this.store_id;
|
|
let store_id = this.store_id;
|
|
@@ -164,12 +162,12 @@
|
|
url: `/pages/myOrder/finsh?isform=${isform}&order_id=${order_id}&store_id=${store_id}`
|
|
url: `/pages/myOrder/finsh?isform=${isform}&order_id=${order_id}&store_id=${store_id}`
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // fail: (err) => {
|
|
|
|
- // let order_id = this.order_id ;
|
|
|
|
- // uni.redirectTo({
|
|
|
|
- // url: `/pages/myOrder/order?id=${order_id}`
|
|
|
|
- // });
|
|
|
|
- // }
|
|
|
|
|
|
+ fail: (err) => {
|
|
|
|
+ let order_id = this.order_id ;
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: `/pages/myOrder/order?id=${order_id}`
|
|
|
|
+ });
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
fail:(res) => {
|
|
fail:(res) => {
|