改进Film页面刷新的逻辑,避免不必要的刷新

This commit is contained in:
haiyangcui
2020-11-03 13:56:41 +01:00
parent 55d1740354
commit 022b1b28ad

View File

@@ -560,8 +560,10 @@ export default {
this.sites = res.filter((item, index, self) => {
return self.indexOf(item) >= 0 && item.isActive
})
this.site = this.sites[0]
this.siteClick(this.site)
if (this.site === undefined || !this.sites.some(x => x.key === this.site.key)) {
this.site = this.sites[0]
this.siteClick(this.site)
}
}
})
}