|
|
<!--pages/main/main.wxml-->
|
|
|
<view class="page-container">
|
|
|
<!-- 顶部导航栏 -->
|
|
|
<view class="header">
|
|
|
<view class="search-bar">
|
|
|
<image class="search-icon" src="/images/边牧.png" mode="aspectFit"></image>
|
|
|
<input
|
|
|
class="search-input"
|
|
|
placeholder="搜索商品、求购信息"
|
|
|
value="{{searchText}}"
|
|
|
bindinput="onSearchInput"
|
|
|
bindconfirm="onSearchConfirm"
|
|
|
confirm-type="search"
|
|
|
/>
|
|
|
</view>
|
|
|
<view class="user-info" bindtap="onUserProfile">
|
|
|
<image class="avatar" src="{{userInfo.avatar || '/images/更多犬种.png'}}" mode="aspectFit"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<view class="hero-banner">
|
|
|
<view class="hero-content">
|
|
|
<text class="hero-title"> CAUC市集</text>
|
|
|
<text class="hero-subtitle">发现校园好物,心动立刻带回家</text>
|
|
|
<view class="hero-tags">
|
|
|
<text class="hero-tag">闲置</text>
|
|
|
<text class="hero-tag">限量</text>
|
|
|
<text class="hero-tag">人气</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 功能导航 -->
|
|
|
<view class="nav-section">
|
|
|
<!-- 卖家功能 -->
|
|
|
<view class="function-group">
|
|
|
<text class="group-title">出闲置</text>
|
|
|
<view class="nav-grid">
|
|
|
<view class="nav-item theme-pricing" bindtap="onNavigateTo" data-page="pricing">
|
|
|
<text class="nav-icon-emoji">🤖</text>
|
|
|
<text class="nav-text">AI定价</text>
|
|
|
</view>
|
|
|
<view class="nav-item theme-publish" bindtap="onNavigateTo" data-page="publish">
|
|
|
<text class="nav-icon-emoji">➕</text>
|
|
|
<text class="nav-text">发布商品</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 买家功能 -->
|
|
|
<view class="function-group">
|
|
|
<text class="group-title">找闲置</text>
|
|
|
<view class="nav-grid">
|
|
|
<view class="nav-item theme-buy" bindtap="onNavigateTo" data-page="buy">
|
|
|
<text class="nav-icon-emoji">🛍️</text>
|
|
|
<text class="nav-text">商品购买</text>
|
|
|
</view>
|
|
|
<view class="nav-item theme-wanted" bindtap="onNavigateTo" data-page="wanted">
|
|
|
<text class="nav-icon-emoji">📣</text>
|
|
|
<text class="nav-text">求购</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 推荐商品区域 -->
|
|
|
<view class="recommend-section">
|
|
|
<view class="section-header">
|
|
|
<view class="header-left">
|
|
|
<text class="section-title">猜您感兴趣</text>
|
|
|
<text class="section-subtitle">基于你的最近浏览与兴趣为你推荐</text>
|
|
|
</view>
|
|
|
<view class="more-btn" bindtap="onViewMoreRecommendations">
|
|
|
<text>更多推荐</text>
|
|
|
<text class="more-arrow">›</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<scroll-view class="recommend-scroll" scroll-x="true">
|
|
|
<view class="recommend-list">
|
|
|
<view class="product-card" wx:for="{{recommendProducts}}" wx:key="id" bindtap="onProductTap" data-id="{{item.id}}" data-product="{{item}}">
|
|
|
<image class="product-image" src="{{item.image}}" mode="aspectFill"></image>
|
|
|
<view class="product-info">
|
|
|
<text class="product-name">{{item.name}}</text>
|
|
|
<text class="product-price">¥{{item.price}}</text>
|
|
|
<text class="product-tag">{{item.tag}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 热门求购 -->
|
|
|
<view class="wanted-section">
|
|
|
<view class="section-header">
|
|
|
<view class="header-left">
|
|
|
<text class="section-title">热门求购</text>
|
|
|
<text class="section-subtitle">大家都在找什么闲置</text>
|
|
|
</view>
|
|
|
<view class="more-btn" bindtap="onViewMoreWanted">
|
|
|
<text>更多</text>
|
|
|
<text class="more-arrow">›</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="wanted-list">
|
|
|
<view class="wanted-item" wx:for="{{hotWanted}}" wx:key="id" bindtap="onWantedTap" data-id="{{item.id}}">
|
|
|
<text class="wanted-title">{{item.title}}</text>
|
|
|
<view class="wanted-info">
|
|
|
<text class="wanted-price">预算: ¥{{item.budget}}</text>
|
|
|
<text class="wanted-time">{{item.time}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="empty-wanted" wx:if="{{hotWanted.length === 0}}">
|
|
|
<text>暂无热门求购</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
<!-- 使用自定义TabBar,移除页面内底部导航 -->
|
|
|
</view> |