Skip to content

Commit

Permalink
[*] Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Dec 2, 2024
1 parent 08763f0 commit 2f3c6f1
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
5 changes: 1 addition & 4 deletions src/api/v2/user/email.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions src/components/UserInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions src/views/VerificationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
16 changes: 10 additions & 6 deletions src/views/auth/LoginView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@
<vue-turnstile
site-key="0x4AAAAAAAEXAhvwOKerpBsb"
v-model="token"
@error="(code) => {
showTurnstile = false
sendErrorMessage(`验证码加载失败,错误代码: ${code}`)
}"
@unsupported="sendErrorMessage('您的浏览器不支持加载验证码,请更换或升级浏览器后重试')"
@error="
(code) => {
showTurnstile = false
sendErrorMessage(`验证码加载失败,错误代码: ${code}`)
}
"
@unsupported="
sendErrorMessage('您的浏览器不支持加载验证码,请更换或升级浏览器后重试')
"
/>
</n-modal>
</n-space>
Expand All @@ -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()
Expand Down

0 comments on commit 2f3c6f1

Please sign in to comment.