|
@@ -96,22 +96,34 @@
|
|
},
|
|
},
|
|
// 支付
|
|
// 支付
|
|
Submit(){
|
|
Submit(){
|
|
- // uni.requestPayment({
|
|
|
|
- // provider: 'wxpay', //支付类型-固定值
|
|
|
|
- // timeStamp: res.data.orderInfo.timeStamp, // 时间戳(单位:秒)
|
|
|
|
- // nonceStr: res.data.orderInfo.nonceStr, // 随机字符串
|
|
|
|
- // package: res.data.orderInfo.packageValue, // 固定值
|
|
|
|
- // signType: res.data.orderInfo.signType, //固定值
|
|
|
|
- // paySign: res.data.orderInfo.paySign, //签名
|
|
|
|
- // success: function (res) {
|
|
|
|
- // // console.log('success:' + JSON.stringify(res));
|
|
|
|
- // console.log("支付成功");
|
|
|
|
- // },
|
|
|
|
- // fail: function (err) {
|
|
|
|
- // console.log('fail:' + JSON.stringify(err));
|
|
|
|
- // console.log("支付失败");
|
|
|
|
- // }
|
|
|
|
- // });
|
|
|
|
|
|
+ uni.$u.http.post('/api/order/config',{
|
|
|
|
+ order_id:this.suborder.order_id,
|
|
|
|
+ }).then(res=>{
|
|
|
|
+ console.log(res)
|
|
|
|
+ uni.requestPayment({
|
|
|
|
+ provider: 'wxpay', //支付类型-固定值
|
|
|
|
+ timeStamp: res.timeStamp, // 时间戳(单位:秒)
|
|
|
|
+ nonceStr: res.nonceStr, // 随机字符串
|
|
|
|
+ package: res.package, // 固定值
|
|
|
|
+ signType: res.signType, //固定值
|
|
|
|
+ paySign: res.paySign, //签名
|
|
|
|
+ success: function (res) {
|
|
|
|
+ // console.log('success:' + JSON.stringify(res));
|
|
|
|
+ console.log("支付成功");
|
|
|
|
+ },
|
|
|
|
+ fail: function (err) {
|
|
|
|
+ console.log('fail:' + JSON.stringify(err));
|
|
|
|
+ console.log("支付失败");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ }).catch(err=>{
|
|
|
|
+ console.log(err)
|
|
|
|
+ uni.showToast({
|
|
|
|
+ icon:"error",
|
|
|
|
+ title:err.message,
|
|
|
|
+ })
|
|
|
|
+ })
|
|
},
|
|
},
|
|
notification(){
|
|
notification(){
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|