From 111fbdf6493b5d5db92b73b98c274c9f0d9f3365 Mon Sep 17 00:00:00 2001 From: yvan.ni Date: Tue, 20 Jun 2023 14:30:44 +0800 Subject: [PATCH] 防止多次打开支付 --- pages/user/plus/plus.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index 27d2327..5d38a14 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -42,6 +42,9 @@ Page({ focus:false, is_select: false, //是否选择营业员过 is_buy_card_id:"",//是否是链接直接过来购买的卡号id + + is_fir_open:0 //防止多次打开 + }, swiperChange: function (e) { var currentId = e.detail.current; @@ -280,7 +283,7 @@ Page({ is_plusCard: parr, is_show: 1 }) - if(th.data.is_buy_card_id){ + if(th.data.is_buy_card_id && !th.data.is_fir_open){ let i = parr.findIndex(item=>item.CardId==th.data.is_buy_card_id) if(i>-1){ // th.setData({ @@ -294,6 +297,7 @@ Page({ } setTimeout(function (){ + th.data.is_fir_open=1; //保证不多次打开 th.Opening(e) },1000) -- libgit2 0.21.4