diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts
index ba8802e36..bbf043064 100644
--- a/src/api/system/user/index.ts
+++ b/src/api/system/user/index.ts
@@ -100,6 +100,10 @@ export const forgetPassword = (data : UserVO) => {
export const updatePassword = (data : UserVO) => {
return request.put({ url: '/system/user/updatePassword', data })
}
+// 重置密码
+export const updateUserPassword = (data : UserVO) => {
+ return request.put({ url: '/system/user/update-password', data })
+}
export const getPassWordConfig = () => {
return request.get({ url: '/system/password/getConfig' })
diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts
index 9f38c95eb..958d2a79b 100644
--- a/src/config/axios/service.ts
+++ b/src/config/axios/service.ts
@@ -182,7 +182,7 @@ service.interceptors.response.use(
'
5 分钟搭建本地环境
'
})
return Promise.reject(new Error(msg))
- } else if (code === 1002000010) {
+ } else if (code === 1002000008) {
if (msg === '无效的刷新令牌') {
// hard coding:忽略这个提示,直接登出
console.log(msg)
diff --git a/src/views/login/components/LoginForm.vue b/src/views/login/components/LoginForm.vue
index ed783f5c6..17461d467 100644
--- a/src/views/login/components/LoginForm.vue
+++ b/src/views/login/components/LoginForm.vue
@@ -262,7 +262,7 @@
switch (differenceDays){
case null:
break
- case 0:
+ case 0 || 1:
await ElMessageBox.alert(
'密码到期,请立即修改',
'重要提示',
@@ -272,15 +272,15 @@
)
router.push({path:"/updatePasswordNewTips",query:{username:loginData.loginForm.username}})
return
- case 1:
- await ElMessageBox.alert(
- '密码过期,请联系管理员修改',
- '重要提示',
- {
- dangerouslyUseHTMLString: true,
- }
- )
- return
+ // case 1:
+ // await ElMessageBox.alert(
+ // '密码过期,请联系管理员修改',
+ // '重要提示',
+ // {
+ // dangerouslyUseHTMLString: true,
+ // }
+ // )
+ // return
default:
await ElMessageBox.alert(
'密码'+differenceDays+'到期,请尽快修改。',
@@ -330,6 +330,12 @@
// 存储 部门信息
const { wsCache } = useCache()
wsCache.set(CACHE_KEY.DEPT, await DeptApi.getSimpleDeptList())
+ }catch (e){
+ if(e.code === 1002000008){
+ setTimeout(function (){
+ router.push({path:"/updatePasswordNewTips",query:{username:loginData.loginForm.username}})
+ },1500)
+ }
}finally {
console.log('登录-224')
loginLoading.value = false
diff --git a/src/views/login/updatePassword.vue b/src/views/login/updatePassword.vue
index cbebe4dff..29150d64b 100644
--- a/src/views/login/updatePassword.vue
+++ b/src/views/login/updatePassword.vue
@@ -36,6 +36,7 @@
import { getTenantIdByName, sendSmsCode, smsLogin } from '@/api/login'
import * as UserApi from '@/api/system/user'
import { View,Hide } from '@element-plus/icons-vue'
+ import {updateUserPassword} from "@/api/system/user";
const { t } = useI18n()
const message = useMessage()
const permissionStore = usePermissionStore()
@@ -65,7 +66,7 @@
message.error('两次输入的密码不一致,请重新输入!')
} else {
const data = loginData as unknown as UserApi.UserVO
- await UserApi.updatePassword(data)
+ await UserApi.updateUserPassword(data)
// 发送操作成功的事件
message.success(t('common.updateSuccess'))
router.go(-1)
diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue
index d2d28220c..ba402fc09 100644
--- a/src/views/system/user/index.vue
+++ b/src/views/system/user/index.vue
@@ -59,6 +59,8 @@
+
+
{
/** 解冻按钮操作 */
const handleFree = async (row: any) => {
try {
- debugger
// 发起删除
if(row.frozenStatus=="是"){
await UserApi.unLockUser(row.id)