diff --git a/pages/user/cardinfo/cardinfo.js b/pages/user/cardinfo/cardinfo.js index 8578274..35821ea 100644 --- a/pages/user/cardinfo/cardinfo.js +++ b/pages/user/cardinfo/cardinfo.js @@ -70,10 +70,12 @@ Page({ }).then(res => { var plusCard = res.data.data; + if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg"+(i + 1)+ ".jpg?v=1"; var big_card = null; var big_cards = null; console.log(plusCard, "数据什么的", res); for (var i = 0; i < plusCard.length; i++) { + if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg" + (i + 1) + ".jpg?v=1"; big_cards = Math.max(plusCard[i].CardFee) if (plusCard[i].CardFee == big_cards) { big_card = plusCard[i] @@ -159,6 +161,12 @@ Page({ await getApp().request.promiseGet("/api/weshop/plus/vip/mem/bership/get?storeId=" + os.stoid + "&CardId=" + ee.data.cardid, { }).then(res => { var user_card= res.data.data; + if (user_card.CardImg==""){ + var index =parseInt(user_card.CorrPrice.replace("Price","")); + user_card.CardImg = th.data.url + "/miniapp/images/plus/bg" + index + ".jpg?v=1"; + + } + console.log(user_card,"会员的卡类"); ee.setData({user_card: user_card}); }) diff --git a/pages/user/cardinfo/cardinfo.wxss b/pages/user/cardinfo/cardinfo.wxss index 50b4991..8677747 100644 --- a/pages/user/cardinfo/cardinfo.wxss +++ b/pages/user/cardinfo/cardinfo.wxss @@ -23,7 +23,7 @@ background-size: 100%; border-top-left-radius: 18rpx; border-top-right-radius: 18rpx; - + margin-top: 20rpx } .renew { width: 190rpx; diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml index 4fa3732..49ce863 100644 --- a/pages/user/index/index.wxml +++ b/pages/user/index/index.wxml @@ -77,10 +77,10 @@ - + 加入plus会员 预计可省3031元 - + 立即续费 diff --git a/pages/user/plus/plus.js b/pages/user/plus/plus.js index 5cc019f..976c270 100644 --- a/pages/user/plus/plus.js +++ b/pages/user/plus/plus.js @@ -163,6 +163,7 @@ Page({ var new_arr = new Array(); for (var i = 0; i < plusCard.length; i++) { //plusCard[i].free=arr[i]; + if (plusCard[i].CardImg == "") plusCard[i].CardImg = th.data.url + "/miniapp/images/plus/bg"+(i + 1)+ ".jpg?v=1"; var item = {"fee": plusCard[i].CardFee, 'index': i} new_arr.push(item); }