index.wxml 5.3 KB

1
  1. <view class="container data-v-1cf27b2a"><view class="search-bar data-v-1cf27b2a" bindtap="{{a}}"><input class="search-input data-v-1cf27b2a" placeholder="水浒传" disabled/><text class="search-icon data-v-1cf27b2a">🔍</text></view><scroll-view class="scroll-content data-v-1cf27b2a" scroll-y><view class="swiper-container data-v-1cf27b2a"><swiper class="swiper data-v-1cf27b2a" indicator-dots="{{true}}" autoplay="{{true}}" interval="{{4000}}" duration="{{600}}" indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#4FC3F7" circular="{{true}}" previous-margin="{{0}}" next-margin="{{0}}"><swiper-item wx:for="{{b}}" wx:for-item="item" wx:key="d" class="data-v-1cf27b2a" bindtap="{{item.e}}"><view class="swiper-item-wrapper data-v-1cf27b2a"><image class="swiper-image data-v-1cf27b2a" src="{{item.a}}" mode="aspectFill" lazy-load="{{true}}" binderror="{{item.b}}"></image><view class="swiper-overlay data-v-1cf27b2a"><text class="swiper-title data-v-1cf27b2a">{{item.c}}</text></view></view></swiper-item></swiper></view><view class="category-nav data-v-1cf27b2a"><view wx:for="{{c}}" wx:for-item="item" wx:key="d" class="category-item data-v-1cf27b2a" bindtap="{{item.e}}"><view class="category-icon data-v-1cf27b2a" style="{{'background-color:' + item.b}}"><text class="icon-text data-v-1cf27b2a">{{item.a}}</text></view><text class="category-text data-v-1cf27b2a">{{item.c}}</text></view></view><view class="section data-v-1cf27b2a"><view class="section-header data-v-1cf27b2a"><text class="section-title data-v-1cf27b2a">今日推荐</text><text class="section-more data-v-1cf27b2a" catchtap="{{d}}">更多&gt;</text></view><view wx:if="{{e}}" class="loading-state data-v-1cf27b2a"><text class="loading-text data-v-1cf27b2a">加载中...</text></view><view wx:elif="{{f}}" class="book-grid data-v-1cf27b2a"><view wx:for="{{g}}" wx:for-item="book" wx:key="d" class="book-item data-v-1cf27b2a" bindtap="{{book.e}}"><image class="book-cover data-v-1cf27b2a" src="{{book.a}}" mode="aspectFill" lazy-load="{{true}}" binderror="{{book.b}}"></image><text class="book-name data-v-1cf27b2a">{{book.c}}</text></view></view><view wx:else class="empty-state data-v-1cf27b2a"><text class="empty-text data-v-1cf27b2a">暂无推荐书籍</text><text class="empty-hint data-v-1cf27b2a">请检查后端服务是否启动,数据库是否有数据</text></view></view><view class="section data-v-1cf27b2a"><view class="section-header data-v-1cf27b2a"><text class="section-title data-v-1cf27b2a">畅销书籍</text><text class="section-more data-v-1cf27b2a" catchtap="{{h}}">更多&gt;</text></view><view wx:if="{{i}}" class="loading-state data-v-1cf27b2a"><text class="loading-text data-v-1cf27b2a">加载中...</text></view><view wx:elif="{{j}}" class="book-list data-v-1cf27b2a"><view wx:for="{{k}}" wx:for-item="book" wx:key="f" class="book-list-item data-v-1cf27b2a" bindtap="{{book.g}}"><image class="book-cover-small data-v-1cf27b2a" src="{{book.a}}" mode="aspectFill" lazy-load="{{true}}" binderror="{{book.b}}"></image><view class="book-info data-v-1cf27b2a"><text class="book-title data-v-1cf27b2a">{{book.c}}</text><text class="book-desc data-v-1cf27b2a">{{book.d}}</text><text class="book-author data-v-1cf27b2a">{{book.e}}</text></view></view></view><view wx:else class="empty-state data-v-1cf27b2a"><text class="empty-text data-v-1cf27b2a">暂无畅销书籍</text><text class="empty-hint data-v-1cf27b2a">请检查后端服务是否启动,数据库是否有数据</text></view></view><view class="section data-v-1cf27b2a"><view class="section-header data-v-1cf27b2a"><text class="section-title data-v-1cf27b2a">精品书单</text><text class="section-more data-v-1cf27b2a" catchtap="{{l}}">更多&gt;</text></view><view wx:if="{{m}}" class="loading-state data-v-1cf27b2a"><text class="loading-text data-v-1cf27b2a">加载中...</text></view><scroll-view wx:elif="{{n}}" class="book-list-horizontal data-v-1cf27b2a" scroll-x><view wx:for="{{o}}" wx:for-item="book" wx:key="d" class="book-item-horizontal data-v-1cf27b2a" bindtap="{{book.e}}"><image class="book-cover-horizontal data-v-1cf27b2a" src="{{book.a}}" mode="aspectFill" lazy-load="{{true}}" binderror="{{book.b}}"></image><text class="book-name-horizontal data-v-1cf27b2a">{{book.c}}</text></view></scroll-view><view wx:else class="empty-state data-v-1cf27b2a"><text class="empty-text data-v-1cf27b2a">暂无精品书单</text><text class="empty-hint data-v-1cf27b2a">请检查后端服务或数据库</text></view></view><view class="section data-v-1cf27b2a"><view class="section-header data-v-1cf27b2a"><text class="section-title data-v-1cf27b2a">更多推荐</text></view><view wx:if="{{p}}" class="loading-state data-v-1cf27b2a"><text class="loading-text data-v-1cf27b2a">加载中...</text></view><view wx:elif="{{q}}" class="book-grid-two data-v-1cf27b2a"><view wx:for="{{r}}" wx:for-item="book" wx:key="e" class="book-item-two data-v-1cf27b2a" bindtap="{{book.f}}"><image class="book-cover-two data-v-1cf27b2a" src="{{book.a}}" mode="aspectFill" lazy-load="{{true}}" binderror="{{book.b}}"></image><text class="book-title-two data-v-1cf27b2a">{{book.c}}</text><text class="book-author-two data-v-1cf27b2a">{{book.d}}</text></view></view><view wx:else class="empty-state data-v-1cf27b2a"><text class="empty-text data-v-1cf27b2a">暂无推荐书籍</text><text class="empty-hint data-v-1cf27b2a">请检查后端服务或数据库</text></view></view></scroll-view></view>