diff --git a/src/api/base.ts b/src/api/base.ts index 36b15ce..780ec62 100644 --- a/src/api/base.ts +++ b/src/api/base.ts @@ -1,7 +1,7 @@ const base = { api_v1_url: 'https://api.locyanfrp.cn', - api_v2_url: 'https://api-v2.locyanfrp.cn/api/v2', - // api_v2_url: 'http://localhost:18080/api/v2', + // api_v2_url: 'https://api-v2.locyanfrp.cn/api/v2', + api_v2_url: 'http://localhost:18080/api/v2', buildResponse: (res: any, useDataPath: boolean = true) => { const message = res.data?.message ?? diff --git a/src/api/v2/auth/oauth/authorized/all.api.ts b/src/api/v2/auth/oauth/authorized/all.api.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/api/v2/auth/oauth/authorized/app.api.ts b/src/api/v2/auth/oauth/authorized/app.api.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/api/v2/auth/oauth/authorized/index.ts b/src/api/v2/auth/oauth/authorized/index.ts new file mode 100644 index 0000000..5c933b1 --- /dev/null +++ b/src/api/v2/auth/oauth/authorized/index.ts @@ -0,0 +1,3 @@ +export default { + +} \ No newline at end of file diff --git a/src/api/v2/auth/oauth/authorized/root.api.ts b/src/api/v2/auth/oauth/authorized/root.api.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/api/v2/auth/oauth/authorized/session.api.ts b/src/api/v2/auth/oauth/authorized/session.api.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/api/v2/email/password.api.ts b/src/api/v2/email/password.api.ts index eed5714..a8348af 100644 --- a/src/api/v2/email/password.api.ts +++ b/src/api/v2/email/password.api.ts @@ -2,9 +2,9 @@ import { get } from '@/utils/request' import base from '@/api/base' -const password = async (user_id: number) => { +const password = async (user: number) => { const rs = get(`${base.api_v2_url}/email/password`, { - user_id: user_id + user: user }) return base.buildResponse(await rs) } diff --git a/src/views/auth/ResetPasswordView.vue b/src/views/auth/ResetPasswordView.vue index 2435721..ec50bae 100644 --- a/src/views/auth/ResetPasswordView.vue +++ b/src/views/auth/ResetPasswordView.vue @@ -22,7 +22,7 @@ @@ -109,7 +109,7 @@ const sendResetEmail = ref(true) const model = ref([ { - username: '', + user: '', password: '', confirmPassword: '', verifyCode: '' @@ -150,7 +150,7 @@ async function doResetRequest() { let rs try { rs = await api.v2.user.password( - model.value.username, + model.value.user, undefined, model.value.password, model.value.verifyCode @@ -176,7 +176,7 @@ async function sendResetMail() { ldb.start() let rs try { - rs = await api.v2.email.password(model.value.username) + rs = await api.v2.email.password(model.value.user) } catch (e) { message.error('请求失败: ' + e) }