[图片] [图片] [图片]
在onshow()中使用setdata不生效呢?onShow: function () { let pages = getCurrentPages(), currPage = pages[pages.length - 1]; console.log(currPage.data) if(currPage.data.uid !== undefined){ console.log('uid') this.setData({ clickNumber: 0 }); console.log(this.data.clickNumber) } else if (currPage.data.type === "2"){ var shsh = new Array(); shsh['name'] = currPage.data.name shsh['mobile'] = currPage.data.mobile shsh['address'] = currPage.data.address shsh['city'] = currPage.data.city shsh['county'] = currPage.data.county shsh['province'] = currPage.data.province console.log('收货') console.log(currPage.data.mobile) this.setData({ clickNumber: 0, shsh: shsh }) console.log(shsh); }else{ console.log('其他') this.setData({ clickNumber: 0, }) } },
2019-10-16