Commit ca8977ef4ca8e5134ae418f5cb35eea957a24824
1 parent
6d1ee43f
会员中心
所有的卡都关闭,就不显示等级卡
Showing
2 changed files
with
23 additions
and
3 deletions
pages/user/index/index.js
... | ... | @@ -41,6 +41,7 @@ Page({ |
41 | 41 | actImg: "", |
42 | 42 | is_assistance: 0, //助力活动 |
43 | 43 | ad_img:"", |
44 | + isshow_vip:0, | |
44 | 45 | }, |
45 | 46 | goto_nav: function(e) { |
46 | 47 | var th = this; |
... | ... | @@ -78,6 +79,7 @@ Page({ |
78 | 79 | onShow: function() { |
79 | 80 | |
80 | 81 | this.is_assistance(); |
82 | + this.getPlusCardType(); | |
81 | 83 | |
82 | 84 | |
83 | 85 | var stoid = app_d.setting.stoid; |
... | ... | @@ -632,9 +634,23 @@ Page({ |
632 | 634 | |
633 | 635 | } |
634 | 636 | }) |
635 | - } | |
636 | - | |
637 | - | |
637 | + }, | |
638 | 638 | |
639 | + //--- 获取卡类列表 --- | |
640 | + getPlusCardType: function () { | |
641 | + var storid = os.stoid; | |
642 | + var th = this; | |
643 | + var isshow_vip=0; | |
644 | + getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/list?" + "storeId=" + storid, {}).then(res => { | |
645 | + if(res.data.code==0){ | |
646 | + for(var i in res.data.data){ | |
647 | + var item=res.data.data[i]; | |
648 | + //IsStopBuy 如果是真的话,代表这个卡没有停用 | |
649 | + if(item.IsStopBuy!=true){ isshow_vip=1;break; } | |
650 | + } | |
651 | + th.setData({isshow_vip:isshow_vip}) | |
652 | + } | |
653 | + }) | |
654 | + } | |
639 | 655 | |
640 | 656 | }) | ... | ... |
pages/user/index/index.wxml
... | ... | @@ -63,6 +63,9 @@ |
63 | 63 | </image> |
64 | 64 | |
65 | 65 | </view> |
66 | + | |
67 | + <block wx:if="{{isshow_vip}}"> | |
68 | + | |
66 | 69 | <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2}}"> |
67 | 70 | <view class="xc-add-member flex-center-around "> |
68 | 71 | <view class="flex jc-center ai-center"> |
... | ... | @@ -86,6 +89,7 @@ |
86 | 89 | </view> |
87 | 90 | </view> |
88 | 91 | </view> |
92 | + </block> | |
89 | 93 | |
90 | 94 | </view> |
91 | 95 | <view class="xc-after-sale rel"> | ... | ... |