miniprogram/pages/user/index.ts
@@ -4,9 +4,11 @@ Page({ data: { swcurrent: 0, isShow: false, userInfo: {}, causeList: [] causeList: [], images: [] }, // 事件处理函数 bindViewTap() { @@ -28,10 +30,18 @@ method: "GET", header: { 'token': wx.getStorageSync('token') }, success: (res) => { console.log(res) this.setData({ causeList: res.data.data res.data.data.map(i => { if (i.photoStr != null) { i.photoStr = i.photoStr.split(",").map(i => user.globalData.imageUrl + "/img/" + i), this.data.images = i.photoStr } }) this.setData({ causeList: res.data.data, }) } }) },