Commit 69cfe63975905b8b68ba359e601f5ef9b2168e01

Authored by yvan.ni
1 parent 73597e59

自定义的优化

components/diy_user_info/diy_user_info.js
@@ -57,6 +57,11 @@ Component({ @@ -57,6 +57,11 @@ Component({
57 if (t_swi) { 57 if (t_swi) {
58 th.setData({sys_switch: t_swi}); 58 th.setData({sys_switch: t_swi});
59 } 59 }
  60 + var getuserqy_color=e.userqy_color;
  61 + if (getuserqy_color) getuserqy_color = JSON.parse(getuserqy_color)
  62 + if(getuserqy_color){
  63 + th.setData({userqy_color:getuserqy_color})
  64 + }
60 }) 65 })
61 66
62 }, 67 },
components/diy_user_info/diy_user_info.wxss
@@ -228,7 +228,6 @@ @@ -228,7 +228,6 @@
228 } 228 }
229 .gr_box_item{ 229 .gr_box_item{
230 height: 16rpx; 230 height: 16rpx;
231 - width: 100px;  
232 background-color: #999; 231 background-color: #999;
233 } 232 }
234 233
components/diy_user_info/style1.wxml
@@ -25,12 +25,15 @@ @@ -25,12 +25,15 @@
25 <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}" bindtap='jump'> 25 <view class="flex fs24 xc-grow-ups" style="margin-left:8rpx;margin-top:6rpx" wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}" bindtap='jump'>
26 <block wx:if="{{qy_data.cz_val<qy_data.full_cz_val}}"> 26 <block wx:if="{{qy_data.cz_val<qy_data.full_cz_val}}">
27 {{" "}} 27 {{" "}}
28 - <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text>  
29 - <view style='margin-left:5rpx; '>{{qy_data.cz_val}} / {{qy_data.need_money}}</view> 28 + <text class="grow-up-val" style="background:{{userqy_color.secord_bgcolor?userqy_color.secord_bgcolor:'#fe9db5'}};color:{{userqy_color.font_color}}">{{rfmName}}</text>
  29 + <view style='margin-left:5rpx; color:{{userqy_color.font_color}} '>{{qy_data.cz_val}} / {{qy_data.need_money}}</view>
30 </block> 30 </block>
31 <block wx:else> 31 <block wx:else>
32 {{" "}} 32 {{" "}}
33 - <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> {{cz_val}} 33 + <text style="color:{{userqy_color.font_color}}">
  34 + <text class="grow-up-val" style="background:{{userqy_color.secord_bgcolor?userqy_color.secord_bgcolor:'#fe9db5'}};">{{rfmName}}</text>{{cz_val}}
  35 + </text>
  36 +
34 </block> 37 </block>
35 </view> 38 </view>
36 </view> 39 </view>
components/diy_user_info/style2.wxml
@@ -24,12 +24,12 @@ @@ -24,12 +24,12 @@
24 <view class="flex fs24 xc-grow-ups jc-center" style="margin-left:8rpx;margin-top:4rpx" wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}" bindtap='jump'> 24 <view class="flex fs24 xc-grow-ups jc-center" style="margin-left:8rpx;margin-top:4rpx" wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}" bindtap='jump'>
25 <block wx:if="{{qy_data.cz_val<qy_data.full_cz_val}}"> 25 <block wx:if="{{qy_data.cz_val<qy_data.full_cz_val}}">
26 {{" "}} 26 {{" "}}
27 - <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text>  
28 - <view style='margin-left:5rpx; '>{{qy_data.cz_val}} / {{qy_data.need_money}}</view> 27 + <text class="grow-up-val" style="background:{{userqy_color.secord_bgcolor?userqy_color.secord_bgcolor:'#fe9db5'}}; color:{{userqy_color.font_color}}">{{rfmName}}</text>
  28 + <view style='margin-left:5rpx; color:{{userqy_color.font_color}}'>{{qy_data.cz_val}} / {{qy_data.need_money}}</view>
29 </block> 29 </block>
30 <block wx:else> 30 <block wx:else>
31 {{" "}} 31 {{" "}}
32 - <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> {{cz_val}} 32 + <text class="grow-up-val" style="background:{{userqy_color.secord_bgcolor?userqy_color.secord_bgcolor:'#fe9db5'}}; color:{{userqy_color.font_color}}">{{rfmName}}</text> {{cz_val}}
33 </block> 33 </block>
34 </view> 34 </view>
35 </view> 35 </view>
components/diy_user_info/style3.wxml
@@ -14,9 +14,9 @@ @@ -14,9 +14,9 @@
14 14
15 <!-- 显示成长值,综合分 --> 15 <!-- 显示成长值,综合分 -->
16 <block wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}"> 16 <block wx:if="{{qy_data && qy_data.is_init && qy_data.gradeId && object.is_cz}}">
17 - <view class="fs22" style="margin-top:15rpx">距白金卡会员还有111</view> 17 + <view class="fs22" style="margin-top:15rpx;color:{{userqy_color.font_color}} ">距{{qy_data.nextGradeName}}还有{{qy_data.need_money-qy_data.cz_val}}</view>
18 <view class="gr_box" style="margin-top:10rpx"> 18 <view class="gr_box" style="margin-top:10rpx">
19 - <view class="gr_box_item"></view> 19 + <view class="gr_box_item" style="width:{{(qy_data.cz_val*100)/qy_data.need_money}}%;background:{{userqy_color.secord_bgcolor?userqy_color.secord_bgcolor:'#fe9db5'}}"></view>
20 </view> 20 </view>
21 </block> 21 </block>
22 22
components/diy_user_my_rights/diy_user_my_rights.js
@@ -32,6 +32,13 @@ Component({ @@ -32,6 +32,13 @@ Component({
32 getApp().showWarning("请稍后重试"); 32 getApp().showWarning("请稍后重试");
33 } 33 }
34 }, 34 },
  35 +
  36 + //--跳转到权益页面--
  37 + go_qy: function () {
  38 + if (!getApp().globalData.userInfo) return false;
  39 + var url = "/pages/user/userqy/userqy";
  40 + getApp().goto(url);
  41 + },
35 }, 42 },
36 observers: { 43 observers: {
37 // 监听 num1 和 num2 数据的变化 44 // 监听 num1 和 num2 数据的变化
pages/user/index/index.js
@@ -441,6 +441,8 @@ Page({ @@ -441,6 +441,8 @@ Page({
441 if (cz_vals < im.BuyGradeSum && need_money == 0) { 441 if (cz_vals < im.BuyGradeSum && need_money == 0) {
442 need_money = im.BuyGradeSum; 442 need_money = im.BuyGradeSum;
443 obj.need_money = need_money; 443 obj.need_money = need_money;
  444 + obj.nextGradeName=im.GradeName;
  445 + break;
444 } 446 }
445 } 447 }
446 448