diff --git a/.env.production b/.env.production index 6df4002..fd3ee18 100644 --- a/.env.production +++ b/.env.production @@ -33,7 +33,7 @@ ENV = 'production' # VUE_APP_BASE_API = 'http://139.9.174.242:9150/UDI_SPMS_SERVER/' # VUE_APP_BASE_API = 'http://192.168.0.17:9150/UDI_SPMS_SERVER/' # 大田 -VUE_APP_BASE_API = 'http://110.83.220.178:9150/UDI_SPMS_SERVER/' +# VUE_APP_BASE_API = 'http://110.83.220.178:9150/UDI_SPMS_SERVER/' # 云霄妇幼 # VUE_APP_BASE_API = 'http://192.168.0.72:9150/UDI_SPMS_SERVER/' @@ -43,17 +43,17 @@ VUE_APP_BASE_API = 'http://110.83.220.178:9150/UDI_SPMS_SERVER/' # VUE_APP_BASE_API = 'http://192.168.20.128:9150/UDI_SPMS_SERVER/' # 东山 -# VUE_APP_BASE_API = 'http://116.204.108.228:9150/UDI_SPMS_SERVER/' +VUE_APP_BASE_API = 'http://116.204.108.228:9150/UDI_SPMS_SERVER/' # VUE_APP_BASE_API = 'http://192.168.0.117:9150/UDI_SPMS_SERVER/' # 应用访问路径 例如使用前缀 /admin/ # 域名 -# VUE_APP_CONTEXT_PATH = '/' +VUE_APP_CONTEXT_PATH = '/' # 其他 -VUE_APP_CONTEXT_PATH = '/UDI_SPMS_CLIENT/' +# VUE_APP_CONTEXT_PATH = '/UDI_SPMS_CLIENT/' # 监控地址 VUE_APP_MONITRO_ADMIN = '/admin/login' diff --git a/src/store/modules/user.js b/src/store/modules/user.js index c433c49..c76511b 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -1,15 +1,16 @@ -import { login, logout, getInfo } from "@/api/login"; +import {login, logout, getInfo} from "@/api/login"; import { getToken, setToken, removeToken, removeAdminId, - setAdminId, + setAdminId, getAdminId, } from "@/utils/auth"; import {sha256} from "js-sha256"; + const user = { state: { - adminId: "", + adminId: getAdminId(), token: getToken(), name: "", avatar: "", @@ -69,7 +70,7 @@ const user = { actions: { // 登录 - Login({ commit }, userInfo) { + Login({commit}, userInfo) { const username = userInfo.username.trim(); // const password = userInfo.password; const password = sha256(userInfo.password) @@ -95,7 +96,7 @@ const user = { }, // 获取用户信息 - GetInfo({ commit, state }) { + GetInfo({commit, state}) { return new Promise((resolve, reject) => { getInfo() .then((res) => { @@ -130,7 +131,7 @@ const user = { }, // 退出系统 - LogOut({ commit, state }) { + LogOut({commit, state}) { return new Promise((resolve, reject) => { logout(state.token) .then(() => { diff --git a/src/utils/auth.js b/src/utils/auth.js index eead845..db44d85 100644 --- a/src/utils/auth.js +++ b/src/utils/auth.js @@ -1,7 +1,7 @@ import Cookies from 'js-cookie' -const TokenKey = 'Admin-Token' -const ADMINKey = 'Admin-ID' +const TokenKey = 'Admin_Token' +const ADMINKey = 'Admin_ID' export function getToken() { return Cookies.get(TokenKey) diff --git a/src/views/inout/PanelCreateOrderBizDetail.vue b/src/views/inout/PanelCreateOrderBizDetail.vue index 7de4133..41aa21a 100644 --- a/src/views/inout/PanelCreateOrderBizDetail.vue +++ b/src/views/inout/PanelCreateOrderBizDetail.vue @@ -563,7 +563,7 @@ export default { if (year < 0 || year > 99 || month < 1 || month > 12 || day < 1 || day > 31) { - errorMessage = '时间格式有效,但日期不存在'; + errorMessage = '时间格式不正确!'; } else { // 修正年份的两位数到四位数 const fullYear = year < 50 ? 2000 + year : 1900 + year; @@ -571,7 +571,7 @@ export default { // 检查是否为有效日期 if (dateObj.getFullYear() !== fullYear || dateObj.getMonth() + 1 !== month || dateObj.getDate() !== day) { - errorMessage = '时间格式有效,但日期不存在'; + errorMessage = '时间格式不正确!'; } } } diff --git a/src/views/myLogin.vue b/src/views/myLogin.vue index 3514274..d2c1647 100644 --- a/src/views/myLogin.vue +++ b/src/views/myLogin.vue @@ -273,7 +273,6 @@ export default { Cookies.remove("username"); Cookies.remove("password"); } - debugger this.$store .dispatch("Login", this.loginForm) .then((res) => { diff --git a/src/views/supplier/company/udiInfoselectErpUdi.vue b/src/views/supplier/company/udiInfoselectErpUdi.vue index 01650c0..9e823e6 100644 --- a/src/views/supplier/company/udiInfoselectErpUdi.vue +++ b/src/views/supplier/company/udiInfoselectErpUdi.vue @@ -1,7 +1,7 @@