Commit ad7caebe3416e782334d37a75f2526f2e72fb03f

Authored by yvan.ni
1 parent ac8b9f49

等级卡会员中心的显示, 开卡,续卡都要由默认图片

pages/user/cardinfo/cardinfo.js
... ... @@ -70,10 +70,12 @@ Page({
70 70  
71 71 }).then(res => {
72 72 var plusCard = res.data.data;
  73 + if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg"+(i + 1)+ ".jpg?v=1";
73 74 var big_card = null;
74 75 var big_cards = null;
75 76 console.log(plusCard, "数据什么的", res);
76 77 for (var i = 0; i < plusCard.length; i++) {
  78 + if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg" + (i + 1) + ".jpg?v=1";
77 79 big_cards = Math.max(plusCard[i].CardFee)
78 80 if (plusCard[i].CardFee == big_cards) {
79 81 big_card = plusCard[i]
... ... @@ -159,6 +161,12 @@ Page({
159 161 await getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/get?storeId=" + os.stoid + "&CardId=" + ee.data.cardid, {
160 162 }).then(res => {
161 163 var user_card= res.data.data;
  164 + if (user_card.CardImg==""){
  165 + var index =parseInt(user_card.CorrPrice.replace("Price",""));
  166 + user_card.CardImg = th.data.url + "/miniapp/images/plus/bg" + index + ".jpg?v=1";
  167 +
  168 + }
  169 +
162 170 console.log(user_card,"会员的卡类");
163 171 ee.setData({user_card: user_card});
164 172 })
... ...
pages/user/cardinfo/cardinfo.wxss
... ... @@ -23,7 +23,7 @@
23 23 background-size: 100%;
24 24 border-top-left-radius: 18rpx;
25 25 border-top-right-radius: 18rpx;
26   -
  26 + margin-top: 20rpx
27 27 }
28 28 .renew {
29 29 width: 190rpx;
... ...
pages/user/index/index.wxml
... ... @@ -77,10 +77,10 @@
77 77  
78 78 <view class="xc-add-member-frame flex-level rel addplus" wx:if="{{is_dengji==3}}">
79 79 <view class="xc-add-member flex-vertical four-level-word">
80   - <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png"></image>
  80 + <image class="xc-icon" src="{{iurl}}/miniapp/images/user/user_vip.png" style="margin-left:30rpx"></image>
81 81 <view class="member"> 加入plus会员</view>
82 82 <view class="t-c xc-save-money"> 预计可省3031元</view>
83   - <view class="xc-opening-button t-c" data-url="/pages/user/cardinfo/cardinfo" bindtap="goto" style="margin-left: 186rpx;">
  83 + <view class="xc-opening-button t-c" data-url="/pages/user/cardinfo/cardinfo" bindtap="goto" style="margin-left: 165rpx;">
84 84 <view class="xc-opening fs20">立即续费</view>
85 85 </view>
86 86 </view>
... ...
pages/user/plus/plus.js
... ... @@ -163,6 +163,7 @@ Page({
163 163 var new_arr = new Array();
164 164 for (var i = 0; i < plusCard.length; i++) {
165 165 //plusCard[i].free=arr[i];
  166 + if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg"+(i + 1)+ ".jpg?v=1";
166 167 var item = {"fee": plusCard[i].CardFee, 'index': i}
167 168 new_arr.push(item);
168 169 }
... ...