94 lines
3.4 KiB
Plaintext
94 lines
3.4 KiB
Plaintext
<view class="home-page">
|
|
<view class="home-nav" style="padding-top: {{statusBarHeight}}px;">
|
|
<view class="home-nav__inner">
|
|
<image
|
|
src="/assets/imgs/doodle-logo.png"
|
|
mode="aspectFill"
|
|
class="home-nav__logo" />
|
|
<text class="home-nav__name">涂鸦丫</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="home-search-wrap">
|
|
<view class="home-search">
|
|
<van-icon
|
|
name="search"
|
|
size="36rpx"
|
|
color="rgba(50, 46, 37, 0.45)"
|
|
class="home-search__icon" />
|
|
<text class="home-search__placeholder">搜索你喜欢的练习册...</text>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="home-tabs-wrap">
|
|
<category-tabs
|
|
tabs="{{tabs}}"
|
|
active-tab="{{activeTab}}"
|
|
bind:change="onTabChange" />
|
|
</view>
|
|
|
|
<view
|
|
class="home-hero-placeholder"
|
|
aria-role="img"
|
|
aria-label="推荐位占位" />
|
|
|
|
<view class="home-section-panel">
|
|
<view class="home-section-head">
|
|
<text class="home-section-head__title">按年龄挑选</text>
|
|
<text class="home-section-head__more" bindtap="onTapAgeMore"
|
|
>查看全部</text
|
|
>
|
|
</view>
|
|
<scroll-view class="home-age-scroll" scroll-x enable-flex>
|
|
<view class="home-age-row">
|
|
<view
|
|
wx:for="{{ageBands}}"
|
|
wx:key="key"
|
|
class="home-age-item"
|
|
data-key="{{item.key}}"
|
|
bindtap="onTapAgeBand">
|
|
<view
|
|
class="home-age-item__icon-wrap {{activeAgeBand === item.key ? 'home-age-item__icon-wrap--active' : ''}}">
|
|
<text class="home-age-item__icon">{{item.icon}}</text>
|
|
</view>
|
|
<text class="home-age-item__label">{{item.label}}</text>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</view>
|
|
|
|
<view class="home-section-panel home-section-panel--hot">
|
|
<view class="home-section-head">
|
|
<text class="home-section-head__title">热门推荐</text>
|
|
<text class="home-section-head__more" bindtap="onTapHotMore"
|
|
>查看全部</text
|
|
>
|
|
</view>
|
|
<view class="home-hot-list">
|
|
<view
|
|
wx:for="{{hotRecommends}}"
|
|
wx:key="id"
|
|
class="home-hot-card"
|
|
data-title="{{item.title}}"
|
|
bindtap="onTapHotRecommend">
|
|
<view class="home-hot-card__thumb">
|
|
<text class="home-hot-card__thumb-emoji"
|
|
>{{item.emoji}}</text
|
|
>
|
|
</view>
|
|
<view class="home-hot-card__content">
|
|
<text class="home-hot-card__title">{{item.title}}</text>
|
|
<text class="home-hot-card__desc">{{item.desc}}</text>
|
|
<view class="home-hot-card__meta">
|
|
<text class="home-hot-card__tag">{{item.tag}}</text>
|
|
<text class="home-hot-card__score"
|
|
>{{item.score}} ★</text
|
|
>
|
|
</view>
|
|
</view>
|
|
<view class="home-hot-card__action">+</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|