功能:收口小程序前后台安全与防重复提交
This commit is contained in:
@@ -1,17 +1,13 @@
|
||||
<navigation-bar title="作品库" back="{{false}}" color="#2d2430" background="#fff7f8"></navigation-bar>
|
||||
|
||||
<view class="page-shell product-page">
|
||||
<view class="page-content">
|
||||
<view class="page-hero product-hero">
|
||||
<text class="hero-kicker">作品筛选</text>
|
||||
<text class="hero-title">{{selectedCategory !== '全部' ? selectedCategory : '找到适合你的美甲款式'}}</text>
|
||||
<text class="hero-desc">{{activeBannerText ? activeBannerText : '按标签筛选或输入关键词搜索,先缩小范围,再挑喜欢的作品。'}}</text>
|
||||
|
||||
<view class="search-card">
|
||||
<view class="page-content product-page-content">
|
||||
<view class="sticky-filter-bar">
|
||||
<view class="filter-surface">
|
||||
<view class="search-row">
|
||||
<input
|
||||
class="search-input"
|
||||
placeholder="搜索作品名称或关键词"
|
||||
placeholder="搜索标题、标签或描述"
|
||||
placeholder-class="field-placeholder"
|
||||
value="{{searchKeyword}}"
|
||||
bindinput="handleSearchInput"
|
||||
@@ -21,7 +17,7 @@
|
||||
<view class="search-btn" bindtap="handleSearchConfirm">搜索</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="category-scroll" scroll-x enable-flex>
|
||||
<scroll-view class="category-scroll" scroll-x enable-flex show-scrollbar="false">
|
||||
<view class="category-list">
|
||||
<view
|
||||
wx:for="{{categories}}"
|
||||
@@ -34,21 +30,32 @@
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
<view class="results-head">
|
||||
<view class="results-meta">
|
||||
<view class="results-count">{{products.length ? products.length : 0}} 个</view>
|
||||
<view wx:if="{{filterSummaryText}}" class="filter-summary-chip">{{filterSummaryText}}</view>
|
||||
</view>
|
||||
<view wx:if="{{searchKeyword || selectedCategory !== '全部'}}" class="ghost-btn results-reset" bindtap="handleResetFilters">重置</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="results-head">
|
||||
<view class="results-count">{{products.length ? products.length : 0}} 个结果</view>
|
||||
<view wx:if="{{searchKeyword || selectedCategory !== '全部'}}" class="ghost-btn results-reset" bindtap="handleResetFilters">重置筛选</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{activeBannerText}}" class="filter-banner">{{activeBannerText}}</view>
|
||||
|
||||
<view wx:if="{{products.length}}" class="product-grid">
|
||||
<view wx:for="{{products}}" wx:key="id" class="product-grid-item">
|
||||
<product-card item="{{item}}" show-stats="{{true}}" bindselect="handleProductSelect"></product-card>
|
||||
<product-card
|
||||
item="{{item}}"
|
||||
show-stats="{{true}}"
|
||||
show-quick-add="{{true}}"
|
||||
in-cart="{{item.inCart}}"
|
||||
bindselect="handleProductSelect"
|
||||
bindquickadd="handleQuickAdd"
|
||||
></product-card>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{products.length && (loadingMore || !hasMore)}}" class="load-state">
|
||||
<text class="load-state-text">{{loadingMore ? '正在加载更多作品...' : '已经到底了'}}</text>
|
||||
</view>
|
||||
|
||||
<view wx:elif="{{loading}}" class="page-card empty-card">
|
||||
<text class="empty-title">正在加载作品</text>
|
||||
@@ -56,7 +63,7 @@
|
||||
|
||||
<view wx:else class="page-card empty-card">
|
||||
<text class="empty-title">暂时没有匹配的作品</text>
|
||||
<text class="empty-desc">可以换个关键词试试,或者先浏览全部作品。</text>
|
||||
<text class="empty-desc">换个关键词试试。</text>
|
||||
<view class="ghost-btn" bindtap="handleResetFilters">查看全部</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user