Skip to content

Commit

Permalink
[*] 格式化代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Sep 27, 2024
1 parent 51dfbd4 commit ea2457b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 26 deletions.
5 changes: 1 addition & 4 deletions src/api/v2/donate/root.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,7 @@ import { post } from '@/utils/request'
/**
* 创建赞助订单
*/
const postDonate = async (
username: string,
money: string
) => {
const postDonate = async (username: string, money: string) => {
const rs = post(`${base.api_v2_url}/donate`, {
username: username,
money: money
Expand Down
12 changes: 6 additions & 6 deletions src/api/v2/verification/root.api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ import base from '@/api/base'
import { get } from '@/utils/request'

const getVerification = async (username: string) => {
const rs = get(`${base.api_v2_url}/verification`, {
username: username
})
return base.buildResponse(await rs)
const rs = get(`${base.api_v2_url}/verification`, {
username: username
})
return base.buildResponse(await rs)
}

const verification = {
get: getVerification,
get: getVerification
}

export default verification
export default verification
2 changes: 1 addition & 1 deletion src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const routes = [
}
},
component: () => import('@views/auth/ResetPasswordView.vue')
},
}
]
},
{
Expand Down
5 changes: 1 addition & 4 deletions src/views/DonateView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,7 @@ async function doDonate() {
}
let rs
try {
rs = await api.v2.donate.root.post(
userData.getters.get_username,
amount.value
)
rs = await api.v2.donate.root.post(userData.getters.get_username, amount.value)
} catch (e) {
sendErrorMessage('请求列表失败: ' + e)
}
Expand Down
20 changes: 14 additions & 6 deletions src/views/VerificationView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@
<div style="text-align: center">
<n-space justify="vertical">
<n-button type="primary" @click="realPersonPay()"> 点此付款 </n-button>
<n-button type="primary" @click="checkVerificationStatus()"> 刷新付款状态 </n-button>
<n-button type="primary" @click="checkVerificationStatus()">
刷新付款状态
</n-button>
</n-space>
</div>
</n-card>
Expand Down Expand Up @@ -200,7 +202,11 @@ async function submitRealName() {
}
let rs
try {
rs = await api.v2.verification.realname(submitForm.username, submitForm.name, submitForm.id_card)
rs = await api.v2.verification.realname(
submitForm.username,
submitForm.name,
submitForm.id_card
)
} catch (e) {
sendErrorMessage('请求失败: ' + e)
}
Expand All @@ -227,7 +233,11 @@ async function submitRealPerson() {
}
let rs
try {
rs = await api.v2.verification.realperson.root.post(submitForm.username, submitForm.name, submitForm.id_card)
rs = await api.v2.verification.realperson.root.post(
submitForm.username,
submitForm.name,
submitForm.id_card
)
} catch (e) {
sendErrorMessage('请求失败: ' + e)
}
Expand Down Expand Up @@ -323,9 +333,7 @@ async function checkVerificationStatus() {
async function realPersonPay() {
let rs
try {
rs = await api.v2.verification.realperson.pay(
userData.getters.get_username
)
rs = await api.v2.verification.realperson.pay(userData.getters.get_username)
} catch (e) {
sendErrorMessage('请求失败: ' + e)
}
Expand Down
6 changes: 1 addition & 5 deletions src/views/proxies/ConfigView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,7 @@ onMounted(async () => {
async function updateValue(value) {
let rs
try {
rs = await api.v2.proxy.config(
userData.getters.get_username,
null,
value
)
rs = await api.v2.proxy.config(userData.getters.get_username, null, value)
} catch (e) {
logger.error(e)
sendErrorMessage('请求获取隧道配置文件失败: ' + e)
Expand Down

0 comments on commit ea2457b

Please sign in to comment.