Commit 95b8137a55e693931d20fd038fdf707fecc36a46

Authored by yvan.ni
1 parent 942223e0

完善信息

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