fix: 更新开发环境API地址并修复密码重置功能

- 将开发环境API地址切换为 http://123.60.153.169:8040/admin
- 修正密码重置接口路径为 /admin/user/password/reset
- 在密码重置时增加Base64加密处理
This commit is contained in:
34701892@qq.com 2025-12-15 12:09:31 +08:00
parent b86e4435a5
commit d611facf08
3 changed files with 9 additions and 7 deletions

View File

@ -2,10 +2,10 @@
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 = 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

View File

@ -1,7 +1,5 @@
import request from '/@/utils/request';
// 获取账号列表
export const getAccounts = (data: any) => {
return request({
@ -49,7 +47,7 @@ export const getUploadUrl = (data: any) => {
// 重置密码
export const resetPassword = (data: any) => {
return request({
url: '/user/password/reset',
url: '/admin/user/password/reset',
method: 'post',
data,
});

View File

@ -203,11 +203,15 @@ const rules = reactive({
},
],
});
import { encode, decode } from 'js-base64';
const formRef = ref(null);
async function handleRestPwd() {
await formRef.value.validate();
resetPassword(restForm.value).then((res) => {
// Base64
resetPassword({
password: encode(restForm.value.password),
}).then((res) => {
if (res.code == 200) {
ElMessage.success('重置密码成功');
restDialogVisible.value = false;