diff --git a/gold-system/src/util/http.js b/gold-system/src/util/http.js index 48e95c6..5672500 100644 --- a/gold-system/src/util/http.js +++ b/gold-system/src/util/http.js @@ -34,7 +34,7 @@ export default function (options) { // 清除localStorage中的token localStorage.removeItem('token'); // // 执行重新登录的逻辑,例如跳转到登录页面 - window.location.href = '/login'; + window.location.href = '/jtzy/Product/crm/hwjb2.0/index.html#/login'; // 可以在这里返回一个特定的值或者对象,以便调用者知道需要重新登录 return { needsLogin: true }; } else { diff --git a/gold-system/src/views/index.vue b/gold-system/src/views/index.vue index dd16b34..88d5b93 100644 --- a/gold-system/src/views/index.vue +++ b/gold-system/src/views/index.vue @@ -46,6 +46,8 @@ function logout() { localStorage.removeItem("token"); localStorage.clear(); router.push("/login"); + //添加刷新页面的代码 + window.location.reload(); ElMessage.success("退出成功"); } @@ -82,7 +84,8 @@ onMounted(async function () { v-if=" adminData.permission == 1 || adminData.permission == 2 || - adminData.permission == 3 + adminData.permission == 3 || + adminData.permission == 5 " > @@ -93,7 +96,11 @@ onMounted(async function () {