From f6b973ac601d70bc0a3078dfd765f67c219c370c Mon Sep 17 00:00:00 2001 From: huangqizhen <15552608129@163.com> Date: Wed, 2 Jul 2025 16:42:10 +0800 Subject: [PATCH] =?UTF-8?q?7.2=20=E7=99=BB=E5=BD=95=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E4=B8=8E=E9=80=80=E5=87=BA=E7=99=BB=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/home.vue | 14 +++++++++++++- src/views/index.vue | 23 ++++++++++++----------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/views/home.vue b/src/views/home.vue index 75dac84..2eeed08 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -66,6 +66,18 @@ const message = function () { // // window.location.reload(); // ElMessage.success('退出成功') // } +function logout() { + console.log('111') + // const machineId = localStorage.getItem('machineId') + // console.log('machineId:', machineId) + // localStorage.removeItem('token') + // localStorage.clear(); + router.push('/login-hxl') + //添加刷新页面的代码 + // window.location.reload(); + ElMessage.success('退出成功') +} + // 挂载 onMounted(async function () { @@ -199,7 +211,7 @@ const handleClose = (key, keyPath) => { {{ adminData.name }} 查看个人信息 - 退出登录 + 退出登录 diff --git a/src/views/index.vue b/src/views/index.vue index 8c78daf..97c9e24 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -56,16 +56,17 @@ const message = function () { // 获取machineId -// function logout() { -// const machineId = localStorage.getItem('machineId') -// console.log('machineId:', machineId) -// localStorage.removeItem('token') -// // localStorage.clear(); -// router.push('/login?machineId=' + machineId) -// //添加刷新页面的代码 -// // window.location.reload(); -// ElMessage.success('退出成功') -// } +function logout() { + console.log('111') + // const machineId = localStorage.getItem('machineId') + // console.log('machineId:', machineId) + // localStorage.removeItem('token') + // localStorage.clear(); + router.push('/login-hxl') + //添加刷新页面的代码 + // window.location.reload(); + ElMessage.success('退出成功') +} // 挂载 onMounted(async function () { @@ -225,7 +226,7 @@ const handleClose = (key, keyPath) => { {{ adminData.name }} 查看个人信息 - 退出登录 + 退出登录