From 3aec63eef93078dc887061a3b2ea65207d93f1a1 Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Wed, 29 May 2024 17:10:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=96=B0=E5=A2=9E=E7=94=A8?=
=?UTF-8?q?=E6=88=B7=E6=97=B6=E9=BB=98=E8=AE=A4=E5=AF=86=E7=A0=81=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
sgzb-ui/src/store/modules/user.js | 26 +-
sgzb-ui/src/views/newLogin.vue | 33 +
sgzb-ui/src/views/system/user/index.vue | 1537 ++++++++++++-----------
sgzb-ui/vue.config.js | 2 +-
4 files changed, 886 insertions(+), 712 deletions(-)
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 @@
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 搜索
- 重置
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
-
-
- 新增
-
-
- 修改
-
-
- 删除
-
-
- 导入
-
-
- 导出
-
-
-
-
-
-
-
-
-
- {{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ parseTime(scope.row.createTime) }}
-
-
-
-
- 修改
- 删除
-
- handleCommand(command, scope.row)
- " v-hasPermi="[
- 'system:user:resetPwd',
- 'system:user:edit',
- ]">
- 更多
-
- 重置密码
- 分配角色
-
-
-
-
-
-
-
-
+
+
+
+ 新增
+
+
+
+
+ 修改
+
+
+
+
+ 删除
+
+
+
+
+ 导入
+
+
+
+
+ 导出
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{
- dict.label }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ (queryParams.pageNum - 1) * 10 + scope.$index + 1 }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+
+ 修改
+
+
+ 删除
+
+ handleCommand(command, scope.row)"
+ v-hasPermi="['system:user:resetPwd', 'system:user:edit']"
+ >
+ 更多
+
+
+ 重置密码
+
+
+ 分配角色
+
+
+
+
+
+
-
-
-
-
- 将文件拖到此处,或点击上传
-
-
-
- 是否更新已经存在的用户数据
-
-
仅允许导入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`, //福
//******** 注意事项 ********* */