diff --git a/sgzb-ui/src/store/modules/user.js b/sgzb-ui/src/store/modules/user.js index b95b8d04..c94ac9ed 100644 --- a/sgzb-ui/src/store/modules/user.js +++ b/sgzb-ui/src/store/modules/user.js @@ -1,7 +1,7 @@ -import { login, logout, getInfo, refreshToken,checkCode,loginByMall } from '@/api/login' +import { login, logout, getInfo, refreshToken, checkCode, loginByMall } from '@/api/login' import { getToken, setToken, setExpiresIn, removeToken } from '@/utils/auth' import { Notification, MessageBox, Message, Loading } from 'element-ui' -import { encrypt} from '@/utils/jsencrypt' +import { encrypt } from '@/utils/jsencrypt' const user = { state: { @@ -44,8 +44,12 @@ const user = { const password = encrypt(userInfo.password) const code = userInfo.code const uuid = userInfo.uuid + const textCode = undefined + if (userInfo.textCode) { + textCode = userInfo.textCode + } return new Promise((resolve, reject) => { - login(username, password, code, uuid).then(res => { + login(username, password, code, uuid, textCode).then(res => { let data = res.data localStorage.setItem('isCode', res.data.code) setToken(data.access_token) @@ -63,13 +67,13 @@ const user = { textLogin({ commit }, userInfo) { console.log(userInfo) let params = { - phone:userInfo.phone, - code:userInfo.textCode + phone: userInfo.phone, + code: userInfo.textCode } return new Promise((resolve, reject) => { checkCode(params).then(res => { console.log(res) - if(res.code==200){ + if (res.code == 200) { let data = res.data setToken(data.access_token) commit('SET_TOKEN', data.access_token) @@ -84,19 +88,19 @@ const user = { }) }, //机具租赁平台跳转登录---南网 - ssoLogin({ commit }, param) { + ssoLogin({ commit }, param) { return new Promise((resolve, reject) => { loginByMall(param).then(res => { console.log(res) let data = res.data - if(res.code==200){ + if (res.code == 200) { // console.log('登录成功1111111') setToken(data.access_token) commit('SET_TOKEN', data.access_token) localStorage.setItem('token', data.access_token) setExpiresIn(data.expires_in) commit('SET_EXPIRES_IN', data.expires_in) - }else{ + } else { // console.log('登录失败22222222') this.$modal.msgError('登录失败'); } @@ -131,7 +135,7 @@ const user = { }, // 刷新token - RefreshToken({commit, state}) { + RefreshToken({ commit, state }) { return new Promise((resolve, reject) => { refreshToken(state.token).then(res => { setExpiresIn(res.data) @@ -142,7 +146,7 @@ const user = { }) }) }, - + // 退出系统 LogOut({ commit, state }) { return new Promise((resolve, reject) => { diff --git a/sgzb-ui/src/views/newLogin.vue b/sgzb-ui/src/views/newLogin.vue index d3e5cd1d..1aa0e8cd 100644 --- a/sgzb-ui/src/views/newLogin.vue +++ b/sgzb-ui/src/views/newLogin.vue @@ -24,6 +24,39 @@ + + + -
- - - -
- -
-
- -
-
- - - - - - - - - - - - - - - - - - - 搜索 - 重置 - - +
+ + + +
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + - - - 新增 - - - 修改 - - - 删除 - - - 导入 - - - 导出 - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + 新增 + + + + + 修改 + + + + + 删除 + + + + + 导入 + + + + + 导出 + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ - dict.label }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - - - -
将文件拖到此处,或点击上传
-
-
- - 是否更新已经存在的用户数据 -
- 仅允许导入xls、xlsx格式文件。 - 下载模板 -
-
- -
-
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ dict.label }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 将文件拖到此处,或 + 点击上传 +
+
+
+ + 是否更新已经存在的用户数据 +
+ 仅允许导入xls、xlsx格式文件。 + + 下载模板 + +
+
+ +
+
diff --git a/sgzb-ui/vue.config.js b/sgzb-ui/vue.config.js index 741a308d..5af439d4 100644 --- a/sgzb-ui/vue.config.js +++ b/sgzb-ui/vue.config.js @@ -46,7 +46,7 @@ module.exports = { // target: `http://10.40.92.8:8080`, //超 // target: `http://10.40.92.81:8080`, //韩/ // target: `http://10.40.92.74:8080`,//旭/ - target: `http://10.40.92.136:8080`, //帅 + target: `http://10.40.92.136:28080`, //帅 // target: `http://10.40.92.5:28080`, //福 //******** 注意事项 ********* */