diff --git a/packageA/pages/cart2_ser/cart2_ser.js b/packageA/pages/cart2_ser/cart2_ser.js index 5911661..e8cce1e 100644 --- a/packageA/pages/cart2_ser/cart2_ser.js +++ b/packageA/pages/cart2_ser/cart2_ser.js @@ -274,6 +274,9 @@ Page({ //----------子页返回父页触发---------- onShow: function() { + var fy=s.fy_back("/pages/user/order_list/order_list?index=2&tabindex=1",1); + if(fy) return false; + t_pay.set_fir(); var th = this; if (th.data.isclose == 0) { @@ -641,6 +644,13 @@ Page({ icon: 'none', duration: 2000 }); + + setTimeout(function () { + wx.reLaunch({ + url: "/pages/user/order_list/order_list?index=2&tabindex=1", + }) + }, 1000) + } ) diff --git a/packageA/pages/chongzhiDetails/chongzhiDetails.js b/packageA/pages/chongzhiDetails/chongzhiDetails.js index bf0cc7d..05ae07f 100644 --- a/packageA/pages/chongzhiDetails/chongzhiDetails.js +++ b/packageA/pages/chongzhiDetails/chongzhiDetails.js @@ -106,6 +106,8 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + this.data.is_buying=0; + util.fy_back('',0) t_pay.set_fir(); getApp().check_can_share(); }, @@ -167,7 +169,7 @@ Page({ var recharge_type = 6; var buynum = 1; console.log(money, "有进来吗预存劵", advancek, user_id, store_id ); - var e = this, + var e = this,th=this, perpaid = ""; await getApp().request.promiseGet("/api/weshop/users/getPay", { data: { @@ -196,8 +198,10 @@ Page({ parentSn: parentSn, store_id: store_id }, function () { + th.data.is_buying=0; e.jumpPaymentPage(); }, function (e) { + th.data.is_buying=0; wx.showToast({ title: e, icon: 'none', diff --git a/packageA/pages/details_serviceCard/details_serviceCard.js b/packageA/pages/details_serviceCard/details_serviceCard.js index 9ac31d0..d8ea6ed 100644 --- a/packageA/pages/details_serviceCard/details_serviceCard.js +++ b/packageA/pages/details_serviceCard/details_serviceCard.js @@ -3,6 +3,7 @@ var t_pay = require("../../../utils/pay2.js"); const app = getApp(); const os = app.globalData.setting; let self = null; +var util = require('../../../utils/util.js'); Page({ @@ -44,6 +45,8 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function() { + this.data.is_summit_ing=0; + util.fy_back('',0) t_pay.set_fir(); getApp().check_can_share(); if (app.globalData.userInfo) { @@ -497,6 +500,11 @@ Page({ // 立即支付 pay() { + + if(this.data.is_summit_ing) return false; + this.data.is_summit_ing=1; + + var th=this; let order_sn = this.data.details.order_sn; let order_id = this.data.details.order_id; let store_id = app.globalData.setting.stoid; @@ -513,6 +521,7 @@ Page({ }, 1000) }, function (e) { + th.data.is_summit_ing=0; wx.showToast({ title: e, icon: 'none', diff --git a/packageA/pages/myGift/myGift.js b/packageA/pages/myGift/myGift.js index 5e4c444..26eb1cc 100644 --- a/packageA/pages/myGift/myGift.js +++ b/packageA/pages/myGift/myGift.js @@ -3,6 +3,7 @@ const app = getApp(); let self = null; var os = app.globalData.setting; var t_pay = require("../../../utils/pay2.js"); +var util = require('../../../utils/util.js'); Page({ @@ -18,6 +19,7 @@ Page({ noMore: false, // 检测是否有更多数据,true为没有更多数据,false为还有数据 pageNum: 1, // 当前页数 iurl: os.imghost, //图片前缀网址 + is_summit_ing:0 //是不是提交申请 }, clickTab(e) { @@ -89,6 +91,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + + util.fy_back('',0) + this.data.is_summit_ing=0; t_pay.set_fir(); getApp().check_can_share(); if(app.globalData.userInfo) { @@ -275,6 +280,10 @@ Page({ var my_confirm = th.selectComponent("#my_confirm"); //组件的id var user=getApp().globalData.userInfo; + + if(this.data.is_summit_ing) return false; + this.data.is_summit_ing=0; + my_confirm.open( "是否确定购买该礼包", "取消", @@ -292,8 +301,10 @@ Page({ }; t_pay.set_pay_url("/api/weshop/libao/libaoFormvip/libaoOrder"); t_pay.pay(json,function (){ + th.data.is_summit_ing=0; getApp().my_warnning("支付成功", 1, th); },function (e){ + th.data.is_summit_ing=0; getApp().my_warnning(e, 0, th); }) // var url = "/api/weshop/libao/libaoFormvip/libaoOrder"; diff --git a/packageA/pages/myGiftDetails/myGiftDetails.js b/packageA/pages/myGiftDetails/myGiftDetails.js index 521d1f2..c0f50fd 100644 --- a/packageA/pages/myGiftDetails/myGiftDetails.js +++ b/packageA/pages/myGiftDetails/myGiftDetails.js @@ -17,6 +17,7 @@ Page({ }, showBtn: true, isClick: false, + is_summit_ing: 0, }, /** @@ -67,6 +68,8 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + this.data.is_summit_ing=0; + ut.fy_back('',0) t_pay.set_fir(); getApp().check_can_share(); if(app.globalData.userInfo) { @@ -210,6 +213,10 @@ Page({ //-- 礼包购买 -- GetBuyPrice: function(e) { + + if(this.data.is_summit_ing) return false; + this.data.is_summit_ing=1; + var th = this,that=th; var item=th.data.details; var id = item.id; //活动id @@ -239,6 +246,7 @@ Page({ getApp().goto("/packageA/pages/libao_payment/payment?type=2"); },1000) },function (msg){ + th.data.is_summit_ing=0; getApp().my_warnning(msg, 0, th); }) diff --git a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js index 98a249c..493072b 100644 --- a/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js +++ b/packageC/pages/luckyGo/luckyGo_cart/luckyGo_cart.js @@ -157,6 +157,11 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + + //富友支付取消支付强行回去 + var fy=ut.fy_back("/pages/user/order_list/order_list",1); + if(fy) return false; + util_pay.set_fir(); var th = this; th.setData({ show_submit: 0 }); //让提交先掩藏 @@ -2838,7 +2843,7 @@ Page({ if (cps.length > 1) { wx.navigateBack({ delta: 1 }) } else { - getApp().goto("/pages/index/index/index"); + getApp().goto("/pages/user/order_list/order_list"); } }, 1000) diff --git a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js index b65bdb5..1cbc905 100644 --- a/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js +++ b/packageC/pages/luckyGo/luckyGo_cart_ct/luckyGo_cart_ct.js @@ -596,6 +596,10 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + + var fy=ut.fy_back('/pages/user/order_list/order_list',1); + if(fy) return false; + var th = this; util_pay.set_fir(); diff --git a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js index c723924..75e4396 100644 --- a/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js +++ b/packageC/pages/luckyGo/luckyGo_order/luckyGo_order.js @@ -64,6 +64,11 @@ Page({ }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); }, onShow: function() { + + var fy=ut.fy_back('/pages/user/order_list/order_list',1); + if(fy) return false; + py.set_fir(); + wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), this.requestOrderDetail(this.data.order.order_id)); }, @@ -321,6 +326,9 @@ Page({ } + if(this.data.paying) return false; + this.data.paying=0; + var order=this.data.order; var order_goods=order.order_goods; var user_id=order.user_id; @@ -328,8 +336,9 @@ Page({ py.pay(this.data.order.order_sn, function() { - wx.showToast({title: '支付成功'}) - wx.navigateBack(); + th.data.paying=0; + wx.showToast({title: '支付成功'}) + wx.navigateBack(); },null,os.stoid,1); diff --git a/packageC/pages/payForAnother/payForAnother.js b/packageC/pages/payForAnother/payForAnother.js index 4706384..02ccc3d 100644 --- a/packageC/pages/payForAnother/payForAnother.js +++ b/packageC/pages/payForAnother/payForAnother.js @@ -150,6 +150,23 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + + util_pay.set_fir(); + var fy=ut.fy_back('',0); + if(fy){ + //支付失败 + setTimeout(function () { + var cps=getCurrentPages(); + if(cps.length>1){ + wx.navigateBack({delta: 1}) + }else{ + getApp().goto("/pages/index/index/index"); + } + + }, 1000) + return false; + } + var th = this; th.setData({show_submit: 0}); //让提交先掩藏 th.data.g_cart_q_time = null; diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index aa06f7d..a24f2cd 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -157,6 +157,11 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + this.data.paying=0; + + var fy= ut.fy_back("/pages/user/order_list/order_list",1); + if(fy) return false; + util_pay.set_fir(); var th = this; th.setData({ show_submit: 0 }); //让提交先掩藏 @@ -2853,6 +2858,9 @@ Page({ } + if(this.data.paying) return false; + this.data.paying=1; + /*--- o.jumpToCart4({ order_sn: this.data.order.order_sn, diff --git a/packageC/pages/presell/cart/cart2.js b/packageC/pages/presell/cart/cart2.js index e25b1f5..8ed4d78 100644 --- a/packageC/pages/presell/cart/cart2.js +++ b/packageC/pages/presell/cart/cart2.js @@ -160,6 +160,18 @@ Page({ //----------子页返回父页触发---------- onShow: function () { var th = this; + var fy= ut.fy_back('',0,function (){ + var cps = getCurrentPages(); + if (cps.length > 1) { + wx.navigateBack({ delta: 1 }) + } else { + getApp().goto("/pages/index/index/index"); + } + + }) + if(fy) return false; + + util_pay.set_fir(); th.data.g_cart_q_time = null; if (th.data.isclose == 0) { diff --git a/packageC/pages/presell/cart/cart2_pre.js b/packageC/pages/presell/cart/cart2_pre.js index d217184..1dcef3f 100644 --- a/packageC/pages/presell/cart/cart2_pre.js +++ b/packageC/pages/presell/cart/cart2_pre.js @@ -251,6 +251,10 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + + var fy=ut.fy_back("/pages/user/order_list/order_list",1); + if(fy) return false; + util_pay.set_fir(); var th = this; if (th.data.isclose == 0) { diff --git a/packageD/pages/shop/order_detail/order_detail.js b/packageD/pages/shop/order_detail/order_detail.js index e60cba9..ae1f780 100644 --- a/packageD/pages/shop/order_detail/order_detail.js +++ b/packageD/pages/shop/order_detail/order_detail.js @@ -30,6 +30,10 @@ Page({ }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); }, onShow: function() { + this.setData({paying:0}); + ut.fy_back('',0); + py.set_fir(); + wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), this.requestOrderDetail(this.data.order.order_id)); }, diff --git a/packageD/pages/user/deposit/prepaid/prepaid.js b/packageD/pages/user/deposit/prepaid/prepaid.js index bd448eb..c5c1215 100644 --- a/packageD/pages/user/deposit/prepaid/prepaid.js +++ b/packageD/pages/user/deposit/prepaid/prepaid.js @@ -12,7 +12,8 @@ Page({ data: { iurl: o.imghost, showModal: false, //弹框控制器 - perpaid: [], //数据 + perpaid: [], //数据, + paying:0 }, /* 生命周期函数--监听页面初次渲染完成*/ onReady: function() { @@ -94,10 +95,16 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { - wx.setNavigationBarTitle({ - title: "流动资金转预存", - }) - t_pay.set_fir(); + + + + wx.setNavigationBarTitle({ + title: "流动资金转预存", + }) + + this.data.paying=0; + ut.fy_back('',0) + t_pay.set_fir(); if(getApp().globalData.user_id && !this.data.is_get){ this.yuck(); @@ -106,6 +113,9 @@ Page({ }, //确定充值 determine: function(e) { + if(this.data.paying) return false; + this.data.paying=1; + var th=this; this.setData({ showModal: false @@ -122,6 +132,8 @@ Page({ }, //确定接口 async recharge(money, advancek) { + + console.log(money, "有进来吗银行卡", advancek); var user_id = getApp().globalData.user_id; var store_id = os.stoid; @@ -164,6 +176,8 @@ Page({ }, function () { e.jumpPaymentPage(); }, function (e) { + + this.data.paying=0; wx.showToast({ title: e, icon: 'none', diff --git a/packageD/pages/user/integral/integral.js b/packageD/pages/user/integral/integral.js index f0baab6..048e1a3 100644 --- a/packageD/pages/user/integral/integral.js +++ b/packageD/pages/user/integral/integral.js @@ -234,6 +234,10 @@ Page({ //点击确定 determine(event) { + + if(this.data.paying) return false; + this.data.paying=1; + console.log(event.currentTarget.dataset.money); var money = event.currentTarget.dataset.money; var integral = event.currentTarget.dataset.integral; @@ -260,6 +264,7 @@ Page({ }, function () { th.jumpPaymentPage(); }, function (e) { + th.data.paying=0; wx.showToast({ title: e, icon: 'none', @@ -325,6 +330,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + + ut.fy_back('',0); + this.data.paying=0; t_pay.set_fir(); getApp().check_can_share(); //--先判断会员状态-- diff --git a/packageE/pages/cart/cart2/cart2.js b/packageE/pages/cart/cart2/cart2.js index 892de9f..5b07fef 100644 --- a/packageE/pages/cart/cart2/cart2.js +++ b/packageE/pages/cart/cart2/cart2.js @@ -201,15 +201,12 @@ Page({ //----------子页返回父页触发---------- onShow: function () { - - if(getApp().globalData.fuiou_pay){ - getApp().globalData.fuiou_pay=0; - getApp().goto('pages/index/index/index'); - return false; - } - + //富友支付取消支付强行回去 + var fy=ut.fy_back("/pages/user/order_list/order_list",1); + if(fy) return false; util_pay.set_fir(); + var th = this; th.data.g_cart_q_time = null; @@ -4515,6 +4512,8 @@ Page({ // order_sn: data.data, //}, 1); + + util_pay.pay(data.data, async function () { //app.my_warnning("支付成功",1,th); //setTimeout(function () { diff --git a/packageE/pages/user/cardinfo/cardinfo.js b/packageE/pages/user/cardinfo/cardinfo.js index a89d9c6..416b6eb 100644 --- a/packageE/pages/user/cardinfo/cardinfo.js +++ b/packageE/pages/user/cardinfo/cardinfo.js @@ -682,6 +682,8 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + this.data.paying=0; + ut.fy_back('',0); t_pay.set_fir(); //同步初始化 this.init(); @@ -745,7 +747,10 @@ Page({ //-----立即续费的功能------ - xufei:async function(){ + xufei:async function(){ + + + var th = this,is_card = 0,end_time=0; await getApp().request.promiseGet("/store/storemoduleendtime/page?store_id="+os.stoid+"&type=3", {1:1}).then(res => { @@ -781,14 +786,20 @@ Page({ return false; } + if(this.data.paying) return false; + this.data.paying=1; + + var item = th.data.user_card; var req = {}; req.cardId = item.CardId; req.rechargeType = 4; //如果不是你导购,也不是等级会员分享 req.storeId = os.stoid; - req.userId = getApp().globalData.user_id; - t_pay.pay(req, th.success, function () { + req.userId = getApp().globalData.user_id; + t_pay.set_pay_url('/api/weshop/plus/create/plus/order'); + t_pay.pay(req, th.success, function (e) { + th.data.paying=0; getApp().my_warnning("支付失败", 0, th); }); @@ -796,6 +807,7 @@ Page({ //--支付成功,跳转到等级卡续费页面-- success:function (ind) { + this.data.paying=0; if(ind==1){ getApp().my_warnning("升级成功",0,this); }else{ @@ -845,6 +857,9 @@ Page({ }, sure_pay:function () { + if(this.data.paying) return false; + this.data.paying=1; + var th=this; var req = {}; req.cardId = th.data.s_card_id; @@ -853,7 +868,9 @@ Page({ req.storeId = os.stoid; req.oldCardId=th.data.user_card.CardId; req.userId = getApp().globalData.user_id; + t_pay.set_pay_url('/api/weshop/plus/create/plus/order'); t_pay.pay(req, th.success, function () { + th.data.paying=0; getApp().my_warnning("支付失败", 0, th); }); }, diff --git a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js index f3e0030..5a87bb3 100644 --- a/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js +++ b/packageE/pages/user/monthgiftbag/giftpackbuy/giftpackbuy.js @@ -139,6 +139,22 @@ Page({ this.getList(); }, onShow: function () { + var th=this; + this.setData({submit:0}) + i.fy_back('',0,function (){ + + console.log(getApp().globalData.py_month_bg,'111111'); + console.log(th.data.back_ord,'22222'); + + if(getApp().globalData.py_month_bg && th.data.back_ord){ + var b_ord=th.data.back_ord; + com.reduce(b_ord,os.stoid); + //要进行清空粗粒 + getApp().globalData.py_month_bg=0; + th.data.back_ord=null; + + } + }) com.set_py_fir(); getApp().check_can_share(); var th=this; @@ -178,6 +194,9 @@ Page({ openSpecModal:1 }) }else{ + + if(this.data.submit) return false; + var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( "是否确定购买该礼包", diff --git a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js index d962696..15d73e6 100644 --- a/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js +++ b/packageE/pages/user/monthgiftbag/giftpackinfo/giftpackinfo.js @@ -5,6 +5,7 @@ var e = getApp(), d = e.globalData; var ut = require("../../../../../utils/util.js"); var com = require("../public/buy_com.js"); +const i = require("../../../../../utils/util.js"); Page({ data: { @@ -198,6 +199,18 @@ Page({ }, onShow: function () { + var th=this; + this.setData({submit:0}) + ut.fy_back('',0,function (){ + if(getApp().globalData.py_month_bg && th.data.back_ord){ + var b_ord=th.data.back_ord; + com.reduce(b_ord,os.stoid); + //要进行清空粗粒 + getApp().globalData.py_month_bg=0; + th.data.back_ord=null; + + } + }) com.set_py_fir(); getApp().check_can_share(); getApp().is_Single_page(this, function () { @@ -226,6 +239,8 @@ Page({ openSpecModal: 1 }) } else { + + if(this.data.submit) return false; var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( "是否确定购买该礼包", diff --git a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js index 7101fea..6fd6cbe 100644 --- a/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js +++ b/packageE/pages/user/monthgiftbag/giftpacklist/giftpacklist.js @@ -173,6 +173,18 @@ Page({ }, onShow: function () { + var th=this; + this.setData({submit:0}) + ut.fy_back('',0,function (){ + if(getApp().globalData.py_month_bg && th.data.back_ord){ + var b_ord=th.data.back_ord; + com.reduce(b_ord,os.stoid); + //要进行清空粗粒 + getApp().globalData.py_month_bg=0; + th.data.back_ord=null; + } + }); + com.set_py_fir(); getApp().check_can_share(); getApp().is_Single_page(this, function () { @@ -201,6 +213,10 @@ Page({ openSpecModal: 1 }) } else { + + if(this.data.submit) return false; + this.setData({submit:1}) + var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( "是否确定购买该礼包", @@ -234,6 +250,8 @@ Page({ openSpecModal: 1 }) } else { + + if(this.data.submit) return false; var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( "是否确定兑换该礼包", diff --git a/packageE/pages/user/monthgiftbag/public/buy_com.js b/packageE/pages/user/monthgiftbag/public/buy_com.js index 006edd4..dea70ad 100644 --- a/packageE/pages/user/monthgiftbag/public/buy_com.js +++ b/packageE/pages/user/monthgiftbag/public/buy_com.js @@ -215,7 +215,9 @@ module.exports = { } } + if(th.data.submit) return false; th.setData({submit:1}) + var id=th.data.sele_g.id; var that=th; var json = { @@ -257,11 +259,15 @@ module.exports = { break; case 2://立即购买 var order_sn = res.data.data.orderSn; + th.data.back_ord=order_sn; //res = res.data.data.result; //if (!res) return false; var money=that.data.payMoney; var url = "/packageE/pages/user/monthgiftbag/payment/payment?money=" + money + "&order_sn=" + order_sn; + getApp().globalData.no_clear=1; + getApp().globalData.py_month_bg=1; + t_pay.pay_data(res,function (){ th.setData({submit:0}) diff --git a/pages/cart/cart2_inte/cart2_inte.js b/pages/cart/cart2_inte/cart2_inte.js index 83bbb8f..2fea0ab 100644 --- a/pages/cart/cart2_inte/cart2_inte.js +++ b/pages/cart/cart2_inte/cart2_inte.js @@ -161,6 +161,20 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + + var fy=ut.fy_back('',1,function (){ + var cps = getCurrentPages(); + if (cps.length > 1) { + wx.navigateBack({ delta: 1 }) + } else { + getApp().goto("/pages/index/index/index"); + } + }); + + if(fy) return false; + + util_pay.set_fir(); + var th = this; th.data.g_cart_q_time = null; diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js index eb3977d..ed306e1 100644 --- a/pages/cart/cart2_pt/cart2_pt.js +++ b/pages/cart/cart2_pt/cart2_pt.js @@ -532,6 +532,12 @@ Page({ //----------子页返回父页触发---------- onShow: function () { + + var fy=ut.fy_back("/pages/user/order_list/order_list",1); + if(fy) return false; + + util_pay.set_fir(); + var th = this; if (th.data.isclose == 0) { wx.navigateTo({ diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js index 2355c42..0b2f618 100644 --- a/pages/cart/cart_wk/cart_wk.js +++ b/pages/cart/cart_wk/cart_wk.js @@ -87,6 +87,9 @@ Page({ * 生命周期函数--监听页面显示 */ onShow: function () { + + ut.fy_back('',0); + this.data.paying=0; util_pay.set_fir(); getApp().check_can_share(); var th = this; diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js index afde151..d807ed1 100644 --- a/pages/giftpack/buygiftpack/giftpackbuy.js +++ b/pages/giftpack/buygiftpack/giftpackbuy.js @@ -139,6 +139,9 @@ Page({ this.getList(); }, onShow: function () { + + this.setData({submit:0}) + i.fy_back('',0); com.set_py_fir(); getApp().check_can_share(); var th=this; @@ -158,6 +161,11 @@ Page({ }) this.init(); + + setTimeout(()=>{ + var my_confirm = th.selectComponent("#my_confirm"); //组件的id + },2000) + }, //购买礼包 @@ -178,6 +186,9 @@ Page({ openSpecModal:1 }) }else{ + + if(this.data.submit) return false; + var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( "是否确定购买该礼包", @@ -214,6 +225,9 @@ Page({ openSpecModal:1 }) }else { + + if(this.data.submit) return false; + var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( "是否确定兑换该礼包", @@ -246,7 +260,7 @@ Page({ openSpecModal:1 }) }else { - + if(this.data.submit) return false; var my_confirm = th.selectComponent("#my_confirm"); //组件的id my_confirm.open( diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js index 28607bf..d6171eb 100644 --- a/pages/giftpack/giftpacklist/giftpacklist.js +++ b/pages/giftpack/giftpacklist/giftpacklist.js @@ -74,7 +74,8 @@ Page({ giftImageCover:null, canvasHidden:true, - screenWidth: 0 + screenWidth: 0, + submit:0 }, onLoad: function (options) { @@ -165,6 +166,8 @@ Page({ }, onShow: function () { + this.setData({submit:0}) + ut.fy_back('',0); com.set_py_fir(); getApp().check_can_share(); getApp().is_Single_page(this, function () { @@ -176,6 +179,7 @@ Page({ } this.init(); }) + th.setData({ submit:0}) }, GetBuyPrice: function (e) { var that = this.data; @@ -186,6 +190,10 @@ Page({ return false; } + if(th.data.submit) return false; + th.setData({submit:1}) + + this.data.payMoney = th.data.sele_g.payMoney; th.setData({buyType: 2}) if (th.data.sele_g.is_pickup) { diff --git a/pages/user/order_detail/order_detail.js b/pages/user/order_detail/order_detail.js index 28b2a76..76c997a 100644 --- a/pages/user/order_detail/order_detail.js +++ b/pages/user/order_detail/order_detail.js @@ -64,6 +64,8 @@ Page({ }), this.requestOrderDetail(e.order_id), wx.removeStorageSync("order:order_detail:update"); }, onShow: function() { + ut.fy_back('',0) + this.setData({paying:0}); py.set_fir(); wx.getStorageSync("order:order_detail:update") && (wx.removeStorageSync("order:order_detail:update"), this.requestOrderDetail(this.data.order.order_id)); diff --git a/pages/user/order_list/order_list.js b/pages/user/order_list/order_list.js index dcaf978..c896025 100644 --- a/pages/user/order_list/order_list.js +++ b/pages/user/order_list/order_list.js @@ -76,6 +76,8 @@ Page({ cardList: [], // 搜索内容 searchContent: '', + + ser_paying:0, }, onLoad: function (t) { @@ -109,6 +111,12 @@ Page({ s.init(this, "", "orderList"); }, onShow: function () { + + + ut.fy_back('',0) + this.setData({ paying: 0 }); + this.data.ser_paying=0; + t_pay.set_fir(); t.set_fir(); @@ -2594,6 +2602,9 @@ Page({ }; + if(th.data.ser_paying) return false; + th.data.ser_paying=1; + if (flag) { @@ -2602,12 +2613,14 @@ Page({ parentSn: order_sn, store_id: store_id }, function () { + th.data.ser_paying=0; wx.showToast({ title: '支付成功', icon:'success', duration: 2000 }); }, function (e) { + th.data.ser_paying=0; wx.showToast({ title: e, icon: 'none', diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index e5c74b8..943321f 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -127,7 +127,12 @@ Page({ onShow: function () { var user_info = getApp().globalData.userInfo; if (!user_info) return false; + ut.fy_back('',0); + th.setData({ + is_select:0, + focus:true, + }) t_pay.set_fir(); var th = this, @@ -459,6 +464,7 @@ Page({ // } // }) } else { + t_pay.set_pay_url('/api/weshop/plus/create/plus/order'); t_pay.pay(req, th.success, function () { getApp().my_warnning("支付失败", 0, th); th.setData({ @@ -492,6 +498,7 @@ Page({ staffNo_arr: res.data.data }) }else{ + t_pay.set_pay_url('/api/weshop/plus/create/plus/order'); t_pay.pay(req, th.success, function () { getApp().my_warnning("支付失败", 0, th); th.setData({ @@ -522,7 +529,14 @@ Page({ //--支付成功,跳转到等级卡续费页面-- success: function () { //调一次就不再调用了 - if (getApp().globalData.is_card_back) return false; + if (getApp().globalData.is_card_back){ + th.setData({ + is_select:0, + focus:true, + }) + return false; + + } if (getApp().globalData.plus_buy_back) { //值在这里换 getApp().globalData.is_card_back = 1; diff --git a/utils/pay2.js b/utils/pay2.js index 63cebbb..632ea14 100644 --- a/utils/pay2.js +++ b/utils/pay2.js @@ -27,6 +27,7 @@ module.exports = { if(t.data.data.is_fuioupay){ const plugin = requirePlugin('fuiou-pay') getApp().globalData.no_clear=1; + getApp().globalData.fuiou_pay=1; var paramsJson={ reqType:"11",//必填 01-商户模式,11-机构模式 @@ -35,6 +36,7 @@ module.exports = { console.log(plugin, plugin.fuioupay) plugin.fuioupay(parseInt(t.data.data.amt),paramsJson,function (res){ console.log(res); + getApp().globalData.fuiou_pay=0; i.wx_paying=0; "function" == typeof succ && succ(); },function (error){ @@ -42,6 +44,7 @@ module.exports = { //支付失败的时候 //getApp().confirmBox(error.code+error.message); var msg='取消支付'; + getApp().globalData.fuiou_pay=0; if(error.code){ msg=error.code+":"+error.message; } @@ -88,12 +91,17 @@ module.exports = { reqData:ob.reqData,//必填 富友加密参数 } getApp().globalData.no_clear=1; + getApp().globalData.fuiou_pay=1; + + console.log(plugin, plugin.fuioupay) plugin.fuioupay(parseInt(ob.amt),paramsJson,function (res){ + getApp().globalData.fuiou_pay=0; console.log(res); th.wx_paying=0; "function" == typeof succ && succ(); },function (error){ + getApp().globalData.fuiou_pay=0; th.wx_paying=0; console.log("插件支付错误",error); //支付失败的时候 diff --git a/utils/util.js b/utils/util.js index 6022bbe..c2133f8 100644 --- a/utils/util.js +++ b/utils/util.js @@ -763,6 +763,43 @@ module.exports = { }) }, + //是不是富友的返回 + fy_back(url,is_need_back,func){ + var fy=getApp().globalData.fuiou_pay; + console.log('cart2-show:'+fy); + if(fy){ + getApp().globalData.fuiou_pay=0; + wx.showToast({ + title:'取消支付', + icon:'none', + duration:2500 + }) + + if(is_need_back){ + if(url){ + setTimeout(()=>{ + getApp().goto(url); + },2000); + }else{ + if(func) { + func(); + }else{ + //支付失败 + setTimeout(function () { + wx.navigateBack({ delta: 1 }) + }, 1000) + } + } + }else{ + if(func) func(); + } + return true ; + + } + return false + }, + + unserialize: unserialize, _throttle:_throttle, unserialize_o: unserialize_o,