From 256db39fb8d2bbdbcb66f5dec0a64eecb7007d24 Mon Sep 17 00:00:00 2001 From: zhl Date: Tue, 3 Dec 2019 16:51:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E8=AF=A6=E6=83=85=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E8=BF=94=E5=9B=9E=E6=97=B6=E4=B8=8D=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/details/index.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/details/index.vue b/src/pages/details/index.vue index e451bb6..44b905e 100644 --- a/src/pages/details/index.vue +++ b/src/pages/details/index.vue @@ -61,10 +61,24 @@ export default { onLoad(options) { this._id = options._id }, + onShow() { + let tmpData = this.$mp.page.data['$root']; + if (tmpData) { + this._id = tmpData[0]._id; + this.maker = tmpData[0].maker; + this.hotList = tmpData[0].hotList; + this.users = tmpData[0].users; + } + }, mounted() { this.getData() this.getHot() }, + onUnload() { + this.maker = {}; + this.users = ''; + this.hotList.length = 0; + }, methods: { async getData() { try {