增加前端格式检查配置

This commit is contained in:
yml2213
2026-06-08 06:40:33 +08:00
parent 79ea3a476c
commit 500f511185
150 changed files with 7254 additions and 4013 deletions
@@ -2,7 +2,16 @@
import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { ElMessage } from 'element-plus'
import { CircleCheck, Coin, Loading, Lock, Money, Refresh, Tickets, Wallet as WalletIcon } from '@element-plus/icons-vue'
import {
CircleCheck,
Coin,
Loading,
Lock,
Money,
Refresh,
Tickets,
Wallet as WalletIcon,
} from '@element-plus/icons-vue'
import QRCode from 'qrcode'
import {
@@ -67,7 +76,7 @@ const walletMetrics = computed(() => {
onMounted(loadWallet)
onBeforeUnmount(stopRechargePolling)
watch(rechargeDialogVisible, (visible) => {
watch(rechargeDialogVisible, visible => {
if (!visible) {
stopRechargePolling()
}
@@ -76,7 +85,10 @@ watch(rechargeDialogVisible, (visible) => {
async function loadWallet() {
loading.value = true
try {
const [balance, result] = await Promise.all([fetchWalletBalance(), fetchWalletLedger(currentPage.value, currentPageSize.value)])
const [balance, result] = await Promise.all([
fetchWalletBalance(),
fetchWalletLedger(currentPage.value, currentPageSize.value),
])
account.value = balance
ledger.value = result.items
total.value = result.total
@@ -275,7 +287,12 @@ function amountPrefix(direction: string) {
</div>
<div v-if="account" class="wallet-metric-grid">
<div v-for="item in walletMetrics" :key="item.label" class="wallet-metric-card" :class="`is-${item.tone}`">
<div
v-for="item in walletMetrics"
:key="item.label"
class="wallet-metric-card"
:class="`is-${item.tone}`"
>
<div class="metric-icon">
<el-icon><component :is="item.icon" /></el-icon>
</div>
@@ -311,7 +328,12 @@ function amountPrefix(direction: string) {
</div>
<div class="recharge-action-row">
<el-input-number v-model="devRechargeAmount" :min="0.01" :precision="2" :step="1" />
<el-button type="primary" :icon="Coin" :loading="devRecharging" @click="handleDevRecharge">
<el-button
type="primary"
:icon="Coin"
:loading="devRecharging"
@click="handleDevRecharge"
>
创建测试支付
</el-button>
</div>
@@ -381,7 +403,11 @@ function amountPrefix(direction: string) {
<div class="recharge-cashier">
<div class="cashier-amount">
<span>支付金额</span>
<strong>{{ activeRechargePayment ? formatMoney(activeRechargePayment.amount_cent / 100) : formatMoney(devRechargeAmount) }}</strong>
<strong>{{
activeRechargePayment
? formatMoney(activeRechargePayment.amount_cent / 100)
: formatMoney(devRechargeAmount)
}}</strong>
</div>
<div v-if="rechargePayURL()" class="cashier-qr">
<div class="qr-box">
@@ -406,7 +432,9 @@ function amountPrefix(direction: string) {
</div>
<template #footer>
<el-button @click="rechargeDialogVisible = false">关闭</el-button>
<el-button type="primary" :loading="checkingRecharge" @click="checkDevRechargeStatus">查询支付状态</el-button>
<el-button type="primary" :loading="checkingRecharge" @click="checkDevRechargeStatus"
>查询支付状态</el-button
>
</template>
</el-dialog>
</section>
@@ -426,9 +454,7 @@ function amountPrefix(direction: string) {
padding: 28px;
border: 1px solid #e6eaf2;
border-radius: 8px;
background:
linear-gradient(135deg, rgba(255, 122, 0, 0.08), rgba(15, 118, 110, 0.06)),
#ffffff;
background: linear-gradient(135deg, rgba(255, 122, 0, 0.08), rgba(15, 118, 110, 0.06)), #ffffff;
box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}