Commit 418985885c2e368eea4ab18d3385e48f8f6dac81

Authored by yvan.ni
2 parents 8bbf81f7 4ac0c59a

Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev

pages/user/index/index.js
@@ -42,7 +42,8 @@ Page({ @@ -42,7 +42,8 @@ Page({
42 actId: "", //生日活动的id 42 actId: "", //生日活动的id
43 actImg: "", 43 actImg: "",
44 is_assistance: 0, //助力活动 44 is_assistance: 0, //助力活动
45 - ad_img: "", 45 + ad_img: "",
  46 + usertop_ad: [],//会员顶部配置
46 add_card_data: '', //等级卡的内容 47 add_card_data: '', //等级卡的内容
47 getusercode_vailtime:10,//会员二维码时效 48 getusercode_vailtime:10,//会员二维码时效
48 hiddenCS: true, 49 hiddenCS: true,
@@ -70,8 +71,13 @@ Page({ @@ -70,8 +71,13 @@ Page({
70 }, 71 },
71 success: function (res) { 72 success: function (res) {
72 if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) { 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,12 +19,12 @@
19 <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{is_init && gradeId}}" bindtap='jump'> 19 <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{is_init && gradeId}}" bindtap='jump'>
20 <block wx:if="{{cz_val<full_cz_val}}"> 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 <view style='margin-left:5rpx; '>{{cz_val}} / {{need_money}}</view> 23 <view style='margin-left:5rpx; '>{{cz_val}} / {{need_money}}</view>
24 </block> 24 </block>
25 <block wx:else> 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 </block> 28 </block>
29 </view> 29 </view>
30 </view> 30 </view>
@@ -40,7 +40,7 @@ @@ -40,7 +40,7 @@
40 </view> 40 </view>
41 <view wx:if="{{userInfo}}" class="xc-qrcode-frame abs "> 41 <view wx:if="{{userInfo}}" class="xc-qrcode-frame abs ">
42 <!-- {{iurl}}/miniapp --> 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 <view style="font-size:12px;color: #fff;">会员卡</view> 44 <view style="font-size:12px;color: #fff;">会员卡</view>
45 </view> 45 </view>
46 <view class="flex-vertical abs xc-grow-frame rel" style="display: none"> 46 <view class="flex-vertical abs xc-grow-frame rel" style="display: none">
@@ -52,7 +52,7 @@ @@ -52,7 +52,7 @@
52 <view class="xc-line-Yes abs" style="width:{{length}}rpx;"></view> 52 <view class="xc-line-Yes abs" style="width:{{length}}rpx;"></view>
53 </view> 53 </view>
54 54
55 - <view class="xc-grow-val">5000/10000</view> 55 + <view class="xc-grow-val">0/0</view>
56 </view> 56 </view>
57 <view class="flex-equality abs xc-assets"> 57 <view class="flex-equality abs xc-assets">
58 <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}} 58 <view class="t-c typefont" bindtap='balance'>{{yuer?yuer:0}}