diff --git a/.env.development b/.env.development index 4938f73..07bd401 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,5 @@ -VITE_API_BASE='https://hwjb.homilychart.com/admin' +# VITE_API_BASE='https://hwjb.homilychart.com/admin' # VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_dev' -# VITE_API_BASE='http://192.168.8.242:8081/' -# VITE_API_BASE='http://18.143.76.3:10704/' -# VITE_API_BASE='http://192.168.9.28:8081/' -# VITE_API_BASE='http://192.168.8.94:8081/' +VITE_API_BASE='http://192.168.8.242:8081/' VITE_UPLOAD_URL=http://39.101.133.168:8828/hljw/api/aws/upload diff --git a/.env.production b/.env.production index a66fadb..013adca 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # VITE_API_BASE='http://54.251.137.151:10702/' -VITE_API_BASE='https://hwjb.homilychart.com/admin' +VITE_API_BASE='https://hwjb.homilychart.com/prod' # VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_dev' # VITE_API_BASE='http://192.168.8.232:8080/' VITE_UPLOAD_URL=https://api.homilychart.com/hljw/api/aws/upload diff --git a/src/router/index.js b/src/router/index.js index 8bb566e..8f1d852 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -76,43 +76,11 @@ const router = createRouter({ }); router.beforeEach((to, from, next) => { - // const token = localStorage.getItem("token"); - // const permission = localStorage.getItem("permission"); - // if (to.name != "login" && !token) { - // next({ name: "login" }); - // } else { - // if (permission == "4" && to.name != "noPermission") { - // next({ name: "noPermission" }); - // } else if (permission == "3") { - // if (to.name == "addConsume" || to.name == "allConsume" - // || to.name == "addRecharge" || to.name == "adminRecharge" || to.name == "allRecharge" - // || to.name == "addRefund" || to.name == "allRefund" - // || to.name == "permissions") { - // next({ name: "workspace" }); - // } else { - // next(); - // } - // } else if (permission == '2') { - // if (to.name == "rechargeAudit" || to.name == "refundAudit" - // || to.name == "activity" || to.name == "rate" - // || to.name == "permissions") { - // next({ name: "workspace" }) - // } else { - // next(); - // } - // } else if (permission == '5') { - // if (to.name == "permissions") { - // next({ name: "workspace" }) - // } else { - // next(); - // } - // } - // else { - // next(); - // } - - // } + const token = localStorage.getItem("token"); + const machineId = localStorage.getItem("machineId"); + if (to.name != "login" && !token) { + next('/login?machineId=' + machineId); + } next(); }) - export default router; diff --git a/src/views/home.vue b/src/views/home.vue index 056b884..a450408 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -93,7 +93,6 @@ const downloadExportFile = (item) => { function logout() { const machineId = localStorage.getItem('machineId') localStorage.removeItem('token') - // localStorage.clear(); router.push('/login?machineId=' + machineId) ElMessage.success('退出成功') } @@ -225,8 +224,7 @@ const openExportList = () => { {{ adminData.name }} 查看个人信息 - 退出登录 - 查看下载列表 + 退出登录 @@ -266,7 +264,7 @@ const openExportList = () => { diff --git a/stats.html b/stats.html index 60f5fc0..ec76960 100644 --- a/stats.html +++ b/stats.html @@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {