diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index 65b0f73..436a976 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -146,39 +146,37 @@ Page({ //-- 通联的第三方支付的返回优化 -- ut.is_pay_ok("func","func",function (){ - if(!th.data.ok_order_sn) return false; - var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; - getApp().request.promiseGet(ck_url,{}).then(res=>{ - - if(res.data.code==0 && res.data.data){ - var item=res.data.data; - if(item.pay_status==1){ - //支付支付,返回首页 - th.success() - - }else{ - //支付支付,返回首页 - getApp().my_warnning('支付失败', 0, th); - th.setData({ - is_select:0, - focus:true, - }) - } - } - }) - }, //成功的回调 + if(!th.data.ok_order_sn) return false; + var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; + getApp().request.promiseGet(ck_url,{}).then(res=>{ + + if(res.data.code==0 && res.data.data){ + var item=res.data.data; + if(item.pay_status==1){ + //支付支付,返回首页 + th.success() + + }else{ + //支付支付,返回首页 + getApp().my_warnning('支付失败', 0, th); + th.setData({ + is_select:0, + focus:true, + }) + } + } + }) + }, //成功的回调 + function (){ + th.success(); + },//失败的回调 function (){ - th.success(); - },//失败的回调 - function (){ + th.setData({ + is_select:0, + focus:true, + }) - getApp().my_warnning('支付失败', 0, th); - th.setData({ - is_select:0, - focus:true, - }) - - }); + }); } this.setData({