This commit is contained in:
lcj
2026-07-07 09:00:53 +08:00
parent 203d129ffb
commit 6d89d1049f
19 changed files with 476 additions and 255 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ const loading = ref(true)
onMounted(async () => {
try {
const data = await post<BannerItem[]>('/mp-api/mpContent/queryList', { channel: 'aspx', type: 'FAQ' })
const data = await post<BannerItem[]>('/mp-api/mpContent/queryList', { channel: 'pingxiang', type: 'FAQ' })
faqList.value = (data || []).map(n => ({
id: n.id,
title: n.title,
+1 -1
View File
@@ -49,7 +49,7 @@ const notices = ref<NoticeItem[]>([])
onMounted(async () => {
try {
const data = await post<BannerItem[]>('/mp-api/mpContent/queryList', { channel: 'aspx', type: 'NOTICE' })
const data = await post<BannerItem[]>('/mp-api/mpContent/queryList', { channel: 'pingxiang', type: 'NOTICE' })
notices.value = (data || []).map(n => ({
id: n.id,
title: n.title,
+11 -8
View File
@@ -129,11 +129,7 @@
<!-- 模块5:Tab内容区域 -->
<view class="tab-content">
<view v-if="activeTab === 'notice'" class="content-section">
<view class="content-block" v-for="(item, idx) in scenic.bookingNotice" :key="idx">
<text class="block-title">{{ item.title }}</text>
<view class="divider" />
<text class="block-text">{{ item.content }}</text>
</view>
<rich-text class="notice-html" :nodes="scenic.bookingNoticeHtml" />
</view>
<view v-if="activeTab === 'intro'" class="content-section">
<text class="intro-text">{{ scenic.introduction }}</text>
@@ -156,7 +152,7 @@ interface ScenicDetail {
id: number; name: string; price: number; freeCount: number; level: string
hours: string; needReservation: boolean; bookingDeadline: string
phone: string; address: string; tags: string[]; images: string[]
introduction: string; bookingNotice: NoticeItem[]; cards: CardBenefit[]
introduction: string; bookingNotice: NoticeItem[]; bookingNoticeHtml: string; cards: CardBenefit[]
scenicId: number; shopId: number; mainPic: string; status: number
}
@@ -208,6 +204,7 @@ async function fetchDetail(shopId: string) {
images: res.images || (res.mainPic ? [res.mainPic] : []),
introduction: res.introduction || '',
bookingNotice: res.bookingNotice || [],
bookingNoticeHtml: res.bookingNoticeHtml || '',
cards: res.cards || [],
scenicId: res.scenicId || res.id || shopId,
shopId: res.shopId || shopId,
@@ -593,8 +590,7 @@ $icon-crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' w
align-items: center;
justify-content: center;
padding: $spacing-3;
margin: 0 $spacing-3;
margin-bottom: $spacing-3;
margin: $spacing-3 $spacing-3;
background: $uv-primary-light;
border-radius: $radius-full;
@@ -702,6 +698,13 @@ $icon-crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' w
display: block;
}
.notice-html {
font-size: $font-size-sm;
color: $uv-tips-color;
line-height: 1.8;
display: block;
}
/* ====== 底部安全区 ====== */
.safe-bottom {
height: calc(40rpx + env(safe-area-inset-bottom));
+9 -2
View File
@@ -8,7 +8,7 @@
<view class="back-arrow" />
</view>
</view>
<text class="nav-title">全部合作景区</text>
<text class="nav-title">{{ navTitle }}</text>
<view class="nav-side" />
</view>
</view>
@@ -44,7 +44,7 @@
<text class="dropdown-label" :class="{ active: selectedLevel }">{{ selectedLevel || '景区等级' }}</text>
<view class="dropdown-arrow" />
</view>
<view class="dropdown-trigger" @click="openPicker('cardType')">
<view class="dropdown-trigger" :class="{ 'dropdown-trigger--disabled': fromQrcode }" @click="!fromQrcode && openPicker('cardType')">
<text class="dropdown-label" :class="{ active: selectedCardType }">{{ selectedCardTypeLabel }}</text>
<view class="dropdown-arrow" />
</view>
@@ -255,6 +255,8 @@ stickyHeaderHeight.value = 100
// ========== URL 参数 ==========
const cardNumber = ref('')
const cardModelId = ref('')
const fromQrcode = computed(() => !!cardModelId.value)
const navTitle = computed(() => fromQrcode.value ? '旅游卡景区预约' : '全部合作景区')
// ========== 分页 ==========
const pageNo = ref(1)
@@ -761,6 +763,11 @@ function onCardClick(scenic: ScenicItem) {
&:active {
background: $color-muted;
}
&--disabled {
opacity: 0.5;
pointer-events: none;
}
}
.dropdown-label {
+1 -1
View File
@@ -17,7 +17,7 @@ const loading = ref(true)
onMounted(async () => {
try {
const data = await post<BannerItem[]>('/mp-api/mpContent/queryList', { channel: 'aspx', type: 'GUIDE' })
const data = await post<BannerItem[]>('/mp-api/mpContent/queryList', { channel: 'pingxiang', type: 'GUIDE' })
if (data && data.length > 0) {
imageUrl.value = data[0].imageUrl || ''
}