first commit
This commit is contained in:
58
pages/category/index.wxml
Normal file
58
pages/category/index.wxml
Normal file
@@ -0,0 +1,58 @@
|
||||
<!--pages/category/index.wxml-->
|
||||
<navigation-bar title="服务分类" back="{{false}}" color="black" background="#FFF"></navigation-bar>
|
||||
|
||||
<view class="category-container">
|
||||
<!-- 左侧分类导航 -->
|
||||
<scroll-view scroll-y class="category-sidebar">
|
||||
<view
|
||||
wx:for="{{categories}}"
|
||||
wx:key="id"
|
||||
class="category-item {{activeCategory === item.id ? 'active' : ''}}"
|
||||
bindtap="switchCategory"
|
||||
data-id="{{item.id}}"
|
||||
>
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<!-- 右侧服务列表 -->
|
||||
<scroll-view scroll-y class="service-content">
|
||||
<!-- 分类标题 -->
|
||||
<view class="category-title">
|
||||
{{categories[activeCategory].name}}
|
||||
<text class="category-count">{{currentServices.length}}个项目</text>
|
||||
</view>
|
||||
|
||||
<!-- 服务列表 -->
|
||||
<view class="service-list" wx:if="{{currentServices.length > 0}}">
|
||||
<view
|
||||
wx:for="{{currentServices}}"
|
||||
wx:key="id"
|
||||
class="service-card"
|
||||
bindtap="goToServiceDetail"
|
||||
data-id="{{item.id}}"
|
||||
>
|
||||
<image src="{{item.image}}" mode="aspectFill" class="service-image"></image>
|
||||
<view class="service-info">
|
||||
<view class="service-name">{{item.name}}</view>
|
||||
<view class="service-desc">{{item.desc}}</view>
|
||||
<view class="service-price-row">
|
||||
<view class="service-price">
|
||||
<text class="price">¥{{item.price}}</text>
|
||||
<text class="original-price">¥{{item.originalPrice}}</text>
|
||||
</view>
|
||||
<view class="service-sales">已售{{item.sales}}</view>
|
||||
</view>
|
||||
<view class="service-btn">
|
||||
<t-button theme="primary" size="small">立即预约</t-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 空状态 -->
|
||||
<view class="empty-state" wx:if="{{currentServices.length === 0}}">
|
||||
<t-empty icon="info-circle-filled" description="暂无相关服务" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
Reference in New Issue
Block a user