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 }}
查看个人信息
- 退出登录
+ 退出登录