43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
<navigation-bar title="我的收藏" showBack="{{true}}" fallbackPath="/pages/profile/index" color="#2d2430" background="#fff7f8"></navigation-bar>
|
|
|
|
<view class="page-shell wishlist-page">
|
|
<view class="page-content">
|
|
<view wx:if="{{!isLoggedIn}}" class="page-card empty-card">
|
|
<text class="empty-title">登录后查看收藏</text>
|
|
<text class="empty-desc">登录后查看收藏作品。</text>
|
|
<view class="ghost-btn" bindtap="handleOpenAuth">去登录</view>
|
|
</view>
|
|
|
|
<block wx:elif="{{wishlist.length}}">
|
|
<view class="page-hero wishlist-hero">
|
|
<text class="hero-kicker">收藏夹</text>
|
|
<text class="hero-title">已收藏 {{wishlist.length}} 个作品</text>
|
|
<text class="hero-desc">喜欢的款式先收藏。</text>
|
|
</view>
|
|
|
|
<view wx:for="{{wishlist}}" wx:key="id" class="wishlist-item">
|
|
<product-card
|
|
item="{{item.productCard}}"
|
|
show-quick-add="{{true}}"
|
|
in-cart="{{item.productCard.inCart}}"
|
|
bindselect="handleProductSelect"
|
|
bindquickadd="handleQuickAdd"
|
|
></product-card>
|
|
<view class="wishlist-actions">
|
|
<view class="wishlist-action wishlist-action--secondary" data-product-id="{{item.productId}}" bindtap="handleRemove">取消收藏</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
|
|
<view wx:elif="{{loading}}" class="page-card empty-card">
|
|
<text class="empty-title">正在加载收藏内容</text>
|
|
</view>
|
|
|
|
<view wx:else class="page-card empty-card">
|
|
<text class="empty-title">你还没有收藏作品</text>
|
|
<text class="empty-desc">先去逛逛作品。</text>
|
|
<view class="ghost-btn" bindtap="handleBack">去逛作品</view>
|
|
</view>
|
|
</view>
|
|
</view>
|