重置密码接口优化
This commit is contained in:
parent
6e7dd79610
commit
5bd7eca8e8
|
|
@ -44,7 +44,7 @@ export function delUser(userId) {
|
|||
})
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
// 用户密码重置
|
||||
export function resetUserPwd(userId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
|
|
@ -56,6 +56,30 @@ export function resetUserPwd(userId, password) {
|
|||
data: data
|
||||
})
|
||||
}
|
||||
// 用户密码重置 ---- 南网
|
||||
export function resetUserPwdNwApi(userId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
password
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/resetPwdByCode',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 用户密码重置 ---- 重庆
|
||||
export function resetUserPwdCqApi(userId, password) {
|
||||
const data = {
|
||||
userId,
|
||||
password
|
||||
}
|
||||
return request({
|
||||
url: '/system/user/resetPwd',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 用户状态修改
|
||||
export function changeUserStatus(userId, status) {
|
||||
|
|
|
|||
|
|
@ -547,6 +547,8 @@ import {
|
|||
resetUserPwd,
|
||||
changeUserStatus,
|
||||
deptTreeSelect,
|
||||
resetUserPwdNwApi,
|
||||
resetUserPwdCqApi
|
||||
} from '@/api/system/user'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import Treeselect from '@riophae/vue-treeselect'
|
||||
|
|
@ -839,7 +841,11 @@ export default {
|
|||
})
|
||||
.then(({ value }) => {
|
||||
const password = encrypt(value)
|
||||
resetUserPwd(row.userId, password).then((response) => {
|
||||
|
||||
|
||||
/* 判断当前环境是否为南网环境,如是则走南网接口 不是则走重庆接口 */
|
||||
const API_FUN = (process.env.VUE_APP_ENV === 'development-nw' || process.env.VUE_APP_ENV === 'production-nw')? resetUserPwdNwApi : resetUserPwdCqApi
|
||||
API_FUN(row.userId, password).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功')
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ module.exports = {
|
|||
|
||||
// target: `http://192.168.2.152:39080`, //超
|
||||
// target: `http://10.40.92.81:8080`, //韩/
|
||||
// target: `http://192.168.10.105:49080`, //旭/
|
||||
target: `http://192.168.10.105:49080`, //旭/
|
||||
// target: `http://192.168.10.236:49080`, //旭/
|
||||
target: `http://192.168.43.200:49080`, //旭/
|
||||
// target: `http://192.168.43.200:49080`, //旭/
|
||||
// target: `http://10.40.92.138:28080`, //帅
|
||||
// target: `http://192.168.2.218:39080`, //福
|
||||
// target: `http://192.168.2.120:39080`, //跃
|
||||
|
|
|
|||
Loading…
Reference in New Issue