Commit c8ac47d631190d29485ee33649bab0e5a87e859b
1 parent
4aa53225
成长值转综合得分
Showing
4 changed files
with
57 additions
and
15 deletions
pages/user/index/index.js
| ... | ... | @@ -50,7 +50,8 @@ Page({ |
| 50 | 50 | |
| 51 | 51 | is_show_recommend:false, |
| 52 | 52 | |
| 53 | - has_rj:0 | |
| 53 | + has_rj:0, | |
| 54 | + rfmName:'成长值' | |
| 54 | 55 | |
| 55 | 56 | }, |
| 56 | 57 | goto_nav: function (e) { |
| ... | ... | @@ -234,7 +235,10 @@ Page({ |
| 234 | 235 | |
| 235 | 236 | s.setData({ |
| 236 | 237 | userInfo: e |
| 237 | - }); | |
| 238 | + }); | |
| 239 | + | |
| 240 | + //--查询会员权益是否成绩 | |
| 241 | + s.getVison() | |
| 238 | 242 | |
| 239 | 243 | //-- 要调用接口,获取卡的钱 -- |
| 240 | 244 | var url = "/api/weshop/wxuser/getWxCardInfo?storeId=" + os.stoid + "&userId=" + e.user_id; |
| ... | ... | @@ -510,7 +514,29 @@ Page({ |
| 510 | 514 | |
| 511 | 515 | |
| 512 | 516 | |
| 513 | - }, | |
| 517 | + }, | |
| 518 | + //获取会员权益等级是否升级 | |
| 519 | + getVison(){ | |
| 520 | + let isRfm = wx.getStorageSync('isRfm') | |
| 521 | + if (isRfm) { | |
| 522 | + this.setData({ | |
| 523 | + rfmName:'综合分' | |
| 524 | + }) | |
| 525 | + }else{ | |
| 526 | + rq.get(`/api/weshop/users/grade/vip/getSysPara?storeId=${os.stoid}&classInfo=IsUpRMF`, { | |
| 527 | + success: (res)=>{ | |
| 528 | + console.log('会员权益等级升级查询-------'); | |
| 529 | + console.log(res); | |
| 530 | + if (res.data.code == 0 && res.data.data && res.data.data.IsBool){ | |
| 531 | + this.setData({ | |
| 532 | + rfmName:'综合分' | |
| 533 | + }) | |
| 534 | + wx.setStorageSync('isRfm', true) | |
| 535 | + } | |
| 536 | + } | |
| 537 | + }) | |
| 538 | + } | |
| 539 | + }, | |
| 514 | 540 | |
| 515 | 541 | //判断会员是后有改服务项目 |
| 516 | 542 | check_is_has_qy: function (item, g_qy_list) { |
| ... | ... | @@ -865,7 +891,12 @@ Page({ |
| 865 | 891 | }, |
| 866 | 892 | |
| 867 | 893 | jump: function () { |
| 868 | - getApp().goto("/packageE/pages/user/grow_value/grow_value") | |
| 894 | + let isRfm = wx.getStorageSync('isRfm') | |
| 895 | + //升级为RFM就不跳转成长值详情 | |
| 896 | + if (!isRfm) { | |
| 897 | + getApp().goto("/packageE/pages/user/grow_value/grow_value") | |
| 898 | + } | |
| 899 | + | |
| 869 | 900 | }, |
| 870 | 901 | // 判断生日营销的页面是不是存在 |
| 871 | 902 | birthday: function () { | ... | ... |
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" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">成长值</text> | |
| 22 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</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" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">成长值</text> {{cz_val}} | |
| 27 | + <text class="grow-up-val" style="background:{{usertop_ad.bgcolor?usertop_ad.bgcolor:'#fe9db5'}};">{{rfmName}}</text> {{cz_val}} | |
| 28 | 28 | </block> |
| 29 | 29 | </view> |
| 30 | 30 | </view> |
| ... | ... | @@ -44,7 +44,7 @@ |
| 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"> |
| 47 | - <view class="xc-grow-up">成长值</view> | |
| 47 | + <view class="xc-grow-up">{{rfmName}}</view> | |
| 48 | 48 | |
| 49 | 49 | <view class="xc-line-not rel"> |
| 50 | 50 | <image class="xc-bj-img abs" src="{{iurl}}/miniapp/images/baijing.png"></image> | ... | ... |
pages/user/userqy/userqy.js
| ... | ... | @@ -26,7 +26,7 @@ Page({ |
| 26 | 26 | this_curr_id:0, |
| 27 | 27 | GradeName:'', |
| 28 | 28 | is_full:0, //是否满级 |
| 29 | - | |
| 29 | + rfmName:'成长值', | |
| 30 | 30 | cur_g_num:0,//当前级需要多少钱 |
| 31 | 31 | userqy_color:null,//颜色值 |
| 32 | 32 | }, |
| ... | ... | @@ -79,6 +79,13 @@ Page({ |
| 79 | 79 | GradeName=data.GradeName; |
| 80 | 80 | }) |
| 81 | 81 | |
| 82 | + let isRfm = wx.getStorageSync('isRfm') | |
| 83 | + if (isRfm) { | |
| 84 | + this.setData({ | |
| 85 | + rfmName:'综合分' | |
| 86 | + }) | |
| 87 | + } | |
| 88 | + | |
| 82 | 89 | //获取卡类列表 |
| 83 | 90 | await getApp().request.promiseGet("/api/weshop/users/grade/vipgradeinfo/page",{ |
| 84 | 91 | data:{ storeId:os.stoid} |
| ... | ... | @@ -219,7 +226,11 @@ Page({ |
| 219 | 226 | }, |
| 220 | 227 | |
| 221 | 228 | go_cz:function(){ |
| 222 | - getApp().goto("/packageE/pages/user/grow_value/grow_value") | |
| 229 | + let isRfm = wx.getStorageSync('isRfm') | |
| 230 | + //升级为RFM就不跳转成长值详情 | |
| 231 | + if (!isRfm) { | |
| 232 | + getApp().goto("/packageE/pages/user/grow_value/grow_value") | |
| 233 | + } | |
| 223 | 234 | }, |
| 224 | 235 | |
| 225 | 236 | //获取卡类的gr_id | ... | ... |
pages/user/userqy/userqy.wxml
| ... | ... | @@ -10,7 +10,7 @@ |
| 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" style="color:{{userqy_color.font_color}}; background:{{userqy_color.secord_bgcolor}}">成长值</view> | |
| 13 | + <view class="four-level-word new xc-grow-val" style="color:{{userqy_color.font_color}}; background:{{userqy_color.secord_bgcolor}}">{{rfmName}}</view> | |
| 14 | 14 | <view class="progress-bar-not"> |
| 15 | 15 | <view class="progress-bar-yes" wx:if="{{cz_val>full_cz_val}}" style='width:100%;background:{{userqy_color.secord_bgcolor}}'></view> |
| 16 | 16 | <view class="progress-bar-yes" wx:else style='width:{{cz_val/need_money*100}}%;background:{{userqy_color.secord_bgcolor}}'></view> |
| ... | ... | @@ -34,16 +34,16 @@ |
| 34 | 34 | <!-- 上部分的文字判断 --> |
| 35 | 35 | <view class=" abs white discounts four-level-word" wx:if="{{cz_val<item.BuyGradeSum && gradeId!=item.Id}}" style="color:#{{item.FontColor}};"> |
| 36 | 36 | <block wx:if="{{index!=backClass.length-1}}"> |
| 37 | - [{{item.GradeName}}]365天累计成长值≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}] | |
| 37 | + [{{item.GradeName}}]365天累计{{rfmName}}≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}] | |
| 38 | 38 | </block> |
| 39 | 39 | <block wx:else> |
| 40 | - [{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum }}可保级 | |
| 40 | + [{{item.GradeName}}]365天累计{{rfmName}}≥{{item.BuyGradeSum }}可保级 | |
| 41 | 41 | </block> |
| 42 | 42 | </view> |
| 43 | - <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}" style="color:#{{item.FontColor}};">会员将在{{filter.replace_time2(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计成长值≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计成长值≥{{item.BuyGradeSum}}可保级</text> | |
| 43 | + <view class=" abs white discounts four-level-word" wx:if="{{gradeId==item.Id}}" style="color:#{{item.FontColor}};">会员将在{{filter.replace_time2(gradeEndDate)}}到期,<text wx:if="{{need_money>0}}">365天累计{{rfmName}}≥{{need_money}}可升级[{{ backClass[index+1].GradeName}}]</text><text wx:else >[{{item.GradeName}}]365天累计{{rfmName}}≥{{item.BuyGradeSum}}可保级</text> | |
| 44 | 44 | </view> |
| 45 | 45 | <view class=" abs white discounts four-level-word" wx:if="{{gradeId!=item.Id && cz_val>item.BuyGradeSum }}" style="color:#{{item.FontColor}};"> |
| 46 | - [{{item.GradeName}}]365天累计成长值≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}] | |
| 46 | + [{{item.GradeName}}]365天累计{{rfmName}}≥{{backClass[index+1].BuyGradeSum }}可升级[{{ backClass[index+1].GradeName}}] | |
| 47 | 47 | </view> |
| 48 | 48 | |
| 49 | 49 | <!-- 下部分的文字判断 --> |
| ... | ... | @@ -52,7 +52,7 @@ |
| 52 | 52 | </view> |
| 53 | 53 | |
| 54 | 54 | <view wx:if="{{cz_val<item.BuyGradeSum && gradeId!=item.Id }}" class=" abs white money four-level-word" style="color:#{{item.FontColor}};"> |
| 55 | - 距离{{item.GradeName}}还需{{ filter.pInt(item.BuyGradeSum-cz_val)}}成长值 | |
| 55 | + 距离{{item.GradeName}}还需{{ filter.pInt(item.BuyGradeSum-cz_val)}}{{rfmName}} | |
| 56 | 56 | </view> |
| 57 | 57 | <view wx:if="{{gradeId==item.Id}}" class=" abs white money four-level-word new curword" style="color:#{{item.FontColor}};"> |
| 58 | 58 | <view class="rel"> | ... | ... |