Commit ca8977ef4ca8e5134ae418f5cb35eea957a24824

Authored by yvan.ni
1 parent 6d1ee43f

会员中心

所有的卡都关闭,就不显示等级卡
pages/user/index/index.js
@@ -41,6 +41,7 @@ Page({ @@ -41,6 +41,7 @@ Page({
41 actImg: "", 41 actImg: "",
42 is_assistance: 0, //助力活动 42 is_assistance: 0, //助力活动
43 ad_img:"", 43 ad_img:"",
  44 + isshow_vip:0,
44 }, 45 },
45 goto_nav: function(e) { 46 goto_nav: function(e) {
46 var th = this; 47 var th = this;
@@ -78,6 +79,7 @@ Page({ @@ -78,6 +79,7 @@ Page({
78 onShow: function() { 79 onShow: function() {
79 80
80 this.is_assistance(); 81 this.is_assistance();
  82 + this.getPlusCardType();
81 83
82 84
83 var stoid = app_d.setting.stoid; 85 var stoid = app_d.setting.stoid;
@@ -632,9 +634,23 @@ Page({ @@ -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,6 +63,9 @@
63 </image> 63 </image>
64 64
65 </view> 65 </view>
  66 +
  67 + <block wx:if="{{isshow_vip}}">
  68 +
66 <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2}}"> 69 <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==2}}">
67 <view class="xc-add-member flex-center-around "> 70 <view class="xc-add-member flex-center-around ">
68 <view class="flex jc-center ai-center"> 71 <view class="flex jc-center ai-center">
@@ -86,6 +89,7 @@ @@ -86,6 +89,7 @@
86 </view> 89 </view>
87 </view> 90 </view>
88 </view> 91 </view>
  92 + </block>
89 93
90 </view> 94 </view>
91 <view class="xc-after-sale rel"> 95 <view class="xc-after-sale rel">