Commit 014b6fec7f5cf51b27a295a4018e1d3cc612bbdb
1 parent
7e042c29
会员中心显示等级卡
Showing
3 changed files
with
60 additions
and
2 deletions
pages/user/index/index.js
| ... | ... | @@ -199,6 +199,9 @@ Page({ |
| 199 | 199 | |
| 200 | 200 | if (e != undefined && e != null && e.mobile) { |
| 201 | 201 | |
| 202 | + this.puls_user(); | |
| 203 | + | |
| 204 | + | |
| 202 | 205 | |
| 203 | 206 | if(this.data.has_rj==0){ |
| 204 | 207 | var portrait_req = { |
| ... | ... | @@ -1137,6 +1140,27 @@ Page({ |
| 1137 | 1140 | }); |
| 1138 | 1141 | }, |
| 1139 | 1142 | |
| 1143 | + //-----Plus会员获取----------- | |
| 1144 | + puls_user: function() { | |
| 1145 | + var th = this; | |
| 1146 | + getApp().request.get("/api/weshop/plus/vip/mem/list", { | |
| 1147 | + data: { | |
| 1148 | + storeId: os.stoid, | |
| 1149 | + userId: getApp().globalData.user_id, | |
| 1150 | + }, | |
| 1151 | + success: function(su) { | |
| 1152 | + | |
| 1153 | + if (su.data.code == 0) { | |
| 1154 | + var cardname = su.data.data[0].MemCardName; | |
| 1155 | + if(cardname.length>5) cardname=cardname.substring(0,5); //保留5个字 | |
| 1156 | + th.setData({ | |
| 1157 | + pulscardname: cardname | |
| 1158 | + }); | |
| 1159 | + } | |
| 1160 | + } | |
| 1161 | + }); | |
| 1162 | + }, | |
| 1163 | + | |
| 1140 | 1164 | |
| 1141 | 1165 | |
| 1142 | 1166 | ... | ... |
pages/user/index/index.wxml
| ... | ... | @@ -9,7 +9,16 @@ |
| 9 | 9 | <image class="xc-background" src="{{iurl}}{{ad_img?ad_img:'/miniapp/images/user_index_powder.jpg'}}"> |
| 10 | 10 | <view class="flex-space-between abs xc-user-frame"> |
| 11 | 11 | <view class="xc-user-left flex" wx:if="{{userInfo}}"> |
| 12 | - <image class="xc-user-img circle" bindtap="go_info" src="{{userInfo.head_pic?userInfo.head_pic:defaultAvatar}}"></image> | |
| 12 | + <view style="position:relative;"> | |
| 13 | + <image class="xc-user-img circle" bindtap="go_info" src="{{userInfo.head_pic?userInfo.head_pic:defaultAvatar}}"></image> | |
| 14 | + <block wx:if="{{pulscardname && sys_switch.rank_switch > 0 }}"> | |
| 15 | + <view data-url="/pages/user/plus/plus" catchtap="goto" class="flex-center plusMax"> | |
| 16 | + <image class="fuls" src="{{iurl}}/miniapp/images/userinfo/userinfo/privilege_t.png"></image> | |
| 17 | + <view>{{pulscardname}}</view> | |
| 18 | + </view> | |
| 19 | + </block> | |
| 20 | + </view> | |
| 21 | + | |
| 13 | 22 | <view class="xc-uesr-name"> |
| 14 | 23 | <view class="flex ai-center"> |
| 15 | 24 | <text class="ellipsis-1" style="max-width: 290rpx;display: inline-block">{{userInfo.nickname}}</text> |
| ... | ... | @@ -18,6 +27,9 @@ |
| 18 | 27 | </view> |
| 19 | 28 | </view> |
| 20 | 29 | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 21 | 33 | <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{is_init && gradeId}}" bindtap='jump'> |
| 22 | 34 | <block wx:if="{{cz_val<full_cz_val}}"> |
| 23 | 35 | {{" "}} | ... | ... |
pages/user/index/index.wxss
| ... | ... | @@ -752,8 +752,30 @@ button::after { |
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | |
| 755 | - | |
| 756 | 755 | .action .icon-guan { |
| 757 | 756 | left: auto !important; |
| 758 | 757 | right: 20rpx !important; |
| 758 | +} | |
| 759 | + | |
| 760 | +.plusMax { | |
| 761 | + background: linear-gradient(to bottom, #4c3217, #010100); | |
| 762 | + height: 40rpx; | |
| 763 | + border-radius: 20rpx; | |
| 764 | + line-height: 40rpx; | |
| 765 | + padding-left: 15rpx; | |
| 766 | + padding-right: 15rpx; | |
| 767 | + font-size: 20rpx; | |
| 768 | + position: absolute; | |
| 769 | + left: 50%; | |
| 770 | + bottom: -20rpx; | |
| 771 | + white-space: nowrap; | |
| 772 | + transform: translate(-50%, 0); | |
| 773 | + color: #fff; | |
| 774 | + | |
| 775 | +} | |
| 776 | + | |
| 777 | +.fuls { | |
| 778 | + width: 25rpx; | |
| 779 | + height: 25rpx; | |
| 780 | + margin-right: 5rpx; | |
| 759 | 781 | } |
| 760 | 782 | \ No newline at end of file | ... | ... |