feat: 手机端国内/海外/企标-页面缓存

This commit is contained in:
zyn
2023-11-27 17:12:58 +08:00
parent 87346b9b6c
commit 6c6814a4b9
4 changed files with 62 additions and 27 deletions
+53 -22
View File
@@ -127,23 +127,54 @@ export default {
lawsMap:{},
}
},
beforeRouteEnter (to, from, next) {
next(vm => {
// 首页进入 重新加载
if (from.name === 'phoneHome') {
switch (to.query.standType) {
case 'INLAND':
vm.titleName = '国内标准法规库'
break
case 'FOREIGN':
vm.titleName = '海外标准法规库'
break
case 'bussstand':
vm.titleName = '企业标准'
break
case 'POLICY':
vm.titleName = '国内外政策库'
break
}
vm.searchQuery.page = 1
vm.$refs.standardSystemPopupRef.popupShow = true
vm.$refs.scroll.scrollTo(0, 0)
vm.getData()
}
})
},
activated () {
console.log('activated')
},
deactivated () {
console.log('deactivated')
},
created() {
switch (this.$route.query.standType) {
case 'INLAND':
this.titleName = '国内标准法规库'
break
case 'FOREIGN':
this.titleName = '海外标准法规库'
break
case 'bussstand':
this.titleName = '企业标准'
break
case 'POLICY':
this.titleName = '国内外政策库'
break
}
// switch (this.$route.query.standType) {
// case 'INLAND':
// this.titleName = '国内标准法规库'
// break
// case 'FOREIGN':
// this.titleName = '海外标准法规库'
// break
// case 'bussstand':
// this.titleName = '企业标准'
// break
// case 'POLICY':
// this.titleName = '国内外政策库'
// break
// }
this.getDicTypeListCode()
this.getData()
// this.getData()
},
methods: {
pullingUpHandler () {
@@ -269,14 +300,14 @@ export default {
line-height: 40px;
font-size: 18px;
.left-title {
margin-left: 10px;
}
.left-title {
margin-left: 10px;
}
.right-title {
float: right;
margin-right: 34%;
}
.right-title {
float: right;
margin-right: 34%;
}
}
.van-search {