2025-08-15 00:36:04 +08:00
|
|
|
<!-- pages/course/searchCourses/searchCourses.wxml -->
|
|
|
|
<view class="page">
|
2025-07-20 18:22:59 +08:00
|
|
|
|
2025-08-15 00:36:04 +08:00
|
|
|
<!-- 顶部搜索条(固定) -->
|
|
|
|
<view class="search-bar" hover-class="hover">
|
|
|
|
<image class="search-icon" src="./image/sousuo.png" mode="aspectFit"/>
|
|
|
|
<input
|
|
|
|
class="search-input"
|
|
|
|
placeholder="搜索更多好课"
|
|
|
|
placeholder-class="search-ph"
|
|
|
|
bindinput="onSearchInput"
|
|
|
|
confirm-type="search"
|
|
|
|
bindconfirm="onSearch"
|
|
|
|
/>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 搜索结果(独立滚动 & 隐藏滚动条) -->
|
|
|
|
<scroll-view scroll-y class="list no-scrollbar">
|
|
|
|
<block wx:for="{{courseList}}" wx:for-item="item" wx:key="item.id">
|
|
|
|
<view class="course-card" bindtap="gotoCourseDetail" data-id="{{item.id}}" hover-class="hover">
|
|
|
|
<image class="cover" src="{{ globalImgUrl + item.image }}" mode="aspectFill" lazy-load="true"/>
|
|
|
|
<view class="info">
|
|
|
|
<text class="title">{{item.name}}</text>
|
|
|
|
<view class="meta">
|
|
|
|
<text class="price-pill">券后{{item.discountPrice}}元起</text>
|
|
|
|
<text class="people">{{item.orderCount}}人学习</text>
|
2025-06-25 15:44:12 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
2025-08-15 00:36:04 +08:00
|
|
|
</block>
|
|
|
|
|
|
|
|
<!-- 空状态(可选) -->
|
|
|
|
<view wx:if="{{!courseList || courseList.length === 0}}" class="empty">
|
|
|
|
<image class="empty-icon" src="./image/empty.png" mode="aspectFit"/>
|
|
|
|
<text class="empty-text">没找到相关课程,换个关键词试试~</text>
|
2025-06-25 15:44:12 +08:00
|
|
|
</view>
|
2025-08-15 00:36:04 +08:00
|
|
|
</scroll-view>
|
2025-07-20 18:22:59 +08:00
|
|
|
</view>
|