Commit 95b8137a55e693931d20fd038fdf707fecc36a46

Authored by yvan.ni
1 parent 942223e0

完善信息

packageA/pages/profile/profile.js
... ... @@ -93,16 +93,17 @@ Page({
93 93 }).then(res => {
94 94 if (res.data.code == 0) {
95 95 var data = res.data.data;
96   - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签
  96 + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签
97 97 if(VipLabel){
98 98 var dateList = data.VipLabel.split(",");
  99 + var arr=[];
99 100 for (var i in dateList) {
100 101 if (dateList[i] != "") {
101   - VipLabel.push(dateList[i]);
  102 + arr.push(dateList[i]);
102 103 }
103 104 }
104 105 th.setData({
105   - check_label: VipLabel
  106 + check_label: arr
106 107 })
107 108 }
108 109  
... ...
pages/user/userinfo/userinfo.js
... ... @@ -115,17 +115,18 @@ Page({
115 115 storeId: r.stoid
116 116 }
117 117 }).then(res => {
118   - if (res.data.code == 0 && res.data.data && res.data.data.check_label) {
  118 + if (res.data.code == 0 && res.data.data && res.data.data.VipLabel) {
119 119 var data = res.data.data;
120   - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签
  120 + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签
121 121 var dateList = data.VipLabel.split(",");
  122 + var arr=[];
122 123 for (var i in dateList) {
123 124 if (dateList[i] != "") {
124   - VipLabel.push(dateList[i]);
  125 + arr.push(dateList[i]);
125 126 }
126 127 }
127 128 th.setData({
128   - check_label: VipLabel
  129 + check_label: arr
129 130 })
130 131 }
131 132 })
... ...