feat(distribution): 独立分销前台商城多租户体系、货源与订单数据严格隔离

This commit is contained in:
yml2213
2026-09-07 17:18:14 +08:00
parent 550b42eb22
commit ecaf15417b
34 changed files with 2397 additions and 119 deletions
@@ -55,11 +55,13 @@ import {
hasGiftResources,
} from '@/shared/utils/listingDisplay'
import { buildMobileHomeListSignature, useMobileHomeCacheStore } from '@/stores/mobileHomeCache'
import { useDistributionSiteStore } from '@/stores/distributionSite'
import { useSessionStore } from '@/stores/session'
const router = useRouter()
const route = useRoute()
const session = useSessionStore()
const siteStore = useDistributionSiteStore()
const homeCache = useMobileHomeCacheStore()
const scrollEl = ref<HTMLElement | null>(null)
const loading = ref(false)
@@ -80,6 +82,15 @@ const rangeFilters = ref<Record<string, { min: string; max: string }>>({})
const refreshing = ref(false)
const searchValue = ref('')
const announcements = ref<string[]>(defaultHomeAnnouncements)
const displayAnnouncements = computed(() => {
if (siteStore.isDistribution) {
return [
`【${siteStore.siteName}】官方认证分销站,账号实时同步主站,售后有保障!`,
...announcements.value,
]
}
return announcements.value
})
const bannerSlides = ref<HomeBannerSlide[]>(defaultHomeBanners)
const awRecycle = ref<AWRecycleConfig>({ ...defaultAWRecycleConfig })
const awRecyclePreviewVisible = ref(false)
@@ -797,10 +808,15 @@ syncMobileHomeQuery()
<section class="mobile-hero">
<div class="mobile-topbar">
<div class="mobile-brand">
<span class="mobile-logo">锤</span>
<span class="mobile-logo">{{
siteStore.isDistribution ? siteStore.siteName.slice(0, 1) : '锤'
}}</span>
<div>
<strong>大锤商行</strong>
<small>哈夫币租号</small>
<div class="mobile-brand-title-row">
<strong>{{ siteStore.siteName }}</strong>
<span v-if="siteStore.isDistribution" class="mobile-brand-badge">官方分销</span>
</div>
<small>{{ siteStore.isDistribution ? '官方分销·平台保障' : '哈夫币租号' }}</small>
</div>
</div>
<button
@@ -844,7 +860,7 @@ syncMobileHomeQuery()
:show-indicators="false"
touchable
>
<van-swipe-item v-for="item in announcements" :key="item">
<van-swipe-item v-for="item in displayAnnouncements" :key="item">
<span>{{ item }}</span>
</van-swipe-item>
</van-swipe>
@@ -855,6 +871,15 @@ syncMobileHomeQuery()
<!-- ========== Content 区域 ========== -->
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<section class="mobile-content">
<!-- 分销站移动端专属认证卡片 -->
<div v-if="siteStore.isDistribution" class="mobile-dist-card">
<div class="dist-card-top">
<span class="dist-card-badge">官方分销站</span>
<strong class="dist-card-name">{{ siteStore.siteName }}</strong>
</div>
<p class="dist-card-sub">官方平台实时同步 · 统一质检交付 · 专属独立订单</p>
</div>
<!-- Banner 轮播 -->
<van-swipe class="banner-swipe" :autoplay="3600" lazy-render>
<van-swipe-item v-for="slide in bannerSlides" :key="slide.title || slide.image_url">
@@ -891,7 +916,7 @@ syncMobileHomeQuery()
<strong>租号大厅</strong>
<small>高哈夫币 · 随租随玩</small>
</RouterLink>
<RouterLink class="biz-entry" to="/crash">
<RouterLink v-if="!siteStore.isDistribution" class="biz-entry" to="/crash">
<strong>撞车</strong>
<small>选购商品 · 一键找客服</small>
<em class="biz-entry-badge">NEW</em>
@@ -1082,7 +1107,7 @@ syncMobileHomeQuery()
>湘ICP备2025146668号</a
>
<span class="home-footer-divider">|</span>
<span class="home-footer-copyright">版权所有 ©2026 大锤网络游戏有限公司</span>
<span class="home-footer-copyright">版权所有 ©2026 {{ siteStore.siteName }}</span>
</footer>
</div>