Files
zt-closet-wxmini-frontend/miniprogram/pages/wardrobe/wardrobe.wxml
T
2026-09-11 01:45:04 +08:00

65 lines
1.8 KiB
Plaintext

<view class="page page-flex">
<navigation-bar title="我的衣橱" back="{{false}}" />
<scroll-view
scroll-y
class="scroll-body"
refresher-enabled
refresher-triggered="{{refreshing}}"
bindrefresherrefresh="onRefresh"
bindscrolltolower="onReachBottom"
>
<!-- 分类筛选 -->
<scroll-view scroll-x class="cat-scroll" show-scrollbar="{{false}}">
<view class="cat-row">
<view
wx:for="{{categories}}"
wx:key="name"
class="cat-item {{activeCategory === index ? 'active' : ''}}"
data-index="{{index}}"
bindtap="onCategoryTap"
>{{item.name}}</view>
</view>
</scroll-view>
<!-- 统计 -->
<view class="stat">共 {{total}} 件 · 上传额度剩余 {{uploadRemain}} 次</view>
<!-- 骨架屏 -->
<view wx:if="{{loading}}" class="grid">
<view class="grid-item" wx:for="{{[1, 2, 3, 4, 5, 6]}}" wx:key="*this">
<view class="skeleton sk-card"></view>
<view class="skeleton sk-line"></view>
</view>
</view>
<!-- 空态 -->
<empty-state
wx:elif="{{!list.length}}"
icon="icon-hanger"
title="衣橱还空着"
desc="拍照上传第一件衣物,AI 自动抠图并识别属性"
buttonText="上传衣物"
bind:action="onUpload"
/>
<!-- 衣物网格 -->
<view wx:else class="grid">
<view class="grid-item" wx:for="{{list}}" wx:key="clothes_uuid">
<clothes-card
item="{{item}}"
statusText="{{item._statusText}}"
statusType="{{item._statusType}}"
bind:select="onClothesTap"
/>
</view>
</view>
<view wx:if="{{list.length && !hasMore}}" class="no-more">没有更多了</view>
</scroll-view>
<view class="fab" bindtap="onUpload">
<view class="icon icon-plus"></view>
</view>
</view>