Commit d4f24df0a4c15ad6f8f411893e8f73194daca2f8

Authored by 前端研发-钱巧玲
1 parent 03c1d70f

会员标签更改标签赠送积分bug修复

pages/user/labels/labels.js
... ... @@ -16,6 +16,7 @@ Page({
16 16 user_label_val: "", //奖励多少
17 17 user_label_type: "", //奖励类型(1积分,1成长值)
18 18 is_modify: 0, //判断是第一次填写还是修改(0填写,1修改)
  19 + isread:0,//是否读取
19 20 },
20 21 //点击选择兴趣标签把值放到已选中
21 22 click_label: function(e) {
... ... @@ -111,11 +112,15 @@ Page({
111 112 }).then(res => {
112 113 if (res.data.code == 0) {
113 114 th.setData({
114   - interest_lables: res.data.data.pageData
  115 + interest_lables: res.data.data.pageData,
  116 + isread:1
115 117 })
116 118 th.query_checklabels();
117 119 } else {
118 120 getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
  121 + th.setData({
  122 + isread: 1
  123 + })
119 124 return false;
120 125 }
121 126 })
... ... @@ -150,7 +155,7 @@ Page({
150 155 }
151 156 }
152 157 //如何有之前有选择兴趣标签的话,再进来的话就是修改
153   - if (data.VipLabelId != "") {
  158 + if (data.VipLabelId !='') {
154 159 th.setData({
155 160 is_modify: 1
156 161 })
... ... @@ -170,16 +175,17 @@ Page({
170 175 var th = this;
171 176 var is_modify = th.data.is_modify; //是否是修改
172 177 var check_label = th.data.check_label; //用户选择
  178 + var user_label_val = th.data.user_label_val; //选择标签奖励多少
173 179 var remark = "领取";
  180 + var user_label_type = th.data.user_label_type; //赠送类型
174 181 if (is_modify) {
175 182 user_label_type = 0;
176 183 remark = "修改";
  184 + user_label_val = 0;
177 185 }
178 186 if (check_label.length < 1) {
179 187 getApp().my_warnning("完成兴趣标签才能" + remark + "哦~", 0, th);
180 188 } else {
181   - var user_label_val = th.data.user_label_val; //选择标签奖励多少
182   - var user_label_type = th.data.user_label_type; //赠送类型
183 189 var url = "/api/weshop/marketing/holiday/vip/interest/label/update"; //更新标签接口地址
184 190 var nav_url = "/pages/user/userinfo/userinfo"; //领取成功之后跳转页面
185 191 var vipLabel = ""; //选择的标签名称
... ... @@ -197,7 +203,7 @@ Page({
197 203 }
198 204 }
199 205 var my_confirm = th.selectComponent("#my_confirm"); //组件的id
200   - remark = "标签赠送";
  206 + remark = "兴趣标签赠送";
201 207 if (is_modify) {
202 208  
203 209 my_confirm.open_cancel(0);
... ...
pages/user/labels/labels.wxml
... ... @@ -54,7 +54,7 @@
54 54  
55 55 </view>
56 56  
57   -<view wx:if="{{interest_lables.length<1}}" class="flex-center fs30" style="overflow: hidden;margin-top:40%;">
  57 +<view wx:if="{{interest_lables.length<1 && isread}}" class="flex-center fs30" style="overflow: hidden;margin-top:40%;">
58 58 <view>
59 59 <view class="flex-center">
60 60 <image class="no_labels" src="{{iurl}}miniapp/images/yyservice/no_history.png"></image>
... ...
pages/user/labels/labels.wxss
1   -/* page{
  1 +page{
2 2 height: 100%;
3   -} */
  3 +}
4 4 .padding {
5 5 padding: 0rpx 65rpx;
6 6 }
... ...