Commit 47835f44bd19ef9395adaa49a3aadcac0208b80c
1 parent
3c158da8
增加会员权益颜色
Showing
3 changed files
with
24 additions
and
9 deletions
pages/user/userqy/userqy.js
... | ... | @@ -27,6 +27,7 @@ Page({ |
27 | 27 | is_full:0, //是否满级 |
28 | 28 | |
29 | 29 | cur_g_num:0,//当前级需要多少钱 |
30 | + userqy_color:null,//颜色值 | |
30 | 31 | }, |
31 | 32 | |
32 | 33 | swiperChange: function (e) { |
... | ... | @@ -57,6 +58,14 @@ Page({ |
57 | 58 | var gl_data=getApp().globalData; |
58 | 59 | var sw_cur_id=0; |
59 | 60 | var th=this; |
61 | + //颜色值 | |
62 | + getApp().getConfig2(function(e) { | |
63 | + var getuserqy_color=e.userqy_color; | |
64 | + if (getuserqy_color) getuserqy_color = JSON.parse(getuserqy_color) | |
65 | + if(getuserqy_color){ | |
66 | + th.setData({userqy_color:getuserqy_color}) | |
67 | + } | |
68 | + }) | |
60 | 69 | //获取成长值 |
61 | 70 | await getApp().request.promiseGet("/api/weshop/users/grade/aftervipinfo/get",{ |
62 | 71 | data:{ storeId:os.stoid,userId:gl_data.user_id } | ... | ... |
pages/user/userqy/userqy.wxml
... | ... | @@ -2,22 +2,22 @@ |
2 | 2 | <view class="xc-userqy-frame"> |
3 | 3 | <!-- 顶部 --> |
4 | 4 | <view class='user-frame rel'> |
5 | - <image class="arc" src="{{iurl}}/miniapp/images/userqy/user_userqy_arc.jpg"></image> | |
5 | + <view class="arc" style="background:{{userqy_color.first_bgcolor}}"></view> | |
6 | 6 | <image class="user-img circle abs" src="{{userinfo.head_pic?userinfo.head_pic:defaultAvatar}}"> </image> |
7 | - <view class="user-name abs "> | |
7 | + <view class="user-name abs " style="color:{{userqy_color.font_color}}"> | |
8 | 8 | {{userinfo.nickname}} <view class="hvip"><image class="vip-mem" src="{{iurl}}/miniapp/images/vip_hg0.png"></image>{{GradeName}}</view> |
9 | 9 | </view> |
10 | 10 | <!-- 当前是什么等级卡 --> |
11 | 11 | |
12 | 12 | <view class='flex abs xc-grow-frame' bindtap='go_cz'> |
13 | - <view class="four-level-word new xc-grow-val">成长值</view> | |
14 | - <view class="progress-bar-not" > | |
15 | - <view class="progress-bar-yes" wx:if="{{cz_val>full_cz_val}}" style='width:100%'></view> | |
16 | - <view class="progress-bar-yes" wx:else style='width:{{cz_val/need_money*100}}%'></view> | |
13 | + <view class="four-level-word new xc-grow-val" style="color:{{userqy_color.font_color}}; background:{{userqy_color.secord_bgcolor}}">成长值</view> | |
14 | + <view class="progress-bar-not"> | |
15 | + <view class="progress-bar-yes" wx:if="{{cz_val>full_cz_val}}" style='width:100%;background:{{userqy_color.secord_bgcolor}}'></view> | |
16 | + <view class="progress-bar-yes" wx:else style='width:{{cz_val/need_money*100}}%;background:{{userqy_color.secord_bgcolor}}'></view> | |
17 | 17 | </view> |
18 | 18 | |
19 | - <view class="progress-bar-val four-level-word new" wx:if="{{cz_val<full_cz_val}}">{{filter.pInt(cz_val)}} / {{need_money}}</view> | |
20 | - <view class="progress-bar-val four-level-word new" wx:else>{{filter.pInt(cz_val)}}</view> | |
19 | + <view class="progress-bar-val four-level-word new" style="color:{{userqy_color.font_color}}; " wx:if="{{cz_val<full_cz_val}}" >{{filter.pInt(cz_val)}} / {{need_money}}</view> | |
20 | + <view class="progress-bar-val four-level-word new" style="color:{{userqy_color.font_color}}; " wx:else>{{filter.pInt(cz_val)}}</view> | |
21 | 21 | |
22 | 22 | </view> |
23 | 23 | ... | ... |
pages/user/userqy/userqy.wxss
... | ... | @@ -9,7 +9,13 @@ |
9 | 9 | } |
10 | 10 | .xc-userqy-frame .user-frame .arc{ |
11 | 11 | width: 750rpx; |
12 | - height: 444rpx; | |
12 | + height: 444rpx; | |
13 | + left: -20%; | |
14 | + top: 0; | |
15 | + z-index: -1; | |
16 | + content: ''; | |
17 | + border-radius: 0 0 20% 20%; | |
18 | + background: #ff7295; | |
13 | 19 | |
14 | 20 | } |
15 | 21 | .xc-userqy-frame .user-frame .user-img{ | ... | ... |