diff --git a/src/api/system/user.js b/src/api/system/user.js index 759d621..6b2f169 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -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) { diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 0d9376f..977d576 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -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('修改成功') }) }) diff --git a/vue.config.js b/vue.config.js index ac98d29..c183240 100644 --- a/vue.config.js +++ b/vue.config.js @@ -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`, //跃