diff --git a/.env.development b/.env.development
index eed92e7d..c36d00d3 100644
--- a/.env.development
+++ b/.env.development
@@ -5,7 +5,7 @@ VUE_APP_TITLE = UDI管理系统
ENV = 'development'
# 开发环境
-VUE_APP_BASE_API = 'http://127.0.0.1:9991'
+VUE_APP_BASE_API = 'http://192.168.0.166:9991'
VUE_APP_SYNC_API ="http://127.0.0.1:10001"
diff --git a/.env.production b/.env.production
index 2285cb07..5213e492 100644
--- a/.env.production
+++ b/.env.production
@@ -8,7 +8,7 @@ ENV = 'production'
#林纪裕cd
-VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/'
+# VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://www.linjiyu.lol:83/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://127.0.0.1:9150/UDI_WMS_MC/'
@@ -37,7 +37,7 @@ VUE_APP_BASE_API = 'http://www.linjiyu.lol:81/UDI_WMS_MC/'
# VUE_APP_BASE_API = 'http://116.204.106.103:9150/UDI_WMS_MC/'
# 漳州中医院
-# VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/'
+VUE_APP_BASE_API = 'http://192.168.240.119:9150/UDI_WMS_MC/'
# 片仔癀诊断
# VUE_APP_BASE_API = 'http://192.168.0.100:9160/UDI_WMS_MC/'
diff --git a/package.json b/package.json
index b4851459..2638a060 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
"highlight.js": "9.18.5",
"js-beautify": "1.13.0",
"js-cookie": "3.0.1",
+ "js-sha256": "^0.10.1",
"jsencrypt": "3.0.0-rc.1",
"nprogress": "0.2.0",
"pinyin": "^2.10.2",
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 23332ce8..430f24e1 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -1,5 +1,6 @@
import {login, logout, getInfo} from '@/api/login'
import {getToken, setToken, removeToken, removeAdminId, setAdminId} from '@/utils/auth'
+import {sha256} from "js-sha256";
const user = {
state: {
@@ -66,18 +67,18 @@ const user = {
// 登录
Login({commit}, userInfo) {
const username = userInfo.username.trim()
- const password = userInfo.password
+ const password = sha256(userInfo.password)
const code = userInfo.code
const uuid = userInfo.uuid
return new Promise((resolve, reject) => {
login(username, password, code, uuid).then(res => {
- if(res.code == 20000){
+ if (res.code == 20000) {
setToken(res.data.token)
setAdminId(res.data.id)
commit('SET_TOKEN', res.data.token)
commit('SET_ADMINID', res.data.id)
- resolve()
- }else{
+ resolve(res)
+ } else {
reject(res.message);
}
}).catch(error => {
diff --git a/src/views/myLogin.vue b/src/views/myLogin.vue
index 64080d7a..3582cab8 100644
--- a/src/views/myLogin.vue
+++ b/src/views/myLogin.vue
@@ -79,6 +79,29 @@
+
+