Commit 4ac0c59aef89bffdaae48889520b47022447418b
1 parent
c5bde6e2
顶部颜色
Showing
2 changed files
with
13 additions
and
7 deletions
pages/user/index/index.js
| ... | ... | @@ -42,7 +42,8 @@ Page({ | 
| 42 | 42 | actId: "", //生日活动的id | 
| 43 | 43 | actImg: "", | 
| 44 | 44 | is_assistance: 0, //助力活动 | 
| 45 | - ad_img: "", | |
| 45 | + ad_img: "", | |
| 46 | + usertop_ad: [],//会员顶部配置 | |
| 46 | 47 | add_card_data: '', //等级卡的内容 | 
| 47 | 48 | getusercode_vailtime:10,//会员二维码时效 | 
| 48 | 49 | hiddenCS: true, | 
| ... | ... | @@ -70,8 +71,13 @@ Page({ | 
| 70 | 71 | }, | 
| 71 | 72 | success: function (res) { | 
| 72 | 73 | if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { | 
| 73 | - var item = res.data.data.pageData[0]; | |
| 74 | - if (item && item.ad_code) th.setData({ ad_img: item.ad_code }) | |
| 74 | + var item = res.data.data.pageData[0]; | |
| 75 | + if (item) | |
| 76 | + { | |
| 77 | + th.setData({ usertop_ad:item }); | |
| 78 | + if (item.ad_code) th.setData({ ad_img: item.ad_code }) | |
| 79 | + } | |
| 80 | + | |
| 75 | 81 | } | 
| 76 | 82 | } | 
| 77 | 83 | }) | ... | ... | 
pages/user/index/index.wxml
| ... | ... | @@ -19,12 +19,12 @@ | 
| 19 | 19 | <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{is_init && gradeId}}" bindtap='jump'> | 
| 20 | 20 | <block wx:if="{{cz_val<full_cz_val}}"> | 
| 21 | 21 | {{" "}} | 
| 22 | - <text class="grow-up-val">成长值</text> | |
| 22 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">成长值</text> | |
| 23 | 23 | <view style='margin-left:5rpx; '>{{cz_val}} / {{need_money}}</view> | 
| 24 | 24 | </block> | 
| 25 | 25 | <block wx:else> | 
| 26 | 26 | {{" "}} | 
| 27 | - <text class="grow-up-val">成长值</text> {{cz_val}} | |
| 27 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">成长值</text> {{cz_val}} | |
| 28 | 28 | </block> | 
| 29 | 29 | </view> | 
| 30 | 30 | </view> | 
| ... | ... | @@ -40,7 +40,7 @@ | 
| 40 | 40 | </view> | 
| 41 | 41 | <view wx:if="{{userInfo}}" class="xc-qrcode-frame abs "> | 
| 42 | 42 | <!-- {{iurl}}/miniapp --> | 
| 43 | - <image bindtap='show_tc' class=" xc-qrcode " src="{{iurl}}/miniapp/images/qrcode1.png"></image> | |
| 43 | + <image bindtap='show_tc' class=" xc-qrcode " style="border: 5rpx solid {{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};background: {{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};" src="{{iurl}}/miniapp/images/qrcode1.png"></image> | |
| 44 | 44 | <view style="font-size:12px;color: #fff;">会员卡</view> | 
| 45 | 45 | </view> | 
| 46 | 46 | <view class="flex-vertical abs xc-grow-frame rel" style="display: none"> | 
| ... | ... | @@ -52,7 +52,7 @@ | 
| 52 | 52 | <view class="xc-line-Yes abs" style="width:{{length}}rpx;"></view> | 
| 53 | 53 | </view> | 
| 54 | 54 | |
| 55 | - <view class="xc-grow-val">5000/10000</view> | |
| 55 | + <view class="xc-grow-val">0/0</view> | |
| 56 | 56 | </view> | 
| 57 | 57 | <view class="flex-equality abs xc-assets"> | 
| 58 | 58 | <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}} | ... | ... | 
