Commit 839d40d8b315639eaea70027fd9fa0beb81f4a8c

Authored by yvan.ni
1 parent abb88b5a

支付完后,在有用通联支付的页面,要避免一直提示支付成功的错误

packageA/pages/cart2_ser/cart2_ser.js
@@ -291,7 +291,7 @@ Page({ @@ -291,7 +291,7 @@ Page({
291 291
292 var back_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id; 292 var back_url="/pages/payment/pay_success/pay_success?card=1&order_id=" + th.data.order_id;
293 //-- 通联的第三方支付的返回优化 -- 293 //-- 通联的第三方支付的返回优化 --
294 - ut.is_pay_ok(back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 294 + ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
295 295
296 if(!th.data.order_id) return false; 296 if(!th.data.order_id) return false;
297 getApp().request.promiseGet("/api/weshop/recharge/user/page", 297 getApp().request.promiseGet("/api/weshop/recharge/user/page",
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -62,7 +62,9 @@ Page({ @@ -62,7 +62,9 @@ Page({
62 var back_url='/pages/user/order_list/order_list?index=2&tabindex=1'; 62 var back_url='/pages/user/order_list/order_list?index=2&tabindex=1';
63 var err_url='/pages/user/order_list/order_list?index=2&tabindex=1'; 63 var err_url='/pages/user/order_list/order_list?index=2&tabindex=1';
64 64
65 - if(th.data.details) { 65 + //判断是不是有调用支付过
  66 + if(th.data.payed) {
  67 + th.data.payed=0;
66 //-- 判断一下活动的类型 -- 68 //-- 判断一下活动的类型 --
67 var prom_type = th.data.details.list[0].prom_type > 0 ? th.data.details.list[0].prom_type : 0; 69 var prom_type = th.data.details.list[0].prom_type > 0 ? th.data.details.list[0].prom_type : 0;
68 var order_id = th.data.details.order_id; 70 var order_id = th.data.details.order_id;
@@ -81,10 +83,8 @@ Page({ @@ -81,10 +83,8 @@ Page({
81 } 83 }
82 84
83 //-- 通联的第三方支付的返回优化 -- 85 //-- 通联的第三方支付的返回优化 --
84 - ut.is_pay_ok(back_url, err_url, function () {  
85 - 86 + ut.is_pay_ok(th.data.details,back_url, err_url, function () {
86 if (!th.data.details) return false; 87 if (!th.data.details) return false;
87 -  
88 getApp().request.promiseGet(ck_url, 88 getApp().request.promiseGet(ck_url,
89 {data: req_data}).then(res => { 89 {data: req_data}).then(res => {
90 if (ut.ajax_ok(res)) { 90 if (ut.ajax_ok(res)) {
@@ -770,6 +770,8 @@ Page({ @@ -770,6 +770,8 @@ Page({
770 } 770 }
771 771
772 if (flag) { 772 if (flag) {
  773 +
  774 + th.data.payed=1;
773 t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); 775 t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder");
774 t_pay.pay({ 776 t_pay.pay({
775 parentSn: order_sn, 777 parentSn: order_sn,
packageA/pages/myGift/myGift.js
@@ -109,7 +109,7 @@ Page({ @@ -109,7 +109,7 @@ Page({
109 t_pay.set_fir(); 109 t_pay.set_fir();
110 110
111 //-- 通联的第三方支付的返回优化 -- 111 //-- 通联的第三方支付的返回优化 --
112 - util.is_pay_ok("none","none",function (){ 112 + util.is_pay_ok(th.data.ok_order_sn,"none","none",function (){
113 if(!th.data.ok_order_sn) return false; 113 if(!th.data.ok_order_sn) return false;
114 114
115 var b_url="/api/weshop/libao/libaoFormvip/page"; 115 var b_url="/api/weshop/libao/libaoFormvip/page";
@@ -137,9 +137,6 @@ Page({ @@ -137,9 +137,6 @@ Page({
137 } 137 }
138 138
139 139
140 -  
141 -  
142 -  
143 getApp().check_can_share(); 140 getApp().check_can_share();
144 if(app.globalData.userInfo) { 141 if(app.globalData.userInfo) {
145 if(!this.data.isLogin) { 142 if(!this.data.isLogin) {
packageA/pages/myGiftDetails/myGiftDetails.js
@@ -81,11 +81,9 @@ Page({ @@ -81,11 +81,9 @@ Page({
81 t_pay.set_fir(); 81 t_pay.set_fir();
82 82
83 //-- 通联的第三方支付的返回优化 -- 83 //-- 通联的第三方支付的返回优化 --
84 - ut.is_pay_ok("/packageA/pages/libao_payment/payment?type=2","none",function (){  
85 - 84 + ut.is_pay_ok(th.data.ok_order_sn,"/packageA/pages/libao_payment/payment?type=2","none",function (){
86 console.log('is_pay_ok'); 85 console.log('is_pay_ok');
87 console.log(th.data.ok_order_sn); 86 console.log(th.data.ok_order_sn);
88 -  
89 if(!th.data.ok_order_sn) return false; 87 if(!th.data.ok_order_sn) return false;
90 88
91 var b_url="/api/weshop/libao/libaoFormvip/page"; 89 var b_url="/api/weshop/libao/libaoFormvip/page";
packageA/pages/serviceCard_pd/cart/cart.js
@@ -258,7 +258,7 @@ Page({ @@ -258,7 +258,7 @@ Page({
258 var back_url="/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + th.data.order_sn; 258 var back_url="/packageA/pages/serviceCard_pd/team_success/team_success?ordersn=" + th.data.order_sn;
259 259
260 //-- 通联的第三方支付的返回优化 -- 260 //-- 通联的第三方支付的返回优化 --
261 - ut.is_pay_ok(back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 261 + ut.is_pay_ok(th.data.order_id,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
262 if(!th.data.order_id) return false; 262 if(!th.data.order_id) return false;
263 getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{ 263 getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{
264 data: { store_id: os.stoid, order_id: th.data.order_id} 264 data: { store_id: os.stoid, order_id: th.data.order_id}
packageA/pages/serviceCard_pd/cart_wk/cart_wk.js
@@ -109,8 +109,9 @@ Page({ @@ -109,8 +109,9 @@ Page({
109 109
110 var back_url="/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1"; 110 var back_url="/pages/payment/pay_success/pay_success?order_id=" + th.data.order.order_id + "&type=1&card=1";
111 //-- 通联的第三方支付的返回优化 -- 111 //-- 通联的第三方支付的返回优化 --
112 - ut.is_pay_ok(back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){ 112 + ut.is_pay_ok(th.data.wk_pyed,back_url,"/pages/user/order_list/order_list?index=2&tabindex=1",function (){
113 if(!th.data.wk_pyed) return false; 113 if(!th.data.wk_pyed) return false;
  114 +
114 getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{ 115 getApp().request.promiseGet("/api/weshop/rechargeServicelist/page",{
115 data: { store_id: os.stoid, order_id: th.data.order.order_id} 116 data: { store_id: os.stoid, order_id: th.data.order.order_id}
116 }).then(res=>{ 117 }).then(res=>{
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -672,7 +672,7 @@ Page({ @@ -672,7 +672,7 @@ Page({
672 "&goods_name=" + th.data.bn_goods.goods_name; 672 "&goods_name=" + th.data.bn_goods.goods_name;
673 673
674 //-- 通联的第三方支付的返回优化 -- 674 //-- 通联的第三方支付的返回优化 --
675 - ut.is_pay_ok(back,'/pages/user/order_list/order_list',function (){ 675 + ut.is_pay_ok(th.data.ok_order_sn,back,'/pages/user/order_list/order_list',function (){
676 if(!th.data.ok_order_sn) return false; 676 if(!th.data.ok_order_sn) return false;
677 getApp().request.promiseGet("/api/weshop/order/page", 677 getApp().request.promiseGet("/api/weshop/order/page",
678 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ 678 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
packageC/pages/presell/cart/cart.js
@@ -216,7 +216,7 @@ Page({ @@ -216,7 +216,7 @@ Page({
216 util_pay.set_fir(); 216 util_pay.set_fir();
217 217
218 //-- 通联的第三方支付的返回优化 -- 218 //-- 通联的第三方支付的返回优化 --
219 - ut.is_pay_ok("back","back",function (){ 219 + ut.is_pay_ok(th.data.ok_order_sn,"back","back",function (){
220 220
221 console.log('onshow-444'); 221 console.log('onshow-444');
222 console.log(th.data.ok_order_sn); 222 console.log(th.data.ok_order_sn);
packageC/pages/presell/cart/cart2.js
@@ -213,7 +213,7 @@ Page({ @@ -213,7 +213,7 @@ Page({
213 util_pay.set_fir(); 213 util_pay.set_fir();
214 214
215 //-- 通联的第三方支付的返回优化 -- 215 //-- 通联的第三方支付的返回优化 --
216 - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, 216 + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,
217 "/pages/user/order_list/order_list",function (){ 217 "/pages/user/order_list/order_list",function (){
218 if(!th.data.ok_order_sn) return false; 218 if(!th.data.ok_order_sn) return false;
219 getApp().request.promiseGet("/api/weshop/order/page", 219 getApp().request.promiseGet("/api/weshop/order/page",
packageC/pages/presell/cart/cart2_pre.js
@@ -294,7 +294,7 @@ Page({ @@ -294,7 +294,7 @@ Page({
294 var ok_url = "/packageC/pages/presell/cart/cart?order_sn=" +this.data.ok_order_sn; 294 var ok_url = "/packageC/pages/presell/cart/cart?order_sn=" +this.data.ok_order_sn;
295 var err_url="/pages/user/order_list/order_list"; 295 var err_url="/pages/user/order_list/order_list";
296 //-- 通联的第三方支付的返回优化 -- 296 //-- 通联的第三方支付的返回优化 --
297 - ut.is_pay_ok(ok_url,err_url,function (){ 297 + ut.is_pay_ok(th.data.ok_order_sn,ok_url,err_url,function (){
298 if(!th.data.ok_order_sn) return false; 298 if(!th.data.ok_order_sn) return false;
299 getApp().request.promiseGet("/api/weshop/order/page", 299 getApp().request.promiseGet("/api/weshop/order/page",
300 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ 300 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
packageD/pages/user/deposit/prepaid/prepaid.js
@@ -110,7 +110,7 @@ Page({ @@ -110,7 +110,7 @@ Page({
110 t_pay.set_fir(); 110 t_pay.set_fir();
111 111
112 //-- 通联的第三方支付的返回优化 -- 112 //-- 通联的第三方支付的返回优化 --
113 - ut.is_pay_ok("/packageD/pages/user/deposit/prepaid/msg/msg","none",function (){ 113 + ut.is_pay_ok(th.data.ok_order_sn,"/packageD/pages/user/deposit/prepaid/msg/msg","none",function (){
114 if(!th.data.ok_order_sn) return false; 114 if(!th.data.ok_order_sn) return false;
115 var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; 115 var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn;
116 getApp().request.promiseGet(ck_url,{}).then(res=>{ 116 getApp().request.promiseGet(ck_url,{}).then(res=>{
packageD/pages/user/integral/integral.js
@@ -345,7 +345,7 @@ Page({ @@ -345,7 +345,7 @@ Page({
345 t_pay.set_fir(); 345 t_pay.set_fir();
346 346
347 //-- 通联的第三方支付的返回优化 -- 347 //-- 通联的第三方支付的返回优化 --
348 - ut.is_pay_ok("/packageD/pages/user/integral/msg/msg",'none',function (){ 348 + ut.is_pay_ok(th.data.ok_order_sn,"/packageD/pages/user/integral/msg/msg",'none',function (){
349 349
350 console.log('show--11') 350 console.log('show--11')
351 console.log(th.data.ok_order_sn); 351 console.log(th.data.ok_order_sn);
packageE/pages/cart/cart2/cart2.js
@@ -285,7 +285,7 @@ Page({ @@ -285,7 +285,7 @@ Page({
285 util_pay.set_fir(); 285 util_pay.set_fir();
286 286
287 //-- 通联的第三方支付的返回优化 -- 287 //-- 通联的第三方支付的返回优化 --
288 - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn, 288 + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + this.data.ok_order_sn,
289 "/pages/user/order_list/order_list",function (){ 289 "/pages/user/order_list/order_list",function (){
290 //支付信息会先记录着 290 //支付信息会先记录着
291 if(!th.data.ok_order_sn) return false; 291 if(!th.data.ok_order_sn) return false;
packageE/pages/cart/cart2_inte/cart2_inte.js
@@ -225,7 +225,7 @@ Page({ @@ -225,7 +225,7 @@ Page({
225 util_pay.set_fir(); 225 util_pay.set_fir();
226 226
227 //-- 通联的第三方支付的返回优化 -- 227 //-- 通联的第三方支付的返回优化 --
228 - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn, 228 + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=2&order_sn=" + th.data.ok_order_sn,
229 "/pages/user/order_list/order_list",function (){ 229 "/pages/user/order_list/order_list",function (){
230 if(!th.data.ok_order_sn) return false; 230 if(!th.data.ok_order_sn) return false;
231 getApp().request.promiseGet("/api/weshop/order/page", 231 getApp().request.promiseGet("/api/weshop/order/page",
packageE/pages/cart/cart2_pt/cart2_pt.js
@@ -585,7 +585,7 @@ Page({ @@ -585,7 +585,7 @@ Page({
585 if(fy) return false; 585 if(fy) return false;
586 util_pay.set_fir(); 586 util_pay.set_fir();
587 //-- 通联的第三方支付的返回优化 -- 587 //-- 通联的第三方支付的返回优化 --
588 - ut.is_pay_ok("/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn, 588 + ut.is_pay_ok(th.data.ok_order_sn,"/pages/team/team_success/team_success?ordersn=" + th.data.ok_order_sn,
589 "/pages/user/order_list/order_list",function (){ 589 "/pages/user/order_list/order_list",function (){
590 if(!th.data.ok_order_sn) return false; 590 if(!th.data.ok_order_sn) return false;
591 getApp().request.promiseGet("/api/weshop/order/page", 591 getApp().request.promiseGet("/api/weshop/order/page",
packageE/pages/user/cardinfo/cardinfo.js
@@ -696,7 +696,7 @@ Page({ @@ -696,7 +696,7 @@ Page({
696 t_pay.set_fir(); 696 t_pay.set_fir();
697 697
698 //-- 通联的第三方支付的返回优化 -- 698 //-- 通联的第三方支付的返回优化 --
699 - ut.is_pay_ok("func",'none',function (){ 699 + ut.is_pay_ok(th.data.ok_order_sn,"func",'none',function (){
700 700
701 console.log('1111'); 701 console.log('1111');
702 console.log(th.data.ok_order_sn); 702 console.log(th.data.ok_order_sn);
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
@@ -196,7 +196,7 @@ Page({ @@ -196,7 +196,7 @@ Page({
196 var money = th.data.payMoney; 196 var money = th.data.payMoney;
197 var bk_url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + th.data.back_ord; 197 var bk_url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + th.data.back_ord;
198 //-- 通联的第三方支付的返回优化 -- 198 //-- 通联的第三方支付的返回优化 --
199 - ut.is_pay_ok(bk_url, "none", function () { 199 + ut.is_pay_ok(th.data.back_ord,bk_url, "none", function () {
200 if (!th.data.back_ord) return false; 200 if (!th.data.back_ord) return false;
201 //订单查询的接口 201 //订单查询的接口
202 getApp().request.promiseGet("/api/weshop/marketing/marketingMonthgiftbagRecord/page", 202 getApp().request.promiseGet("/api/weshop/marketing/marketingMonthgiftbagRecord/page",
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -460,7 +460,7 @@ Page({ @@ -460,7 +460,7 @@ Page({
460 var money=th.data.payMoney; 460 var money=th.data.payMoney;
461 var bk_url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + th.data.back_ord; 461 var bk_url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + th.data.back_ord;
462 //-- 通联的第三方支付的返回优化 -- 462 //-- 通联的第三方支付的返回优化 --
463 - ut.is_pay_ok(bk_url,"none",function (){ 463 + ut.is_pay_ok(th.data.back_ord,bk_url,"none",function (){
464 if(!th.data.back_ord) return false; 464 if(!th.data.back_ord) return false;
465 getApp().request.promiseGet("/api/weshop/marketing/marketingMonthgiftbagRecord/page", 465 getApp().request.promiseGet("/api/weshop/marketing/marketingMonthgiftbagRecord/page",
466 {data:{store_id:os.stoid,order_sn:th.data.back_ord,user_id:getApp().globalData.user_id}}).then(res=>{ 466 {data:{store_id:os.stoid,order_sn:th.data.back_ord,user_id:getApp().globalData.user_id}}).then(res=>{
pages/cart/cart_wk/cart_wk.js
@@ -108,7 +108,7 @@ Page({ @@ -108,7 +108,7 @@ Page({
108 util_pay.set_fir(); 108 util_pay.set_fir();
109 109
110 //-- 通联的第三方支付的返回优化 -- 110 //-- 通联的第三方支付的返回优化 --
111 - ut.is_pay_ok("/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){ 111 + ut.is_pay_ok(th.data.ok_order_sn,"/pages/payment/pay_success/pay_success?type=1&order_sn=" + this.data.ok_order_sn,'back',function (){
112 if(!th.data.ok_order_sn) return false; 112 if(!th.data.ok_order_sn) return false;
113 getApp().request.promiseGet("/api/weshop/order/page", 113 getApp().request.promiseGet("/api/weshop/order/page",
114 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{ 114 {data:{store_id:os.stoid,parent_sn:th.data.ok_order_sn}}).then(res=>{
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -163,7 +163,7 @@ Page({ @@ -163,7 +163,7 @@ Page({
163 var money=th.data.payMoney; 163 var money=th.data.payMoney;
164 var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn; 164 var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn;
165 165
166 - ut.is_pay_ok(back_url,'none',function (){ 166 + ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){
167 if(!th.data.ok_order_sn) return false; 167 if(!th.data.ok_order_sn) return false;
168 getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get", 168 getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
169 {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{ 169 {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
pages/giftpack/giftpacklist/giftpacklist.js
@@ -187,7 +187,7 @@ Page({ @@ -187,7 +187,7 @@ Page({
187 //-- 通联的第三方支付的返回优化 -- 187 //-- 通联的第三方支付的返回优化 --
188 var money=th.data.payMoney; 188 var money=th.data.payMoney;
189 var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn; 189 var back_url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + th.data.ok_order_sn;
190 - ut.is_pay_ok(back_url,'none',function (){ 190 + ut.is_pay_ok(th.data.ok_order_sn,back_url,'none',function (){
191 if(!th.data.ok_order_sn) return false; 191 if(!th.data.ok_order_sn) return false;
192 getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get", 192 getApp().request.promiseGet("/api/weshop/marketing/my/giftbag/detail/get",
193 {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{ 193 {data:{storeId:os.stoid,orderSn:th.data.ok_order_sn,userId:getApp().globalData.user_id}}).then(res=>{
pages/user/order_detail/order_detail.js
@@ -81,8 +81,7 @@ Page({ @@ -81,8 +81,7 @@ Page({
81 81
82 //通联第三方 82 //通联第三方
83 //-- 通联的第三方支付的返回优化 -- 83 //-- 通联的第三方支付的返回优化 --
84 - ut.is_pay_ok("back","none",function (){  
85 - if(!th.data.ok_order_sn) return false; 84 + ut.is_pay_ok(th.data.ok_order_sn,"back","none",function (){
86 getApp().request.promiseGet("/api/weshop/order/page", 85 getApp().request.promiseGet("/api/weshop/order/page",
87 {data:{store_id:os.stoid,order_sn:th.data.ok_order_sn}}).then(res=>{ 86 {data:{store_id:os.stoid,order_sn:th.data.ok_order_sn}}).then(res=>{
88 if(ut.ajax_ok(res)){ 87 if(ut.ajax_ok(res)){
@@ -583,7 +582,6 @@ Page({ @@ -583,7 +582,6 @@ Page({
583 }) 582 })
584 583
585 if (presellList) { 584 if (presellList) {
586 -  
587 if (good.goods_num > presellList.presell_sumqty - presellList.buy_goodnum) { 585 if (good.goods_num > presellList.presell_sumqty - presellList.buy_goodnum) {
588 var content = good.goods_name + '购买数量超出商品库存,请取消订单'; 586 var content = good.goods_name + '购买数量超出商品库存,请取消订单';
589 th.toast(content); 587 th.toast(content);
pages/user/plus/plus.js
@@ -144,7 +144,7 @@ Page({ @@ -144,7 +144,7 @@ Page({
144 ut.fy_back('',0); 144 ut.fy_back('',0);
145 t_pay.set_fir(); 145 t_pay.set_fir();
146 //-- 通联的第三方支付的返回优化 -- 146 //-- 通联的第三方支付的返回优化 --
147 - ut.is_pay_ok("func","func",function (){ 147 + ut.is_pay_ok(th.data.ok_order_sn,"func","func",function (){
148 148
149 if(!th.data.ok_order_sn) return false; 149 if(!th.data.ok_order_sn) return false;
150 var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn; 150 var ck_url="/api/weshop/recharge/get/"+os.stoid+"/"+th.data.ok_order_sn;
utils/util.js
@@ -885,7 +885,7 @@ module.exports = { @@ -885,7 +885,7 @@ module.exports = {
885 }, 885 },
886 //-- 支付的结果判断是不是完成了,通联支付pos收银的返回 -- 886 //-- 支付的结果判断是不是完成了,通联支付pos收银的返回 --
887 /** 887 /**
888 - * 888 + * @param ok_order_sn 判断是不是有支付过
889 * @param back_url 如果是地址,就跳转,如果是back,就返回。如果是func,就是要回调 889 * @param back_url 如果是地址,就跳转,如果是back,就返回。如果是func,就是要回调
890 * @param err_url 如果是地址,就跳转,如果是back,就返回。如果是func,就是要回调,如果是none,就没有反应,提示而已 890 * @param err_url 如果是地址,就跳转,如果是back,就返回。如果是func,就是要回调,如果是none,就没有反应,提示而已
891 * @param func 因为是物理键的返回,所以要调用结果,查询结果 891 * @param func 因为是物理键的返回,所以要调用结果,查询结果
@@ -893,12 +893,20 @@ module.exports = { @@ -893,12 +893,20 @@ module.exports = {
893 * @param fail //失败的回调函数, 当err_url是func 893 * @param fail //失败的回调函数, 当err_url是func
894 * @param is_navigateTo //跳转的页面是不是要is_re_to 894 * @param is_navigateTo //跳转的页面是不是要is_re_to
895 */ 895 */
896 - is_pay_ok(back_url,err_url,func,success,fail,is_navigateTo){ 896 + is_pay_ok(ok_order_sn,back_url,err_url,func,success,fail,is_navigateTo){
  897 +
  898 + if(!ok_order_sn) {
  899 + return false;
  900 + }
897 if(!err_url){ 901 if(!err_url){
898 err_url="/pages/index/index/index"; 902 err_url="/pages/index/index/index";
899 } 903 }
900 - 904 + //-- getEnterOptionsSync的信息会一直存在,很恶心 --
901 let options = wx.getEnterOptionsSync(); 905 let options = wx.getEnterOptionsSync();
  906 +
  907 + console.log("is_pay_ok");
  908 + console.log(options);
  909 +
902 if (options.scene == '1038' && options.referrerInfo.appId=='wxef277996acc166c3') { 910 if (options.scene == '1038' && options.referrerInfo.appId=='wxef277996acc166c3') {
903 let extraData = options.referrerInfo.extraData; 911 let extraData = options.referrerInfo.extraData;
904 if (!extraData) { 912 if (!extraData) {