Commit 111fbdf6493b5d5db92b73b98c274c9f0d9f3365

Authored by yvan.ni
1 parent 103e51a8

防止多次打开支付

Showing 1 changed file with 5 additions and 1 deletions
pages/user/plus/plus.js
... ... @@ -42,6 +42,9 @@ Page({
42 42 focus:false,
43 43 is_select: false, //是否选择营业员过
44 44 is_buy_card_id:"",//是否是链接直接过来购买的卡号id
  45 +
  46 + is_fir_open:0 //防止多次打开
  47 +
45 48 },
46 49 swiperChange: function (e) {
47 50 var currentId = e.detail.current;
... ... @@ -280,7 +283,7 @@ Page({
280 283 is_plusCard: parr,
281 284 is_show: 1
282 285 })
283   - if(th.data.is_buy_card_id){
  286 + if(th.data.is_buy_card_id && !th.data.is_fir_open){
284 287 let i = parr.findIndex(item=>item.CardId==th.data.is_buy_card_id)
285 288 if(i>-1){
286 289 // th.setData({
... ... @@ -294,6 +297,7 @@ Page({
294 297 }
295 298  
296 299 setTimeout(function (){
  300 + th.data.is_fir_open=1; //保证不多次打开
297 301 th.Opening(e)
298 302 },1000)
299 303  
... ...