diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index 135e67a..d14dfd5 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -172,9 +172,8 @@ Page({ var arr = [1219, 2089, 3031]; var new_arr = new Array(); for (var i = 0; i < plusCard.length; i++) { - //plusCard[i].free=arr[i]; - - + //plusCard[i].free=arr[i]; + if(plusCard[i].IsStopBuy) { continue; } if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg"+(i + 1)+ ".jpg?v=1"; var item = {"fee": plusCard[i].CardFee, 'index': i} new_arr.push(item); @@ -190,6 +189,14 @@ Page({ return 1; } }); + + //里面和外面要显示统一 + switch (new_arr.length) { + case 1:arr=[3031]; break; + case 2: arr = [2089, 3031]; break; + case 3: arr = [1219, 2089, 3031];break; + } + //---给数组添加立省多少钱--- for (i = 0; i < plusCard.length; i++) { //判断是否停用