From d611facf08fc9f0a09732b0acf3e3d74e97a6276 Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Mon, 15 Dec 2025 12:09:31 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=BC=80=E5=8F=91?= =?UTF-8?q?=E7=8E=AF=E5=A2=83API=E5=9C=B0=E5=9D=80=E5=B9=B6=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=AF=86=E7=A0=81=E9=87=8D=E7=BD=AE=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将开发环境API地址切换为 http://123.60.153.169:8040/admin - 修正密码重置接口路径为 /admin/user/password/reset - 在密码重置时增加Base64加密处理 --- .env.development | 4 ++-- src/api/jnh/index.ts | 4 +--- src/layout/navBars/topBar/user.vue | 8 ++++++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.env.development b/.env.development index dc34e7e..9b3c2c7 100644 --- a/.env.development +++ b/.env.development @@ -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 diff --git a/src/api/jnh/index.ts b/src/api/jnh/index.ts index ffd3349..4b25cba 100644 --- a/src/api/jnh/index.ts +++ b/src/api/jnh/index.ts @@ -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, }); diff --git a/src/layout/navBars/topBar/user.vue b/src/layout/navBars/topBar/user.vue index 3e052db..0f4845f 100644 --- a/src/layout/navBars/topBar/user.vue +++ b/src/layout/navBars/topBar/user.vue @@ -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;