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 {