Commit d4f24df0a4c15ad6f8f411893e8f73194daca2f8

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

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

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