diff --git a/packageC/pages/presell/cart/cart2.js b/packageC/pages/presell/cart/cart2.js index e58d467..d3a1268 100644 --- a/packageC/pages/presell/cart/cart2.js +++ b/packageC/pages/presell/cart/cart2.js @@ -213,7 +213,8 @@ Page({ util_pay.set_fir(); //-- 通联的第三方支付的返回优化 -- - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,'none',function (){ + ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, + "/pages/user/order_list/order_list",function (){ if(!th.data.ok_order_sn) return false; getApp().request.promiseGet("/api/weshop/order/page", {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 4003ac4..da4f031 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -285,7 +285,8 @@ Page({ util_pay.set_fir(); //-- 通联的第三方支付的返回优化 -- - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,"none",function (){ + ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, + "/pages/user/order_list/order_list",function (){ //支付信息会先记录着 if(!th.data.ok_order_sn) return false; getApp().request.promiseGet("/api/weshop/order/page", diff --git a/packageE/pages/cart/cart2_inte/cart2_inte.js b/packageE/pages/cart/cart2_inte/cart2_inte.js index 7c7c27d..d0c001b 100644 --- a/packageE/pages/cart/cart2_inte/cart2_inte.js +++ b/packageE/pages/cart/cart2_inte/cart2_inte.js @@ -225,7 +225,8 @@ Page({ util_pay.set_fir(); //-- 通联的第三方支付的返回优化 -- - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn,"none",function (){ + ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn, + "/pages/user/order_list/order_list",function (){ if(!th.data.ok_order_sn) return false; getApp().request.promiseGet("/api/weshop/order/page", {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js index c665e70..b7fe788 100644 --- a/pages/cart/cart2_pt/cart2_pt.js +++ b/pages/cart/cart2_pt/cart2_pt.js @@ -585,7 +585,8 @@ Page({ if(fy) return false; util_pay.set_fir(); //-- 通联的第三方支付的返回优化 -- - ut.is_pay_ok("/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn,"none",function (){ + ut.is_pay_ok("/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn, + "/pages/user/order_list/order_list",function (){ if(!th.data.ok_order_sn) return false; getApp().request.promiseGet("/api/weshop/order/page", {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ diff --git a/utils/util.js b/utils/util.js index 88bb0ef..d67dfe2 100644 --- a/utils/util.js +++ b/utils/util.js @@ -891,11 +891,15 @@ module.exports = { * @param func 因为是物理键的返回,所以要调用结果,查询结果 * @param success //成功的回调函数, 当back_url是func * @param fail //失败的回调函数, 当err_url是func + * @param is_navigateTo //跳转的页面是不是要is_re_to */ - is_pay_ok(back_url,err_url,func,success,fail){ + is_pay_ok(back_url,err_url,func,success,fail,is_navigateTo){ if(!err_url){ err_url="/pages/index/index/index"; } + + + let options = wx.getEnterOptionsSync(); if (options.scene == '1038' && options.referrerInfo.appId=='wxef277996acc166c3') { let extraData = options.referrerInfo.extraData; @@ -914,7 +918,14 @@ module.exports = { success(); } else if(back_url!='none'){ - wx.redirectTo({ url: back_url}); + + if(is_navigateTo){ + getApp().goto(back_url) //跳到tabbar页 + }else{ + wx.redirectTo({ url: back_url}); + } + + } },2000) } @@ -930,7 +941,11 @@ module.exports = { fail(); } else if(err_url!='none'){ - getApp().goto(err_url); + if(is_navigateTo){ + getApp.goto({ url: err_url, }) //跳到tabbar页 + }else { + wxd.redirectTo(err_url); + } } },2000)