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;