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