style(frontend): 自动格式化代码符合Prettier门禁规范

This commit is contained in:
yml2213
2026-09-09 20:01:23 +08:00
parent 423672e47b
commit 556e76942e
7 changed files with 33 additions and 45 deletions
@@ -1125,7 +1125,8 @@ async function handleScreenshotSaved(payload: { oldUrl: string; newUrl: string }
size="small"
:type="isDistributionListing(item) ? 'success' : 'primary'"
effect="plain"
>{{ sourceChannel(item) }}</el-tag>
>{{ sourceChannel(item) }}</el-tag
>
<el-tag v-if="isExternalUpload(item)" size="small" type="info">{{
uploaderName(item)
}}</el-tag>
@@ -60,7 +60,7 @@ const displayAnnouncements = computed(() => {
const banners = ref<HomeBannerSlide[]>(defaultHomeBanners)
const displayBanners = computed<HomeBannerSlide[]>(() => {
if (siteStore.isDistribution && siteStore.banners && siteStore.banners.length > 0) {
return siteStore.banners.map((b) => ({
return siteStore.banners.map(b => ({
eyebrow: siteStore.siteName,
title: b.title || '精选游戏账号 · 随租随玩',
badge: '分销精选',
@@ -190,13 +190,9 @@ export function useOrderActions(options: UseOrderActionsOptions) {
const canOpenDispute = computed(() => {
if (!order.value || (!isOwner.value && !isRenter.value)) return false
if (order.value.active_dispute) return false
return ![
'completed',
'cancelled',
'closed',
'disputing',
'checkout_disputing',
].includes(order.value.status)
return !['completed', 'cancelled', 'closed', 'disputing', 'checkout_disputing'].includes(
order.value.status
)
})
const canCounterCheckout = computed(() => {
if (!order.value?.checkout) return false
@@ -215,10 +211,7 @@ export function useOrderActions(options: UseOrderActionsOptions) {
(order.value.handoff_status === 'owner_checkout_confirm_timeout' ||
order.value.handoff_status === 'owner_return_confirm_timeout' ||
order.value.handoff_status === 'pending_owner_checkout')))
return (
isOwnerPending ||
(isRenter.value && order.value.status === 'pending_checkout_accept')
)
return isOwnerPending || (isRenter.value && order.value.status === 'pending_checkout_accept')
})
const checkoutShortfallCent = computed(() => Number(order.value?.checkout?.shortfall_cent || 0))
const checkoutOvershootCent = computed(() =>
@@ -373,14 +373,13 @@ async function copyListingCode() {
<OrderCheckoutSummary
v-if="
order.checkout &&
(
[
'pending_checkout_confirm',
'pending_checkout_accept',
'checkout_disputing',
'completed',
].includes(order.status) || order.status === 'abnormal'
)
([
'pending_checkout_confirm',
'pending_checkout_accept',
'checkout_disputing',
'completed',
].includes(order.status) ||
order.status === 'abnormal')
"
variant="mobile"
:order="order"
@@ -389,10 +388,7 @@ async function copyListingCode() {
/>
<!-- Owner Action: Confirm Checkout / Make Counter Adjustment Proposal -->
<section
v-if="isOwnerCheckoutPending"
class="card-section action-card"
>
<section v-if="isOwnerCheckoutPending" class="card-section action-card">
<h3 class="section-title">结账处理</h3>
<p
v-if="order.handoff_status === 'owner_checkout_confirm_timeout'"
@@ -518,14 +518,13 @@ watch([() => route.query.focus, order, loading], () => {
v-if="
order &&
order.checkout &&
(
[
'pending_checkout_confirm',
'pending_checkout_accept',
'checkout_disputing',
'completed',
].includes(order.status) || order.status === 'abnormal'
)
([
'pending_checkout_confirm',
'pending_checkout_accept',
'checkout_disputing',
'completed',
].includes(order.status) ||
order.status === 'abnormal')
"
:order="order"
:is-owner="isOwner"
@@ -116,7 +116,8 @@ export async function createWithdrawal(
req: CreateWithdrawalRequest,
distributionSiteCode?: string
) {
const siteCode = distributionSiteCode || req.distribution_site_code || getEffectiveSiteCode() || undefined
const siteCode =
distributionSiteCode || req.distribution_site_code || getEffectiveSiteCode() || undefined
const payload: CreateWithdrawalRequest = { ...req }
if (siteCode) {
payload.distribution_site_code = siteCode
+9 -11
View File
@@ -231,17 +231,10 @@ async function handleSupportClick() {
<span v-else class="pc-avatar-text">{{ session.avatarText }}</span>
</span>
<span class="pc-user-name">{{ session.displayName }}</span>
<span
v-if="siteStore.isDistribution"
class="pc-growth-badge is-distribution"
>
<span v-if="siteStore.isDistribution" class="pc-growth-badge is-distribution">
分销专享
</span>
<span
v-else
class="pc-growth-badge"
:class="`is-${growthBadgeTone}`"
>
<span v-else class="pc-growth-badge" :class="`is-${growthBadgeTone}`">
{{ session.renterGrowthLevelName }}
</span>
<span class="pc-realname-badge" :class="`is-${realnameBadge.tone}`">
@@ -255,7 +248,10 @@ async function handleSupportClick() {
<Transition name="dropdown">
<div v-if="showUserDropdown" class="pc-user-dropdown-container">
<div class="pc-user-dropdown">
<div v-if="siteStore.isDistribution" class="dropdown-growth-panel is-distribution">
<div
v-if="siteStore.isDistribution"
class="dropdown-growth-panel is-distribution"
>
<div>
<span>所属商城</span>
<strong>{{ siteStore.siteName || '专属分销站' }}</strong>
@@ -396,7 +392,9 @@ async function handleSupportClick() {
{{ siteStore.footerInfo.icp }}
</a>
<span v-if="siteStore.footerInfo.icp" class="pc-footer-divider">|</span>
<span class="pc-footer-copyright">{{ siteStore.footerInfo.copyright || `版权所有 ©2026 ${siteStore.siteName}` }}</span>
<span class="pc-footer-copyright">{{
siteStore.footerInfo.copyright || `版权所有 ©2026 ${siteStore.siteName}`
}}</span>
<template v-if="siteStore.footerInfo.contact">
<span class="pc-footer-divider">|</span>
<span class="pc-footer-contact">{{ siteStore.footerInfo.contact }}</span>