Files
novel_frontend_RcKtFezyRAZX/wechat/pages/home/home.wxml
mzltMpfqGS e4a087e67e init
2026-04-15 19:45:16 +08:00

76 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- pages/home/home.wxml -->
<!-- 首页视图 -->
<view class="home-container">
<!-- 搜索栏 -->
<view class="search-bar">
<input class="search-input" placeholder="请输入搜索关键词" bindconfirm="onSearch" />
<icon type="search" class="search-icon" />
</view>
<!-- 轮播图 -->
<swiper class="banner-swiper" indicator-dots indicator-color="rgba(255,255,255,0.5)" indicator-active-color="#fff" autoplay circular>
<block wx:for="{{bannerList}}" wx:key="id">
<swiper-item>
<image src="{{item.image}}" class="banner-image" mode="aspectFill" bindtap="onBannerTap" data-index="{{index}}" />
</swiper-item>
</block>
</swiper>
<!-- 分类导航 -->
<view class="category-nav">
<block wx:for="{{categoryList}}" wx:key="id">
<view class="category-item" bindtap="goToCategory" data-id="{{item.id}}">
<view class="category-icon">
<text class="iconfont {{item.icon}}"></text>
</view>
<text class="category-name">{{item.name}}</text>
</view>
</block>
</view>
<!-- 统计数据 -->
<view class="stats-section">
<view class="stats-item">
<text class="stats-value">{{stats.userCount}}</text>
<text class="stats-label">用户总数</text>
</view>
<view class="stats-item">
<text class="stats-value">{{stats.articleCount}}</text>
<text class="stats-label">文章总数</text>
</view>
<view class="stats-item">
<text class="stats-value">{{stats.commentCount}}</text>
<text class="stats-label">评论总数</text>
</view>
</view>
<!-- 推荐文章 -->
<view class="section">
<view class="section-header">
<text class="section-title">推荐文章</text>
<text class="section-more" bindtap="loadMoreArticles">查看更多 ></text>
</view>
<view class="article-list">
<block wx:for="{{articleList}}" wx:key="id">
<view class="article-item" bindtap="goToArticle" data-id="{{item.id}}">
<image src="{{item.coverImage}}" class="article-image" mode="aspectFill" />
<view class="article-info">
<text class="article-title">{{item.title}}</text>
<view class="article-meta">
<text class="article-author">{{item.author}}</text>
<text class="article-count">阅读 {{item.viewCount}} 点赞 {{item.likeCount}}</text>
</view>
</view>
</view>
</block>
</view>
</view>
</view>
/**
* @联系作者:16768118056
* @描述:(此项目非免费分享)源码百分百可用,搞定毕设不发愁,支持远程调试安装、二次开发、定制、讲解、文档类。
* @访问:https://www.notmaker.com/detail/8326a897119d4542896c863a69d7bbe7/gtt20260415,查看完整运行演示。
*/