diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index 3d669c0..b8dcc73 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -93,16 +93,17 @@ Page({ }).then(res => { if (res.data.code == 0) { var data = res.data.data; - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签 + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签 if(VipLabel){ var dateList = data.VipLabel.split(","); + var arr=[]; for (var i in dateList) { if (dateList[i] != "") { - VipLabel.push(dateList[i]); + arr.push(dateList[i]); } } th.setData({ - check_label: VipLabel + check_label: arr }) } diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js index 48bc384..b199dce 100644 --- a/pages/user/userinfo/userinfo.js +++ b/pages/user/userinfo/userinfo.js @@ -115,17 +115,18 @@ Page({ storeId: r.stoid } }).then(res => { - if (res.data.code == 0 && res.data.data && res.data.data.check_label) { + if (res.data.code == 0 && res.data.data && res.data.data.VipLabel) { var data = res.data.data; - var VipLabel = th.data.check_label; //通过id标签找到已选择的标签 + var VipLabel = th.data.VipLabel; //通过id标签找到已选择的标签 var dateList = data.VipLabel.split(","); + var arr=[]; for (var i in dateList) { if (dateList[i] != "") { - VipLabel.push(dateList[i]); + arr.push(dateList[i]); } } th.setData({ - check_label: VipLabel + check_label: arr }) } })