diff --git a/pages/user/index/index.js b/pages/user/index/index.js index 156e677..7a5acb4 100644 --- a/pages/user/index/index.js +++ b/pages/user/index/index.js @@ -41,6 +41,7 @@ Page({ actImg: "", is_assistance: 0, //助力活动 ad_img:"", + isshow_vip:0, }, goto_nav: function(e) { var th = this; @@ -78,6 +79,7 @@ Page({ onShow: function() { this.is_assistance(); + this.getPlusCardType(); var stoid = app_d.setting.stoid; @@ -632,9 +634,23 @@ Page({ } }) - } - - + }, + //--- 获取卡类列表 --- + getPlusCardType: function () { + var storid = os.stoid; + var th = this; + var isshow_vip=0; + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { + if(res.data.code==0){ + for(var i in res.data.data){ + var item=res.data.data[i]; + //IsStopBuy 如果是真的话,代表这个卡没有停用 + if(item.IsStopBuy!=true){ isshow_vip=1;break; } + } + th.setData({isshow_vip:isshow_vip}) + } + }) + } }) diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index b6c3cfd..f0225b2 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -63,6 +63,9 @@ + + + @@ -86,6 +89,7 @@ +