Commit 53e35142887794c6df6528e9558f68f495198966

Authored by yvan.ni
1 parent bfb6a525

支付的回调,侧滑返回的优化

packageA/pages/cart2_ser/cart2_ser.js
@@ -274,6 +274,9 @@ Page({ @@ -274,6 +274,9 @@ Page({
274 274
275 //----------子页返回父页触发---------- 275 //----------子页返回父页触发----------
276 onShow: function() { 276 onShow: function() {
  277 + var fy=s.fy_back("/pages/user/order_list/order_list?index=2&tabindex=1",1);
  278 + if(fy) return false;
  279 +
277 t_pay.set_fir(); 280 t_pay.set_fir();
278 var th = this; 281 var th = this;
279 if (th.data.isclose == 0) { 282 if (th.data.isclose == 0) {
@@ -641,6 +644,13 @@ Page({ @@ -641,6 +644,13 @@ Page({
641 icon: 'none', 644 icon: 'none',
642 duration: 2000 645 duration: 2000
643 }); 646 });
  647 +
  648 + setTimeout(function () {
  649 + wx.reLaunch({
  650 + url: "/pages/user/order_list/order_list?index=2&tabindex=1",
  651 + })
  652 + }, 1000)
  653 +
644 } 654 }
645 ) 655 )
646 656
packageA/pages/chongzhiDetails/chongzhiDetails.js
@@ -106,6 +106,8 @@ Page({ @@ -106,6 +106,8 @@ Page({
106 * 生命周期函数--监听页面显示 106 * 生命周期函数--监听页面显示
107 */ 107 */
108 onShow: function () { 108 onShow: function () {
  109 + this.data.is_buying=0;
  110 + util.fy_back('',0)
109 t_pay.set_fir(); 111 t_pay.set_fir();
110 getApp().check_can_share(); 112 getApp().check_can_share();
111 }, 113 },
@@ -167,7 +169,7 @@ Page({ @@ -167,7 +169,7 @@ Page({
167 var recharge_type = 6; 169 var recharge_type = 6;
168 var buynum = 1; 170 var buynum = 1;
169 console.log(money, "有进来吗预存劵", advancek, user_id, store_id ); 171 console.log(money, "有进来吗预存劵", advancek, user_id, store_id );
170 - var e = this, 172 + var e = this,th=this,
171 perpaid = ""; 173 perpaid = "";
172 await getApp().request.promiseGet("/api/weshop/users/getPay", { 174 await getApp().request.promiseGet("/api/weshop/users/getPay", {
173 data: { 175 data: {
@@ -196,8 +198,10 @@ Page({ @@ -196,8 +198,10 @@ Page({
196 parentSn: parentSn, 198 parentSn: parentSn,
197 store_id: store_id 199 store_id: store_id
198 }, function () { 200 }, function () {
  201 + th.data.is_buying=0;
199 e.jumpPaymentPage(); 202 e.jumpPaymentPage();
200 }, function (e) { 203 }, function (e) {
  204 + th.data.is_buying=0;
201 wx.showToast({ 205 wx.showToast({
202 title: e, 206 title: e,
203 icon: 'none', 207 icon: 'none',
packageA/pages/details_serviceCard/details_serviceCard.js
@@ -3,6 +3,7 @@ var t_pay = require("../../../utils/pay2.js"); @@ -3,6 +3,7 @@ var t_pay = require("../../../utils/pay2.js");
3 const app = getApp(); 3 const app = getApp();
4 const os = app.globalData.setting; 4 const os = app.globalData.setting;
5 let self = null; 5 let self = null;
  6 +var util = require('../../../utils/util.js');
6 7
7 Page({ 8 Page({
8 9
@@ -44,6 +45,8 @@ Page({ @@ -44,6 +45,8 @@ Page({
44 * 生命周期函数--监听页面显示 45 * 生命周期函数--监听页面显示
45 */ 46 */
46 onShow: function() { 47 onShow: function() {
  48 + this.data.is_summit_ing=0;
  49 + util.fy_back('',0)
47 t_pay.set_fir(); 50 t_pay.set_fir();
48 getApp().check_can_share(); 51 getApp().check_can_share();
49 if (app.globalData.userInfo) { 52 if (app.globalData.userInfo) {
@@ -497,6 +500,11 @@ Page({ @@ -497,6 +500,11 @@ Page({
497 500
498 // 立即支付 501 // 立即支付
499 pay() { 502 pay() {
  503 +
  504 + if(this.data.is_summit_ing) return false;
  505 + this.data.is_summit_ing=1;
  506 +
  507 + var th=this;
500 let order_sn = this.data.details.order_sn; 508 let order_sn = this.data.details.order_sn;
501 let order_id = this.data.details.order_id; 509 let order_id = this.data.details.order_id;
502 let store_id = app.globalData.setting.stoid; 510 let store_id = app.globalData.setting.stoid;
@@ -513,6 +521,7 @@ Page({ @@ -513,6 +521,7 @@ Page({
513 }, 1000) 521 }, 1000)
514 522
515 }, function (e) { 523 }, function (e) {
  524 + th.data.is_summit_ing=0;
516 wx.showToast({ 525 wx.showToast({
517 title: e, 526 title: e,
518 icon: 'none', 527 icon: 'none',
packageA/pages/myGift/myGift.js
@@ -3,6 +3,7 @@ const app = getApp(); @@ -3,6 +3,7 @@ const app = getApp();
3 let self = null; 3 let self = null;
4 var os = app.globalData.setting; 4 var os = app.globalData.setting;
5 var t_pay = require("../../../utils/pay2.js"); 5 var t_pay = require("../../../utils/pay2.js");
  6 +var util = require('../../../utils/util.js');
6 7
7 Page({ 8 Page({
8 9
@@ -18,6 +19,7 @@ Page({ @@ -18,6 +19,7 @@ Page({
18 noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 19 noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据
19 pageNum: 1, // 当前页数 20 pageNum: 1, // 当前页数
20 iurl: os.imghost, //图片前缀网址 21 iurl: os.imghost, //图片前缀网址
  22 + is_summit_ing:0 //是不是提交申请
21 }, 23 },
22 24
23 clickTab(e) { 25 clickTab(e) {
@@ -89,6 +91,9 @@ Page({ @@ -89,6 +91,9 @@ Page({
89 * 生命周期函数--监听页面显示 91 * 生命周期函数--监听页面显示
90 */ 92 */
91 onShow: function () { 93 onShow: function () {
  94 +
  95 + util.fy_back('',0)
  96 + this.data.is_summit_ing=0;
92 t_pay.set_fir(); 97 t_pay.set_fir();
93 getApp().check_can_share(); 98 getApp().check_can_share();
94 if(app.globalData.userInfo) { 99 if(app.globalData.userInfo) {
@@ -275,6 +280,10 @@ Page({ @@ -275,6 +280,10 @@ Page({
275 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 280 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
276 var user=getApp().globalData.userInfo; 281 var user=getApp().globalData.userInfo;
277 282
  283 +
  284 + if(this.data.is_summit_ing) return false;
  285 + this.data.is_summit_ing=0;
  286 +
278 my_confirm.open( 287 my_confirm.open(
279 "是否确定购买该礼包", 288 "是否确定购买该礼包",
280 "取消", 289 "取消",
@@ -292,8 +301,10 @@ Page({ @@ -292,8 +301,10 @@ Page({
292 }; 301 };
293 t_pay.set_pay_url("/api/weshop/libao/libaoFormvip/libaoOrder"); 302 t_pay.set_pay_url("/api/weshop/libao/libaoFormvip/libaoOrder");
294 t_pay.pay(json,function (){ 303 t_pay.pay(json,function (){
  304 + th.data.is_summit_ing=0;
295 getApp().my_warnning("支付成功", 1, th); 305 getApp().my_warnning("支付成功", 1, th);
296 },function (e){ 306 },function (e){
  307 + th.data.is_summit_ing=0;
297 getApp().my_warnning(e, 0, th); 308 getApp().my_warnning(e, 0, th);
298 }) 309 })
299 // var url = "/api/weshop/libao/libaoFormvip/libaoOrder"; 310 // var url = "/api/weshop/libao/libaoFormvip/libaoOrder";
packageA/pages/myGiftDetails/myGiftDetails.js
@@ -17,6 +17,7 @@ Page({ @@ -17,6 +17,7 @@ Page({
17 }, 17 },
18 showBtn: true, 18 showBtn: true,
19 isClick: false, 19 isClick: false,
  20 + is_summit_ing: 0,
20 }, 21 },
21 22
22 /** 23 /**
@@ -67,6 +68,8 @@ Page({ @@ -67,6 +68,8 @@ Page({
67 * 生命周期函数--监听页面显示 68 * 生命周期函数--监听页面显示
68 */ 69 */
69 onShow: function () { 70 onShow: function () {
  71 + this.data.is_summit_ing=0;
  72 + ut.fy_back('',0)
70 t_pay.set_fir(); 73 t_pay.set_fir();
71 getApp().check_can_share(); 74 getApp().check_can_share();
72 if(app.globalData.userInfo) { 75 if(app.globalData.userInfo) {
@@ -210,6 +213,10 @@ Page({ @@ -210,6 +213,10 @@ Page({
210 213
211 //-- 礼包购买 -- 214 //-- 礼包购买 --
212 GetBuyPrice: function(e) { 215 GetBuyPrice: function(e) {
  216 +
  217 + if(this.data.is_summit_ing) return false;
  218 + this.data.is_summit_ing=1;
  219 +
213 var th = this,that=th; 220 var th = this,that=th;
214 var item=th.data.details; 221 var item=th.data.details;
215 var id = item.id; //活动id 222 var id = item.id; //活动id
@@ -239,6 +246,7 @@ Page({ @@ -239,6 +246,7 @@ Page({
239 getApp().goto("/packageA/pages/libao_payment/payment?type=2"); 246 getApp().goto("/packageA/pages/libao_payment/payment?type=2");
240 },1000) 247 },1000)
241 },function (msg){ 248 },function (msg){
  249 + th.data.is_summit_ing=0;
242 getApp().my_warnning(msg, 0, th); 250 getApp().my_warnning(msg, 0, th);
243 }) 251 })
244 252
packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js
@@ -157,6 +157,11 @@ Page({ @@ -157,6 +157,11 @@ Page({
157 157
158 //----------子页返回父页触发---------- 158 //----------子页返回父页触发----------
159 onShow: function () { 159 onShow: function () {
  160 +
  161 + //富友支付取消支付强行回去
  162 + var fy=ut.fy_back("/pages/user/order_list/order_list",1);
  163 + if(fy) return false;
  164 +
160 util_pay.set_fir(); 165 util_pay.set_fir();
161 var th = this; 166 var th = this;
162 th.setData({ show_submit: 0 }); //让提交先掩藏 167 th.setData({ show_submit: 0 }); //让提交先掩藏
@@ -2838,7 +2843,7 @@ Page({ @@ -2838,7 +2843,7 @@ Page({
2838 if (cps.length > 1) { 2843 if (cps.length > 1) {
2839 wx.navigateBack({ delta: 1 }) 2844 wx.navigateBack({ delta: 1 })
2840 } else { 2845 } else {
2841 - getApp().goto("/pages/index/index/index"); 2846 + getApp().goto("/pages/user/order_list/order_list");
2842 } 2847 }
2843 2848
2844 }, 1000) 2849 }, 1000)
packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js
@@ -596,6 +596,10 @@ Page({ @@ -596,6 +596,10 @@ Page({
596 596
597 //----------子页返回父页触发---------- 597 //----------子页返回父页触发----------
598 onShow: function () { 598 onShow: function () {
  599 +
  600 + var fy=ut.fy_back('/pages/user/order_list/order_list',1);
  601 + if(fy) return false;
  602 +
599 var th = this; 603 var th = this;
600 util_pay.set_fir(); 604 util_pay.set_fir();
601 605
packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js
@@ -64,6 +64,11 @@ Page({ @@ -64,6 +64,11 @@ Page({
64 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); 64 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update");
65 }, 65 },
66 onShow: function() { 66 onShow: function() {
  67 +
  68 + var fy=ut.fy_back('/pages/user/order_list/order_list',1);
  69 + if(fy) return false;
  70 + py.set_fir();
  71 +
67 wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), 72 wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"),
68 this.requestOrderDetail(this.data.order.order_id)); 73 this.requestOrderDetail(this.data.order.order_id));
69 }, 74 },
@@ -321,6 +326,9 @@ Page({ @@ -321,6 +326,9 @@ Page({
321 326
322 } 327 }
323 328
  329 + if(this.data.paying) return false;
  330 + this.data.paying=0;
  331 +
324 var order=this.data.order; 332 var order=this.data.order;
325 var order_goods=order.order_goods; 333 var order_goods=order.order_goods;
326 var user_id=order.user_id; 334 var user_id=order.user_id;
@@ -328,8 +336,9 @@ Page({ @@ -328,8 +336,9 @@ Page({
328 336
329 337
330 py.pay(this.data.order.order_sn, function() { 338 py.pay(this.data.order.order_sn, function() {
331 - wx.showToast({title: '支付成功'})  
332 - wx.navigateBack(); 339 + th.data.paying=0;
  340 + wx.showToast({title: '支付成功'})
  341 + wx.navigateBack();
333 },null,os.stoid,1); 342 },null,os.stoid,1);
334 343
335 344
packageC/pages/payForAnother/payForAnother.js
@@ -150,6 +150,23 @@ Page({ @@ -150,6 +150,23 @@ Page({
150 150
151 //----------子页返回父页触发---------- 151 //----------子页返回父页触发----------
152 onShow: function () { 152 onShow: function () {
  153 +
  154 + util_pay.set_fir();
  155 + var fy=ut.fy_back('',0);
  156 + if(fy){
  157 + //支付失败
  158 + setTimeout(function () {
  159 + var cps=getCurrentPages();
  160 + if(cps.length>1){
  161 + wx.navigateBack({delta: 1})
  162 + }else{
  163 + getApp().goto("/pages/index/index/index");
  164 + }
  165 +
  166 + }, 1000)
  167 + return false;
  168 + }
  169 +
153 var th = this; 170 var th = this;
154 th.setData({show_submit: 0}); //让提交先掩藏 171 th.setData({show_submit: 0}); //让提交先掩藏
155 th.data.g_cart_q_time = null; 172 th.data.g_cart_q_time = null;
packageC/pages/presell/cart/cart.js
@@ -157,6 +157,11 @@ Page({ @@ -157,6 +157,11 @@ Page({
157 157
158 //----------子页返回父页触发---------- 158 //----------子页返回父页触发----------
159 onShow: function () { 159 onShow: function () {
  160 + this.data.paying=0;
  161 +
  162 + var fy= ut.fy_back("/pages/user/order_list/order_list",1);
  163 + if(fy) return false;
  164 +
160 util_pay.set_fir(); 165 util_pay.set_fir();
161 var th = this; 166 var th = this;
162 th.setData({ show_submit: 0 }); //让提交先掩藏 167 th.setData({ show_submit: 0 }); //让提交先掩藏
@@ -2853,6 +2858,9 @@ Page({ @@ -2853,6 +2858,9 @@ Page({
2853 2858
2854 } 2859 }
2855 2860
  2861 + if(this.data.paying) return false;
  2862 + this.data.paying=1;
  2863 +
2856 /*--- 2864 /*---
2857 o.jumpToCart4({ 2865 o.jumpToCart4({
2858 order_sn: this.data.order.order_sn, 2866 order_sn: this.data.order.order_sn,
packageC/pages/presell/cart/cart2.js
@@ -160,6 +160,18 @@ Page({ @@ -160,6 +160,18 @@ Page({
160 //----------子页返回父页触发---------- 160 //----------子页返回父页触发----------
161 onShow: function () { 161 onShow: function () {
162 var th = this; 162 var th = this;
  163 + var fy= ut.fy_back('',0,function (){
  164 + var cps = getCurrentPages();
  165 + if (cps.length > 1) {
  166 + wx.navigateBack({ delta: 1 })
  167 + } else {
  168 + getApp().goto("/pages/index/index/index");
  169 + }
  170 +
  171 + })
  172 + if(fy) return false;
  173 +
  174 +
163 util_pay.set_fir(); 175 util_pay.set_fir();
164 th.data.g_cart_q_time = null; 176 th.data.g_cart_q_time = null;
165 if (th.data.isclose == 0) { 177 if (th.data.isclose == 0) {
packageC/pages/presell/cart/cart2_pre.js
@@ -251,6 +251,10 @@ Page({ @@ -251,6 +251,10 @@ Page({
251 251
252 //----------子页返回父页触发---------- 252 //----------子页返回父页触发----------
253 onShow: function () { 253 onShow: function () {
  254 +
  255 + var fy=ut.fy_back("/pages/user/order_list/order_list",1);
  256 + if(fy) return false;
  257 +
254 util_pay.set_fir(); 258 util_pay.set_fir();
255 var th = this; 259 var th = this;
256 if (th.data.isclose == 0) { 260 if (th.data.isclose == 0) {
packageD/pages/shop/order_detail/order_detail.js
@@ -30,6 +30,10 @@ Page({ @@ -30,6 +30,10 @@ Page({
30 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); 30 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update");
31 }, 31 },
32 onShow: function() { 32 onShow: function() {
  33 + this.setData({paying:0});
  34 + ut.fy_back('',0);
  35 + py.set_fir();
  36 +
33 wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), 37 wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"),
34 this.requestOrderDetail(this.data.order.order_id)); 38 this.requestOrderDetail(this.data.order.order_id));
35 }, 39 },
packageD/pages/user/deposit/prepaid/prepaid.js
@@ -12,7 +12,8 @@ Page({ @@ -12,7 +12,8 @@ Page({
12 data: { 12 data: {
13 iurl: o.imghost, 13 iurl: o.imghost,
14 showModal: false, //弹框控制器 14 showModal: false, //弹框控制器
15 - perpaid: [], //数据 15 + perpaid: [], //数据,
  16 + paying:0
16 }, 17 },
17 /* 生命周期函数--监听页面初次渲染完成*/ 18 /* 生命周期函数--监听页面初次渲染完成*/
18 onReady: function() { 19 onReady: function() {
@@ -94,10 +95,16 @@ Page({ @@ -94,10 +95,16 @@ Page({
94 * 生命周期函数--监听页面显示 95 * 生命周期函数--监听页面显示
95 */ 96 */
96 onShow: function () { 97 onShow: function () {
97 - wx.setNavigationBarTitle({  
98 - title: "流动资金转预存",  
99 - })  
100 - t_pay.set_fir(); 98 +
  99 +
  100 +
  101 + wx.setNavigationBarTitle({
  102 + title: "流动资金转预存",
  103 + })
  104 +
  105 + this.data.paying=0;
  106 + ut.fy_back('',0)
  107 + t_pay.set_fir();
101 108
102 if(getApp().globalData.user_id && !this.data.is_get){ 109 if(getApp().globalData.user_id && !this.data.is_get){
103 this.yuck(); 110 this.yuck();
@@ -106,6 +113,9 @@ Page({ @@ -106,6 +113,9 @@ Page({
106 }, 113 },
107 //确定充值 114 //确定充值
108 determine: function(e) { 115 determine: function(e) {
  116 + if(this.data.paying) return false;
  117 + this.data.paying=1;
  118 +
109 var th=this; 119 var th=this;
110 this.setData({ 120 this.setData({
111 showModal: false 121 showModal: false
@@ -122,6 +132,8 @@ Page({ @@ -122,6 +132,8 @@ Page({
122 }, 132 },
123 //确定接口 133 //确定接口
124 async recharge(money, advancek) { 134 async recharge(money, advancek) {
  135 +
  136 +
125 console.log(money, "有进来吗银行卡", advancek); 137 console.log(money, "有进来吗银行卡", advancek);
126 var user_id = getApp().globalData.user_id; 138 var user_id = getApp().globalData.user_id;
127 var store_id = os.stoid; 139 var store_id = os.stoid;
@@ -164,6 +176,8 @@ Page({ @@ -164,6 +176,8 @@ Page({
164 }, function () { 176 }, function () {
165 e.jumpPaymentPage(); 177 e.jumpPaymentPage();
166 }, function (e) { 178 }, function (e) {
  179 +
  180 + this.data.paying=0;
167 wx.showToast({ 181 wx.showToast({
168 title: e, 182 title: e,
169 icon: 'none', 183 icon: 'none',
packageD/pages/user/integral/integral.js
@@ -234,6 +234,10 @@ Page({ @@ -234,6 +234,10 @@ Page({
234 234
235 //点击确定 235 //点击确定
236 determine(event) { 236 determine(event) {
  237 +
  238 + if(this.data.paying) return false;
  239 + this.data.paying=1;
  240 +
237 console.log(event.currentTarget.dataset.money); 241 console.log(event.currentTarget.dataset.money);
238 var money = event.currentTarget.dataset.money; 242 var money = event.currentTarget.dataset.money;
239 var integral = event.currentTarget.dataset.integral; 243 var integral = event.currentTarget.dataset.integral;
@@ -260,6 +264,7 @@ Page({ @@ -260,6 +264,7 @@ Page({
260 }, function () { 264 }, function () {
261 th.jumpPaymentPage(); 265 th.jumpPaymentPage();
262 }, function (e) { 266 }, function (e) {
  267 + th.data.paying=0;
263 wx.showToast({ 268 wx.showToast({
264 title: e, 269 title: e,
265 icon: 'none', 270 icon: 'none',
@@ -325,6 +330,9 @@ Page({ @@ -325,6 +330,9 @@ Page({
325 * 生命周期函数--监听页面显示 330 * 生命周期函数--监听页面显示
326 */ 331 */
327 onShow: function () { 332 onShow: function () {
  333 +
  334 + ut.fy_back('',0);
  335 + this.data.paying=0;
328 t_pay.set_fir(); 336 t_pay.set_fir();
329 getApp().check_can_share(); 337 getApp().check_can_share();
330 //--先判断会员状态-- 338 //--先判断会员状态--
packageE/pages/cart/cart2/cart2.js
@@ -201,15 +201,12 @@ Page({ @@ -201,15 +201,12 @@ Page({
201 201
202 //----------子页返回父页触发---------- 202 //----------子页返回父页触发----------
203 onShow: function () { 203 onShow: function () {
204 -  
205 - if(getApp().globalData.fuiou_pay){  
206 - getApp().globalData.fuiou_pay=0;  
207 - getApp().goto('pages/index/index/index');  
208 - return false;  
209 - }  
210 - 204 + //富友支付取消支付强行回去
  205 + var fy=ut.fy_back("/pages/user/order_list/order_list",1);
  206 + if(fy) return false;
211 207
212 util_pay.set_fir(); 208 util_pay.set_fir();
  209 +
213 var th = this; 210 var th = this;
214 th.data.g_cart_q_time = null; 211 th.data.g_cart_q_time = null;
215 212
@@ -4515,6 +4512,8 @@ Page({ @@ -4515,6 +4512,8 @@ Page({
4515 // order_sn: data.data, 4512 // order_sn: data.data,
4516 //}, 1); 4513 //}, 1);
4517 4514
  4515 +
  4516 +
4518 util_pay.pay(data.data, async function () { 4517 util_pay.pay(data.data, async function () {
4519 //app.my_warnning("支付成功",1,th); 4518 //app.my_warnning("支付成功",1,th);
4520 //setTimeout(function () { 4519 //setTimeout(function () {
packageE/pages/user/cardinfo/cardinfo.js
@@ -682,6 +682,8 @@ Page({ @@ -682,6 +682,8 @@ Page({
682 * 生命周期函数--监听页面显示 682 * 生命周期函数--监听页面显示
683 */ 683 */
684 onShow: function () { 684 onShow: function () {
  685 + this.data.paying=0;
  686 + ut.fy_back('',0);
685 t_pay.set_fir(); 687 t_pay.set_fir();
686 //同步初始化 688 //同步初始化
687 this.init(); 689 this.init();
@@ -745,7 +747,10 @@ Page({ @@ -745,7 +747,10 @@ Page({
745 747
746 748
747 //-----立即续费的功能------ 749 //-----立即续费的功能------
748 - xufei:async function(){ 750 + xufei:async function(){
  751 +
  752 +
  753 +
749 var th = this,is_card = 0,end_time=0; 754 var th = this,is_card = 0,end_time=0;
750 await getApp().request.promiseGet("/store/storemoduleendtime/page?store_id="+os.stoid+"&type=3", 755 await getApp().request.promiseGet("/store/storemoduleendtime/page?store_id="+os.stoid+"&type=3",
751 {1:1}).then(res => { 756 {1:1}).then(res => {
@@ -781,14 +786,20 @@ Page({ @@ -781,14 +786,20 @@ Page({
781 return false; 786 return false;
782 } 787 }
783 788
  789 + if(this.data.paying) return false;
  790 + this.data.paying=1;
  791 +
  792 +
784 var item = th.data.user_card; 793 var item = th.data.user_card;
785 var req = {}; 794 var req = {};
786 req.cardId = item.CardId; 795 req.cardId = item.CardId;
787 req.rechargeType = 4; 796 req.rechargeType = 4;
788 //如果不是你导购,也不是等级会员分享 797 //如果不是你导购,也不是等级会员分享
789 req.storeId = os.stoid; 798 req.storeId = os.stoid;
790 - req.userId = getApp().globalData.user_id;  
791 - t_pay.pay(req, th.success, function () { 799 + req.userId = getApp().globalData.user_id;
  800 + t_pay.set_pay_url('/api/weshop/plus/create/plus/order');
  801 + t_pay.pay(req, th.success, function (e) {
  802 + th.data.paying=0;
792 getApp().my_warnning("支付失败", 0, th); 803 getApp().my_warnning("支付失败", 0, th);
793 }); 804 });
794 805
@@ -796,6 +807,7 @@ Page({ @@ -796,6 +807,7 @@ Page({
796 807
797 //--支付成功,跳转到等级卡续费页面-- 808 //--支付成功,跳转到等级卡续费页面--
798 success:function (ind) { 809 success:function (ind) {
  810 + this.data.paying=0;
799 if(ind==1){ 811 if(ind==1){
800 getApp().my_warnning("升级成功",0,this); 812 getApp().my_warnning("升级成功",0,this);
801 }else{ 813 }else{
@@ -845,6 +857,9 @@ Page({ @@ -845,6 +857,9 @@ Page({
845 }, 857 },
846 858
847 sure_pay:function () { 859 sure_pay:function () {
  860 + if(this.data.paying) return false;
  861 + this.data.paying=1;
  862 +
848 var th=this; 863 var th=this;
849 var req = {}; 864 var req = {};
850 req.cardId = th.data.s_card_id; 865 req.cardId = th.data.s_card_id;
@@ -853,7 +868,9 @@ Page({ @@ -853,7 +868,9 @@ Page({
853 req.storeId = os.stoid; 868 req.storeId = os.stoid;
854 req.oldCardId=th.data.user_card.CardId; 869 req.oldCardId=th.data.user_card.CardId;
855 req.userId = getApp().globalData.user_id; 870 req.userId = getApp().globalData.user_id;
  871 + t_pay.set_pay_url('/api/weshop/plus/create/plus/order');
856 t_pay.pay(req, th.success, function () { 872 t_pay.pay(req, th.success, function () {
  873 + th.data.paying=0;
857 getApp().my_warnning("支付失败", 0, th); 874 getApp().my_warnning("支付失败", 0, th);
858 }); 875 });
859 }, 876 },
packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js
@@ -139,6 +139,22 @@ Page({ @@ -139,6 +139,22 @@ Page({
139 this.getList(); 139 this.getList();
140 }, 140 },
141 onShow: function () { 141 onShow: function () {
  142 + var th=this;
  143 + this.setData({submit:0})
  144 + i.fy_back('',0,function (){
  145 +
  146 + console.log(getApp().globalData.py_month_bg,'111111');
  147 + console.log(th.data.back_ord,'22222');
  148 +
  149 + if(getApp().globalData.py_month_bg && th.data.back_ord){
  150 + var b_ord=th.data.back_ord;
  151 + com.reduce(b_ord,os.stoid);
  152 + //要进行清空粗粒
  153 + getApp().globalData.py_month_bg=0;
  154 + th.data.back_ord=null;
  155 +
  156 + }
  157 + })
142 com.set_py_fir(); 158 com.set_py_fir();
143 getApp().check_can_share(); 159 getApp().check_can_share();
144 var th=this; 160 var th=this;
@@ -178,6 +194,9 @@ Page({ @@ -178,6 +194,9 @@ Page({
178 openSpecModal:1 194 openSpecModal:1
179 }) 195 })
180 }else{ 196 }else{
  197 +
  198 + if(this.data.submit) return false;
  199 +
181 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 200 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
182 my_confirm.open( 201 my_confirm.open(
183 "是否确定购买该礼包", 202 "是否确定购买该礼包",
packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js
@@ -5,6 +5,7 @@ var e = getApp(), @@ -5,6 +5,7 @@ var e = getApp(),
5 d = e.globalData; 5 d = e.globalData;
6 var ut = require("../../../../../utils/util.js"); 6 var ut = require("../../../../../utils/util.js");
7 var com = require("../public/buy_com.js"); 7 var com = require("../public/buy_com.js");
  8 +const i = require("../../../../../utils/util.js");
8 9
9 Page({ 10 Page({
10 data: { 11 data: {
@@ -198,6 +199,18 @@ Page({ @@ -198,6 +199,18 @@ Page({
198 }, 199 },
199 200
200 onShow: function () { 201 onShow: function () {
  202 + var th=this;
  203 + this.setData({submit:0})
  204 + ut.fy_back('',0,function (){
  205 + if(getApp().globalData.py_month_bg && th.data.back_ord){
  206 + var b_ord=th.data.back_ord;
  207 + com.reduce(b_ord,os.stoid);
  208 + //要进行清空粗粒
  209 + getApp().globalData.py_month_bg=0;
  210 + th.data.back_ord=null;
  211 +
  212 + }
  213 + })
201 com.set_py_fir(); 214 com.set_py_fir();
202 getApp().check_can_share(); 215 getApp().check_can_share();
203 getApp().is_Single_page(this, function () { 216 getApp().is_Single_page(this, function () {
@@ -226,6 +239,8 @@ Page({ @@ -226,6 +239,8 @@ Page({
226 openSpecModal: 1 239 openSpecModal: 1
227 }) 240 })
228 } else { 241 } else {
  242 +
  243 + if(this.data.submit) return false;
229 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 244 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
230 my_confirm.open( 245 my_confirm.open(
231 "是否确定购买该礼包", 246 "是否确定购买该礼包",
packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js
@@ -173,6 +173,18 @@ Page({ @@ -173,6 +173,18 @@ Page({
173 }, 173 },
174 174
175 onShow: function () { 175 onShow: function () {
  176 + var th=this;
  177 + this.setData({submit:0})
  178 + ut.fy_back('',0,function (){
  179 + if(getApp().globalData.py_month_bg && th.data.back_ord){
  180 + var b_ord=th.data.back_ord;
  181 + com.reduce(b_ord,os.stoid);
  182 + //要进行清空粗粒
  183 + getApp().globalData.py_month_bg=0;
  184 + th.data.back_ord=null;
  185 + }
  186 + });
  187 +
176 com.set_py_fir(); 188 com.set_py_fir();
177 getApp().check_can_share(); 189 getApp().check_can_share();
178 getApp().is_Single_page(this, function () { 190 getApp().is_Single_page(this, function () {
@@ -201,6 +213,10 @@ Page({ @@ -201,6 +213,10 @@ Page({
201 openSpecModal: 1 213 openSpecModal: 1
202 }) 214 })
203 } else { 215 } else {
  216 +
  217 + if(this.data.submit) return false;
  218 + this.setData({submit:1})
  219 +
204 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 220 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
205 my_confirm.open( 221 my_confirm.open(
206 "是否确定购买该礼包", 222 "是否确定购买该礼包",
@@ -234,6 +250,8 @@ Page({ @@ -234,6 +250,8 @@ Page({
234 openSpecModal: 1 250 openSpecModal: 1
235 }) 251 })
236 } else { 252 } else {
  253 +
  254 + if(this.data.submit) return false;
237 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 255 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
238 my_confirm.open( 256 my_confirm.open(
239 "是否确定兑换该礼包", 257 "是否确定兑换该礼包",
packageE/pages/user/monthgiftbag/public/buy_com.js
@@ -215,7 +215,9 @@ module.exports = { @@ -215,7 +215,9 @@ module.exports = {
215 } 215 }
216 } 216 }
217 217
  218 + if(th.data.submit) return false;
218 th.setData({submit:1}) 219 th.setData({submit:1})
  220 +
219 var id=th.data.sele_g.id; 221 var id=th.data.sele_g.id;
220 var that=th; 222 var that=th;
221 var json = { 223 var json = {
@@ -257,11 +259,15 @@ module.exports = { @@ -257,11 +259,15 @@ module.exports = {
257 break; 259 break;
258 case 2://立即购买 260 case 2://立即购买
259 var order_sn = res.data.data.orderSn; 261 var order_sn = res.data.data.orderSn;
  262 + th.data.back_ord=order_sn;
260 //res = res.data.data.result; 263 //res = res.data.data.result;
261 //if (!res) return false; 264 //if (!res) return false;
262 var money=that.data.payMoney; 265 var money=that.data.payMoney;
263 var url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + order_sn; 266 var url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + order_sn;
  267 +
264 getApp().globalData.no_clear=1; 268 getApp().globalData.no_clear=1;
  269 + getApp().globalData.py_month_bg=1;
  270 +
265 271
266 t_pay.pay_data(res,function (){ 272 t_pay.pay_data(res,function (){
267 th.setData({submit:0}) 273 th.setData({submit:0})
pages/cart/cart2_inte/cart2_inte.js
@@ -161,6 +161,20 @@ Page({ @@ -161,6 +161,20 @@ Page({
161 161
162 //----------子页返回父页触发---------- 162 //----------子页返回父页触发----------
163 onShow: function () { 163 onShow: function () {
  164 +
  165 + var fy=ut.fy_back('',1,function (){
  166 + var cps = getCurrentPages();
  167 + if (cps.length > 1) {
  168 + wx.navigateBack({ delta: 1 })
  169 + } else {
  170 + getApp().goto("/pages/index/index/index");
  171 + }
  172 + });
  173 +
  174 + if(fy) return false;
  175 +
  176 + util_pay.set_fir();
  177 +
164 var th = this; 178 var th = this;
165 th.data.g_cart_q_time = null; 179 th.data.g_cart_q_time = null;
166 180
pages/cart/cart2_pt/cart2_pt.js
@@ -532,6 +532,12 @@ Page({ @@ -532,6 +532,12 @@ Page({
532 532
533 //----------子页返回父页触发---------- 533 //----------子页返回父页触发----------
534 onShow: function () { 534 onShow: function () {
  535 +
  536 + var fy=ut.fy_back("/pages/user/order_list/order_list",1);
  537 + if(fy) return false;
  538 +
  539 + util_pay.set_fir();
  540 +
535 var th = this; 541 var th = this;
536 if (th.data.isclose == 0) { 542 if (th.data.isclose == 0) {
537 wx.navigateTo({ 543 wx.navigateTo({
pages/cart/cart_wk/cart_wk.js
@@ -87,6 +87,9 @@ Page({ @@ -87,6 +87,9 @@ Page({
87 * 生命周期函数--监听页面显示 87 * 生命周期函数--监听页面显示
88 */ 88 */
89 onShow: function () { 89 onShow: function () {
  90 +
  91 + ut.fy_back('',0);
  92 + this.data.paying=0;
90 util_pay.set_fir(); 93 util_pay.set_fir();
91 getApp().check_can_share(); 94 getApp().check_can_share();
92 var th = this; 95 var th = this;
pages/giftpack/buygiftpack/giftpackbuy.js
@@ -139,6 +139,9 @@ Page({ @@ -139,6 +139,9 @@ Page({
139 this.getList(); 139 this.getList();
140 }, 140 },
141 onShow: function () { 141 onShow: function () {
  142 +
  143 + this.setData({submit:0})
  144 + i.fy_back('',0);
142 com.set_py_fir(); 145 com.set_py_fir();
143 getApp().check_can_share(); 146 getApp().check_can_share();
144 var th=this; 147 var th=this;
@@ -158,6 +161,11 @@ Page({ @@ -158,6 +161,11 @@ Page({
158 161
159 }) 162 })
160 this.init(); 163 this.init();
  164 +
  165 + setTimeout(()=>{
  166 + var my_confirm = th.selectComponent("#my_confirm"); //组件的id
  167 + },2000)
  168 +
161 }, 169 },
162 170
163 //购买礼包 171 //购买礼包
@@ -178,6 +186,9 @@ Page({ @@ -178,6 +186,9 @@ Page({
178 openSpecModal:1 186 openSpecModal:1
179 }) 187 })
180 }else{ 188 }else{
  189 +
  190 + if(this.data.submit) return false;
  191 +
181 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 192 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
182 my_confirm.open( 193 my_confirm.open(
183 "是否确定购买该礼包", 194 "是否确定购买该礼包",
@@ -214,6 +225,9 @@ Page({ @@ -214,6 +225,9 @@ Page({
214 openSpecModal:1 225 openSpecModal:1
215 }) 226 })
216 }else { 227 }else {
  228 +
  229 + if(this.data.submit) return false;
  230 +
217 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 231 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
218 my_confirm.open( 232 my_confirm.open(
219 "是否确定兑换该礼包", 233 "是否确定兑换该礼包",
@@ -246,7 +260,7 @@ Page({ @@ -246,7 +260,7 @@ Page({
246 openSpecModal:1 260 openSpecModal:1
247 }) 261 })
248 }else { 262 }else {
249 - 263 + if(this.data.submit) return false;
250 264
251 var my_confirm = th.selectComponent("#my_confirm"); //组件的id 265 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
252 my_confirm.open( 266 my_confirm.open(
pages/giftpack/giftpacklist/giftpacklist.js
@@ -74,7 +74,8 @@ Page({ @@ -74,7 +74,8 @@ Page({
74 giftImageCover:null, 74 giftImageCover:null,
75 canvasHidden:true, 75 canvasHidden:true,
76 76
77 - screenWidth: 0 77 + screenWidth: 0,
  78 + submit:0
78 }, 79 },
79 onLoad: function (options) { 80 onLoad: function (options) {
80 81
@@ -165,6 +166,8 @@ Page({ @@ -165,6 +166,8 @@ Page({
165 }, 166 },
166 167
167 onShow: function () { 168 onShow: function () {
  169 + this.setData({submit:0})
  170 + ut.fy_back('',0);
168 com.set_py_fir(); 171 com.set_py_fir();
169 getApp().check_can_share(); 172 getApp().check_can_share();
170 getApp().is_Single_page(this, function () { 173 getApp().is_Single_page(this, function () {
@@ -176,6 +179,7 @@ Page({ @@ -176,6 +179,7 @@ Page({
176 } 179 }
177 this.init(); 180 this.init();
178 }) 181 })
  182 + th.setData({ submit:0})
179 }, 183 },
180 GetBuyPrice: function (e) { 184 GetBuyPrice: function (e) {
181 var that = this.data; 185 var that = this.data;
@@ -186,6 +190,10 @@ Page({ @@ -186,6 +190,10 @@ Page({
186 return false; 190 return false;
187 } 191 }
188 192
  193 + if(th.data.submit) return false;
  194 + th.setData({submit:1})
  195 +
  196 +
189 this.data.payMoney = th.data.sele_g.payMoney; 197 this.data.payMoney = th.data.sele_g.payMoney;
190 th.setData({buyType: 2}) 198 th.setData({buyType: 2})
191 if (th.data.sele_g.is_pickup) { 199 if (th.data.sele_g.is_pickup) {
pages/user/order_detail/order_detail.js
@@ -64,6 +64,8 @@ Page({ @@ -64,6 +64,8 @@ Page({
64 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); 64 }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update");
65 }, 65 },
66 onShow: function() { 66 onShow: function() {
  67 + ut.fy_back('',0)
  68 + this.setData({paying:0});
67 py.set_fir(); 69 py.set_fir();
68 wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), 70 wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"),
69 this.requestOrderDetail(this.data.order.order_id)); 71 this.requestOrderDetail(this.data.order.order_id));
pages/user/order_list/order_list.js
@@ -76,6 +76,8 @@ Page({ @@ -76,6 +76,8 @@ Page({
76 cardList: [], 76 cardList: [],
77 // 搜索内容 77 // 搜索内容
78 searchContent: '', 78 searchContent: '',
  79 +
  80 + ser_paying:0,
79 }, 81 },
80 onLoad: function (t) { 82 onLoad: function (t) {
81 83
@@ -109,6 +111,12 @@ Page({ @@ -109,6 +111,12 @@ Page({
109 s.init(this, "", "orderList"); 111 s.init(this, "", "orderList");
110 }, 112 },
111 onShow: function () { 113 onShow: function () {
  114 +
  115 +
  116 + ut.fy_back('',0)
  117 + this.setData({ paying: 0 });
  118 + this.data.ser_paying=0;
  119 +
112 t_pay.set_fir(); 120 t_pay.set_fir();
113 t.set_fir(); 121 t.set_fir();
114 122
@@ -2594,6 +2602,9 @@ Page({ @@ -2594,6 +2602,9 @@ Page({
2594 2602
2595 }; 2603 };
2596 2604
  2605 + if(th.data.ser_paying) return false;
  2606 + th.data.ser_paying=1;
  2607 +
2597 2608
2598 if (flag) { 2609 if (flag) {
2599 2610
@@ -2602,12 +2613,14 @@ Page({ @@ -2602,12 +2613,14 @@ Page({
2602 parentSn: order_sn, 2613 parentSn: order_sn,
2603 store_id: store_id 2614 store_id: store_id
2604 }, function () { 2615 }, function () {
  2616 + th.data.ser_paying=0;
2605 wx.showToast({ 2617 wx.showToast({
2606 title: '支付成功', 2618 title: '支付成功',
2607 icon:'success', 2619 icon:'success',
2608 duration: 2000 2620 duration: 2000
2609 }); 2621 });
2610 }, function (e) { 2622 }, function (e) {
  2623 + th.data.ser_paying=0;
2611 wx.showToast({ 2624 wx.showToast({
2612 title: e, 2625 title: e,
2613 icon: 'none', 2626 icon: 'none',
pages/user/plus/plus.js
@@ -127,7 +127,12 @@ Page({ @@ -127,7 +127,12 @@ Page({
127 onShow: function () { 127 onShow: function () {
128 var user_info = getApp().globalData.userInfo; 128 var user_info = getApp().globalData.userInfo;
129 if (!user_info) return false; 129 if (!user_info) return false;
  130 + ut.fy_back('',0);
130 131
  132 + th.setData({
  133 + is_select:0,
  134 + focus:true,
  135 + })
131 t_pay.set_fir(); 136 t_pay.set_fir();
132 137
133 var th = this, 138 var th = this,
@@ -459,6 +464,7 @@ Page({ @@ -459,6 +464,7 @@ Page({
459 // } 464 // }
460 // }) 465 // })
461 } else { 466 } else {
  467 + t_pay.set_pay_url('/api/weshop/plus/create/plus/order');
462 t_pay.pay(req, th.success, function () { 468 t_pay.pay(req, th.success, function () {
463 getApp().my_warnning("支付失败", 0, th); 469 getApp().my_warnning("支付失败", 0, th);
464 th.setData({ 470 th.setData({
@@ -492,6 +498,7 @@ Page({ @@ -492,6 +498,7 @@ Page({
492 staffNo_arr: res.data.data 498 staffNo_arr: res.data.data
493 }) 499 })
494 }else{ 500 }else{
  501 + t_pay.set_pay_url('/api/weshop/plus/create/plus/order');
495 t_pay.pay(req, th.success, function () { 502 t_pay.pay(req, th.success, function () {
496 getApp().my_warnning("支付失败", 0, th); 503 getApp().my_warnning("支付失败", 0, th);
497 th.setData({ 504 th.setData({
@@ -522,7 +529,14 @@ Page({ @@ -522,7 +529,14 @@ Page({
522 //--支付成功,跳转到等级卡续费页面-- 529 //--支付成功,跳转到等级卡续费页面--
523 success: function () { 530 success: function () {
524 //调一次就不再调用了 531 //调一次就不再调用了
525 - if (getApp().globalData.is_card_back) return false; 532 + if (getApp().globalData.is_card_back){
  533 + th.setData({
  534 + is_select:0,
  535 + focus:true,
  536 + })
  537 + return false;
  538 +
  539 + }
526 if (getApp().globalData.plus_buy_back) { 540 if (getApp().globalData.plus_buy_back) {
527 //值在这里换 541 //值在这里换
528 getApp().globalData.is_card_back = 1; 542 getApp().globalData.is_card_back = 1;
utils/pay2.js
@@ -27,6 +27,7 @@ module.exports = { @@ -27,6 +27,7 @@ module.exports = {
27 if(t.data.data.is_fuioupay){ 27 if(t.data.data.is_fuioupay){
28 const plugin = requirePlugin('fuiou-pay') 28 const plugin = requirePlugin('fuiou-pay')
29 getApp().globalData.no_clear=1; 29 getApp().globalData.no_clear=1;
  30 + getApp().globalData.fuiou_pay=1;
30 31
31 var paramsJson={ 32 var paramsJson={
32 reqType:"11",//必填 01-商户模式,11-机构模式 33 reqType:"11",//必填 01-商户模式,11-机构模式
@@ -35,6 +36,7 @@ module.exports = { @@ -35,6 +36,7 @@ module.exports = {
35 console.log(plugin, plugin.fuioupay) 36 console.log(plugin, plugin.fuioupay)
36 plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){ 37 plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){
37 console.log(res); 38 console.log(res);
  39 + getApp().globalData.fuiou_pay=0;
38 i.wx_paying=0; 40 i.wx_paying=0;
39 "function" == typeof succ && succ(); 41 "function" == typeof succ && succ();
40 },function (error){ 42 },function (error){
@@ -42,6 +44,7 @@ module.exports = { @@ -42,6 +44,7 @@ module.exports = {
42 //支付失败的时候 44 //支付失败的时候
43 //getApp().confirmBox(error.code+error.message); 45 //getApp().confirmBox(error.code+error.message);
44 var msg='取消支付'; 46 var msg='取消支付';
  47 + getApp().globalData.fuiou_pay=0;
45 if(error.code){ 48 if(error.code){
46 msg=error.code+":"+error.message; 49 msg=error.code+":"+error.message;
47 } 50 }
@@ -88,12 +91,17 @@ module.exports = { @@ -88,12 +91,17 @@ module.exports = {
88 reqData:ob.reqData,//必填 富友加密参数 91 reqData:ob.reqData,//必填 富友加密参数
89 } 92 }
90 getApp().globalData.no_clear=1; 93 getApp().globalData.no_clear=1;
  94 + getApp().globalData.fuiou_pay=1;
  95 +
  96 +
91 console.log(plugin, plugin.fuioupay) 97 console.log(plugin, plugin.fuioupay)
92 plugin.fuioupay(parseInt(ob.amt),paramsJson,function (res){ 98 plugin.fuioupay(parseInt(ob.amt),paramsJson,function (res){
  99 + getApp().globalData.fuiou_pay=0;
93 console.log(res); 100 console.log(res);
94 th.wx_paying=0; 101 th.wx_paying=0;
95 "function" == typeof succ && succ(); 102 "function" == typeof succ && succ();
96 },function (error){ 103 },function (error){
  104 + getApp().globalData.fuiou_pay=0;
97 th.wx_paying=0; 105 th.wx_paying=0;
98 console.log("插件支付错误",error); 106 console.log("插件支付错误",error);
99 //支付失败的时候 107 //支付失败的时候
utils/util.js
@@ -763,6 +763,43 @@ module.exports = { @@ -763,6 +763,43 @@ module.exports = {
763 }) 763 })
764 }, 764 },
765 765
  766 + //是不是富友的返回
  767 + fy_back(url,is_need_back,func){
  768 + var fy=getApp().globalData.fuiou_pay;
  769 + console.log('cart2-show:'+fy);
  770 + if(fy){
  771 + getApp().globalData.fuiou_pay=0;
  772 + wx.showToast({
  773 + title:'取消支付',
  774 + icon:'none',
  775 + duration:2500
  776 + })
  777 +
  778 + if(is_need_back){
  779 + if(url){
  780 + setTimeout(()=>{
  781 + getApp().goto(url);
  782 + },2000);
  783 + }else{
  784 + if(func) {
  785 + func();
  786 + }else{
  787 + //支付失败
  788 + setTimeout(function () {
  789 + wx.navigateBack({ delta: 1 })
  790 + }, 1000)
  791 + }
  792 + }
  793 + }else{
  794 + if(func) func();
  795 + }
  796 + return true ;
  797 +
  798 + }
  799 + return false
  800 + },
  801 +
  802 +
766 unserialize: unserialize, 803 unserialize: unserialize,
767 _throttle:_throttle, 804 _throttle:_throttle,
768 unserialize_o: unserialize_o, 805 unserialize_o: unserialize_o,