修正详情页面返回时不刷新数据的bug
This commit is contained in:
parent
f31e949faa
commit
256db39fb8
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user