wx-chant/pages/index/detail.wxml
@zuopngfei 7e88dbb16c wee
2025-10-19 18:08:12 +08:00

66 lines
2.9 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- pages/index/detail.wxml -->
<!-- 1. 壁纸+客服导航栏区域(对应原逻辑中 wallpaperUrl=1 的场景) -->
<view wx:if="{{ wallpaperUrl === '1' }}">
<!-- 全屏壁纸src 绑定 JS 中 commonAssets 里的图片资源 -->
<image
mode="aspectFill"
src="{{ commonAssets._imports_0 }}"
style="width:100vw; height:100vh;"
></image>
<!-- 客服跳转导航url 拼接 appId与 JS 中 appId 变量对齐 -->
<navigator
url="/pages/contact/index{{ appId ? ('?app_id=' + appId) : '' }}"
style="position:fixed; width:80%; margin-left:10%; bottom:100rpx; color:#fff; background:#ec6d23; border-radius:15rpx; height:75rpx; display:flex; justify-content:center; align-items:center; margin-top:50rpx; z-index:9999; text-decoration:none;"
>
<view style="width:100%; height:100%; display:flex; justify-content:center; align-items:center; color:#fff;">
欢迎联系人工客服
</view>
</navigator>
</view>
<!-- 2. 舞蹈详情区域(对应原逻辑中 wallpaperUrl≠1 的场景) -->
<view class="dance-detail-container" wx:else>
<view class="header"></view>
<!-- 2.1 舞蹈详情内容currentDance 存在时显示,对应原逻辑的 {{c}} -->
<view class="detail-content" wx:if="{{ currentDance }}">
<!-- 舞蹈名称+分类 -->
<view class="dance-header">
<text class="dance-name">{{ currentDance.name }}</text>
<text class="dance-category">{{ currentDance.category }}</text>
</view>
<!-- 舞蹈详情信息(简介/历史/特点/要点,与 JS 中 currentDance 字段对齐) -->
<view class="dance-info">
<!-- 舞蹈简介:对应原 {{f}},使用 currentDance.description 兜底 -->
<view class="info-section">
<text class="section-title">舞蹈简介</text>
<text class="section-content">{{ currentDance.description || '内容待补充...' }}</text>
</view>
<!-- 起源历史:对应原 {{g}},使用 currentDance.history 兜底 -->
<view class="info-section">
<text class="section-title">起源历史</text>
<text class="section-content">{{ currentDance.history || '内容待补充...' }}</text>
</view>
<!-- 基本特点:对应原 {{h}},使用 currentDance.features 兜底 -->
<view class="info-section">
<text class="section-title">基本特点</text>
<text class="section-content">{{ currentDance.features || '内容待补充...' }}</text>
</view>
<!-- 学习要点:对应原 {{i}},使用 currentDance.tips 兜底 -->
<view class="info-section">
<text class="section-title">学习要点</text>
<text class="section-content">{{ currentDance.tips || '内容待补充...' }}</text>
</view>
</view>
</view>
<!-- 2.2 加载中提示currentDance 不存在时显示,对应原逻辑的 wx:else -->
<view class="loading" wx:else>
<text class="loading-text">加载中...</text>
</view>
</view>