|
@@ -121,28 +121,56 @@
|
|
|
res => {
|
|
|
if(res.code==200){
|
|
|
var result=JSON.parse(res.result);
|
|
|
- uni.requestPayment({
|
|
|
- provider: 'wxpay',
|
|
|
- timeStamp: result.timeStamp,
|
|
|
- nonceStr: result.nonceStr,
|
|
|
- package: result.package,
|
|
|
- signType: result.signType,
|
|
|
- paySign: result.paySign,
|
|
|
- success: function(res) {
|
|
|
- uni.hideLoading();
|
|
|
- uni.redirectTo({
|
|
|
- url:"otherPaySuccess"
|
|
|
- })
|
|
|
- },
|
|
|
- fail: function(err) {
|
|
|
- uni.showToast({
|
|
|
- icon:'none',
|
|
|
- title:'fail:' + JSON.stringify(err),
|
|
|
- });
|
|
|
- console.log('fail:' + JSON.stringify(err));
|
|
|
- uni.hideLoading();
|
|
|
- }
|
|
|
- });
|
|
|
+ wx.navigateToMiniProgram({
|
|
|
+ appId: 'wx1b63de1096c46cde', // 收银台小程序 AppId 固定值
|
|
|
+ path: '/pages/pay/pay', // 收银台小程序 固定路径
|
|
|
+ extraData: {
|
|
|
+ orderNo: result.orderNo,
|
|
|
+ orderAmt: result.orderAmt,
|
|
|
+ platMerCstNo: result.platMerCstNo,
|
|
|
+ platMerCstName: result.platMerCstName,
|
|
|
+ businessCstNo: result.businessCstNo,
|
|
|
+ licenseCode: result.licenseCode,
|
|
|
+ },
|
|
|
+ envVersion: 'release', // 开发版 develop,体验版 trial,正式环境传 release
|
|
|
+ success(res) {
|
|
|
+ uni.showLoading({
|
|
|
+ title:"查询支付结果中..."
|
|
|
+ })
|
|
|
+ setTimeout(()=>{
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/pages_user/user/storeOrderDetail?id='+this.order.id
|
|
|
+ })
|
|
|
+ },4000)
|
|
|
+ console.log(res)
|
|
|
+ // 接口调用成功的回调函数
|
|
|
+ },
|
|
|
+ fail(res) {
|
|
|
+ // 接口调用失败的回调函数
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // uni.requestPayment({
|
|
|
+ // provider: 'wxpay',
|
|
|
+ // timeStamp: result.timeStamp,
|
|
|
+ // nonceStr: result.nonceStr,
|
|
|
+ // package: result.package,
|
|
|
+ // signType: result.signType,
|
|
|
+ // paySign: result.paySign,
|
|
|
+ // success: function(res) {
|
|
|
+ // uni.hideLoading();
|
|
|
+ // uni.redirectTo({
|
|
|
+ // url:"otherPaySuccess"
|
|
|
+ // })
|
|
|
+ // },
|
|
|
+ // fail: function(err) {
|
|
|
+ // uni.showToast({
|
|
|
+ // icon:'none',
|
|
|
+ // title:'fail:' + JSON.stringify(err),
|
|
|
+ // });
|
|
|
+ // console.log('fail:' + JSON.stringify(err));
|
|
|
+ // uni.hideLoading();
|
|
|
+ // }
|
|
|
+ // });
|
|
|
// uni.requestPayment({
|
|
|
// provider: 'wxpay',
|
|
|
// timeStamp: res.result.timeStamp,
|