fix: 更新开发环境API地址并修复密码重置功能
- 将开发环境API地址切换为 http://123.60.153.169:8040/admin - 修正密码重置接口路径为 /admin/user/password/reset - 在密码重置时增加Base64加密处理
This commit is contained in:
parent
b86e4435a5
commit
d611facf08
|
|
@ -2,10 +2,10 @@
|
||||||
ENV = development
|
ENV = development
|
||||||
|
|
||||||
# 本地环境接口地址
|
# 本地环境接口地址
|
||||||
VITE_API_URL = http://4155gf93ll13.vicp.fun/admin
|
# VITE_API_URL = http://4155gf93ll13.vicp.fun/admin
|
||||||
# VITE_API_URL = http://localhost:13579/admin
|
# VITE_API_URL = http://localhost:13579/admin
|
||||||
# VITE_API_URL = https://cankao.cs.com.cn/admin
|
# VITE_API_URL = https://cankao.cs.com.cn/admin
|
||||||
# VITE_API_URL = http://123.60.153.169:8040/admin
|
VITE_API_URL = http://123.60.153.169:8040/admin
|
||||||
|
|
||||||
# VITE_API_URL = /api
|
# VITE_API_URL = /api
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
import request from '/@/utils/request';
|
import request from '/@/utils/request';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 获取账号列表
|
// 获取账号列表
|
||||||
export const getAccounts = (data: any) => {
|
export const getAccounts = (data: any) => {
|
||||||
return request({
|
return request({
|
||||||
|
|
@ -49,7 +47,7 @@ export const getUploadUrl = (data: any) => {
|
||||||
// 重置密码
|
// 重置密码
|
||||||
export const resetPassword = (data: any) => {
|
export const resetPassword = (data: any) => {
|
||||||
return request({
|
return request({
|
||||||
url: '/user/password/reset',
|
url: '/admin/user/password/reset',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -203,11 +203,15 @@ const rules = reactive({
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
import { encode, decode } from 'js-base64';
|
||||||
const formRef = ref(null);
|
const formRef = ref(null);
|
||||||
async function handleRestPwd() {
|
async function handleRestPwd() {
|
||||||
await formRef.value.validate();
|
await formRef.value.validate();
|
||||||
|
// 密码Base64加密
|
||||||
resetPassword(restForm.value).then((res) => {
|
resetPassword({
|
||||||
|
password: encode(restForm.value.password),
|
||||||
|
}).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
ElMessage.success('重置密码成功');
|
ElMessage.success('重置密码成功');
|
||||||
restDialogVisible.value = false;
|
restDialogVisible.value = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue