- backend: NestJS service with exercise/plan data - miniprogram: WeChat mini program client - exclude node_modules, dist, runtime data-store, local env
27 lines
882 B
Plaintext
27 lines
882 B
Plaintext
<view class="page">
|
|
<navbar title="搜索" />
|
|
<view class="searchbar">
|
|
<view class="searchbar__box">
|
|
<text class="searchbar__icon">🔍</text>
|
|
<input
|
|
class="searchbar__input"
|
|
placeholder="搜索动作 / 器械 / 部位"
|
|
placeholder-class="ph"
|
|
value="{{q}}"
|
|
confirm-type="search"
|
|
bindinput="onInput" />
|
|
</view>
|
|
</view>
|
|
|
|
<view class="section" style="padding-top: 8rpx;">
|
|
<view class="grid" wx:if="{{results.length}}">
|
|
<view class="grid__item" wx:for="{{results}}" wx:key="id">
|
|
<exercise-card exercise="{{item}}" bind:tap="onExercise" />
|
|
</view>
|
|
</view>
|
|
<view wx:elif="{{loading}}" class="empty">搜索中…</view>
|
|
<view wx:elif="{{searched}}" class="empty">未找到相关动作</view>
|
|
<view wx:else class="empty">输入关键词开始搜索</view>
|
|
</view>
|
|
</view>
|