From 2f3c6f1bf84cec61c446c0f16f5484e1b03df5ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=8F=E6=B2=AB=E8=8A=B1=E7=81=ABzzz=F0=9F=8C=99?= Date: Mon, 2 Dec 2024 22:30:45 +0800 Subject: [PATCH] [*] Format code --- src/api/v2/user/email.api.ts | 5 +---- src/components/UserInfo.vue | 5 +---- src/views/VerificationView.vue | 6 +----- src/views/auth/LoginView.vue | 16 ++++++++++------ 4 files changed, 13 insertions(+), 19 deletions(-) diff --git a/src/api/v2/user/email.api.ts b/src/api/v2/user/email.api.ts index 80f3010..40c9077 100644 --- a/src/api/v2/user/email.api.ts +++ b/src/api/v2/user/email.api.ts @@ -2,10 +2,7 @@ import base from '@/api/base' //@ts-ignore import { post } from '@/utils/request' -const password = async ( - user_id: number, - verify_code: string -) => { +const password = async (user_id: number, verify_code: string) => { const rs = await post(`${base.api_v2_url}/user/email`, { user_id: user_id, verify_code: verify_code diff --git a/src/components/UserInfo.vue b/src/components/UserInfo.vue index 9d5f363..432e804 100644 --- a/src/components/UserInfo.vue +++ b/src/components/UserInfo.vue @@ -176,10 +176,7 @@ async function changeEmail() { let rs ldb.start() try { - rs = await api.v2.user.email( - userData.getters.get_user_id, - tEmail.value.verify.code - ) + rs = await api.v2.user.email(userData.getters.get_user_id, tEmail.value.verify.code) } catch (e) { logger.error(e) message.error('请求换绑失败: ' + e) diff --git a/src/views/VerificationView.vue b/src/views/VerificationView.vue index c0813fd..93c6dfd 100644 --- a/src/views/VerificationView.vue +++ b/src/views/VerificationView.vue @@ -202,11 +202,7 @@ async function submitRealName() { } let rs try { - rs = await api.v2.verification.realname( - submitForm.user_id, - submitForm.name, - submitForm.id_card - ) + rs = await api.v2.verification.realname(submitForm.user_id, submitForm.name, submitForm.id_card) } catch (e) { sendErrorMessage('请求失败: ' + e) } diff --git a/src/views/auth/LoginView.vue b/src/views/auth/LoginView.vue index e9dd4d6..45bb965 100644 --- a/src/views/auth/LoginView.vue +++ b/src/views/auth/LoginView.vue @@ -55,11 +55,15 @@ @@ -79,7 +83,7 @@ import { sendErrorMessage } from '@/utils/message' import logger from '@/utils/logger' import api from '@/api' import { getUrlKey } from '@/utils/request' -import VueTurnstile from 'vue-turnstile'; +import VueTurnstile from 'vue-turnstile' const formRef = ref(null) const message = useMessage()