Files
xingque/pages/fighter-orders/fighter-orders.wxml

112 lines
4.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.
<view class="ds-page">
<!-- 顶部商品类型滑动 -->
<view class="leixing-area">
<scroll-view class="leixing-scroll" scroll-x enhanced show-scrollbar="{{false}}">
<view class="leixing-container">
<block wx:for="{{shangpinleixing}}" wx:key="id">
<view
class="leixing-item {{xuanzhongLeixingId == item.id ? 'leixing-active' : ''}}"
data-id="{{item.id}}"
bindtap="selectLeixing"
>
<image class="leixing-img" src="{{item.full_tupian_url}}" mode="aspectFill"/>
<text class="leixing-name">{{item.jieshao || '类型'}}</text>
</view>
</block>
</view>
</scroll-view>
</view>
<!-- 筛选行 -->
<view class="filter-row">
<view class="type-switch">
<view class="type-btn {{orderType == 'normal' ? 'type-active' : ''}}" data-type="normal" bindtap="switchOrderType">普通订单</view>
<view class="type-btn {{orderType == 'peihu' ? 'type-active' : ''}}" data-type="peihu" bindtap="switchOrderType">陪护订单</view>
</view>
<view class="search-box">
<image class="search-icon" src="/images/icon_search.svg" mode="aspectFit"/>
<input class="search-input" placeholder="搜索订单ID/介绍" value="{{searchKeyword}}" bindinput="onSearchInput" bindconfirm="onSearchConfirm" confirm-type="search"/>
<view class="search-clear" wx:if="{{searchKeyword}}" bindtap="clearSearch"><text>✕</text></view>
</view>
</view>
<!-- 主体:左右布局 -->
<view class="main-container">
<!-- 左侧状态栏(固定) -->
<view class="left-status">
<block wx:for="{{statusList}}" wx:key="key">
<view class="status-item {{currentStatusKey == item.key ? 'status-active' : ''}}" data-key="{{item.key}}" bindtap="switchStatus">
<text class="status-name">{{item.name}}</text>
<view class="status-dot" wx:if="{{currentStatusKey == item.key}}"></view>
</view>
</block>
</view>
<!-- 右侧包裹:撑出右边距,里面是 scroll-view -->
<view class="right-wrapper">
<scroll-view
class="right-list"
scroll-y enhanced show-scrollbar="{{false}}"
refresher-enabled="{{true}}"
refresher-threshold="80"
refresher-default-style="black"
refresher-background="#f5f6fa"
refresher-triggered="{{scrollViewRefreshing}}"
bindrefresherrefresh="onPullDownRefresh"
bindscrolltolower="onReachBottom"
lower-threshold="50"
>
<view class="refresher-slot" slot="refresher">
<text wx:if="{{scrollViewRefreshing}}" class="refreshing-text">⚡ 正在刷新...</text>
<text wx:else class="pull-text">▼ 下拉刷新</text>
</view>
<!-- 内容容器:仅设置左侧 padding右侧间距由 wrapper 控制 -->
<view class="list-inner">
<view wx:if="{{isLoading && currentList.length === 0}}" class="loading-state">
<view class="loading-spinner"></view>
<text class="loading-tip">加载订单中...</text>
</view>
<view wx:elif="{{!isLoading && currentList.length === 0}}" class="empty-state">
<image class="empty-img" src="/images/empty-order.png" mode="aspectFit"/>
<text class="empty-text">暂无订单</text>
</view>
<block wx:for="{{currentList}}" wx:key="dingdan_id">
<view class="order-card" data-item="{{item}}" bindtap="goToDsDingdanXiangqing">
<image class="card-img" src="{{item.tupian}}" mode="aspectFill" binderror="onImageError"/>
<view class="card-info">
<view class="card-title">{{item.jieshao || '暂无描述'}}</view>
<view class="card-id" wx:if="{{item.dingdan_id}}">ID: {{item.dingdan_id}}</view>
</view>
<view class="card-right">
<view class="card-status" style="color: {{item.zhuangtaiColor}};">{{item.zhuangtaiZh}}</view>
<view class="card-price">¥{{item.jine || '0.00'}}</view>
</view>
</view>
</block>
<view class="load-more" wx:if="{{hasMore && currentList.length > 0 && !isLoadingMore}}">
<text class="load-more-text">上拉加载更多</text>
</view>
<view class="loading-more-state" wx:if="{{isLoadingMore}}">
<view class="mini-spinner"></view>
<text>加载中...</text>
</view>
<view class="manual-load-more" wx:if="{{hasMore && currentList.length > 0 && !isLoadingMore}}">
<button class="load-more-btn" bindtap="onLoadMoreTap" loading="{{false}}">点击加载更多</button>
</view>
<view class="no-more" wx:if="{{!hasMore && currentList.length > 0}}">
<text>—— 没有更多了 ——</text>
</view>
</view>
</scroll-view>
</view>
</view>
</view>
<global-notification id="global-notification" />
<tab-bar />