From ca8977ef4ca8e5134ae418f5cb35eea957a24824 Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Fri, 29 May 2020 09:02:32 +0800 Subject: [PATCH] 会员中心 所有的卡都关闭,就不显示等级卡 --- pages/user/index/index.js | 22 +++++++++++++++++++--- pages/user/index/index.wxml | 4 ++++ 2 files changed, 23 insertions(+), 3 deletions(-) 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 @@ + -- libgit2 0.21.4