Commit 60f1145d authored by 胡's avatar

fix: 页面缓存优化

parent 709e23d0
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<template> <template>
<h-view id="np-base-info"> <h-view id="np-base-info">
<h-header :proportion="[5, 1, 1]" class="bar-custom"> <h-header :proportion="[5, 1, 1]" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()"> <div slot="left" class="h-header-btn" @click="$route.meta.keepAlive = false;$routeGo();">
<img src="@/assets/userBind/arrow.png" /> <img src="@/assets/userBind/arrow.png" />
<span>基本信息</span> <span>基本信息</span>
</div> </div>
...@@ -494,6 +494,7 @@ export default { ...@@ -494,6 +494,7 @@ export default {
beforeRouteEnter(to, from, next) { beforeRouteEnter(to, from, next) {
// 绑定查询入口 // 绑定查询入口
next(vm => { next(vm => {
vm.$route.meta.keepAlive = true;
vm.isAddNewType = false vm.isAddNewType = false
if (['/tab/my-info', '/tab/function-center', '/Setting', '/myBindUser'].includes(from.fullPath)) { if (['/tab/my-info', '/tab/function-center', '/Setting', '/myBindUser'].includes(from.fullPath)) {
if (JSON.parse(window.localStorage.getItem('handleUser')).status === 'APPROVED') { if (JSON.parse(window.localStorage.getItem('handleUser')).status === 'APPROVED') {
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<template> <template>
<h-view id="base-info" class="public-style" title="基本信息"> <h-view id="base-info" class="public-style" title="基本信息">
<h-header :proportion="[5,1,1]" class="bar-custom"> <h-header :proportion="[5,1,1]" class="bar-custom">
<div slot="left" class="h-header-btn" @click="$routeGo()"> <div slot="left" class="h-header-btn" @click="$route.meta.keepAlive = false;$routeGo()">
<img src="@/assets/userBind/arrow.png"> <img src="@/assets/userBind/arrow.png">
<span>用户绑定</span> <span>用户绑定</span>
</div> </div>
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
v-model="baseInfo.agent_username" v-model="baseInfo.agent_username"
> --> > -->
<!-- <input v-if="!bpClass_flag" slot="content" :placeholder="type" v-model="baseInfo.business_license_num" > --> <!-- <input v-if="!bpClass_flag" slot="content" :placeholder="type" v-model="baseInfo.business_license_num" > -->
</item> <!-- </item> -->
<button v-if="isAddNewType" class="type-save" @click="addNewRole">新增角色</button> <button v-if="isAddNewType" class="type-save" @click="addNewRole">新增角色</button>
</list-item> </list-item>
<div class="userInfo martop">企业信息</div> <div class="userInfo martop">企业信息</div>
...@@ -615,6 +615,7 @@ export default { ...@@ -615,6 +615,7 @@ export default {
created () {}, created () {},
beforeRouteEnter (to, from, next) { beforeRouteEnter (to, from, next) {
next(vm => { next(vm => {
vm.$route.meta.keepAlive = true;
vm.getBpType() vm.getBpType()
vm.getProvince() vm.getProvince()
vm.isAddNewType = false vm.isAddNewType = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment