Files
danyang-match/miniapp/pages/content/content.wxml
T

20 lines
1.7 KiB
Plaintext
Raw Normal View History

<view class="content-page app-page reference-page">
<ui-service-hero eyebrow="学习成长 · 认真相遇" title="婚恋课堂" subtitle="学习成长,收获更好的自己" image-src="/assets/covers/classroom-default.jpg" tone="rose" />
<scroll-view scroll-x class="content-categories">
<view class="content-category-row"><view wx:for="{{categories}}" wx:key="id" data-id="{{item.id}}" bindtap="select" class="content-category {{activeCategoryId === item.id ? 'active' : ''}}">{{item.name}}</view></view>
</scroll-view>
<view class="content-list">
<ui-loading wx:if="{{loading}}" mode="skeleton" rows="4" />
<ui-error-state wx:elif="{{loadError}}" title="暂时无法加载课堂内容" description="请检查网络后重试" bind:retry="onRetry" />
<view wx:elif="{{articles.length}}">
<view wx:for="{{articles}}" wx:key="id" class="content-card" data-id="{{item.id}}" bindtap="open">
<image class="content-cover" src="{{item.coverFileId || '/assets/covers/classroom-default.jpg'}}" mode="aspectFill" />
<view class="content-card__body"><text class="content-card__category">{{item.categoryName}}</text><text class="content-card__title">{{item.title}}</text><text wx:if="{{item.summary}}" class="content-card__summary">{{item.summary}}</text><view class="content-card__meta"><text>浏览 {{item.viewCount || 0}}</text><text>{{item.publishAtText}}</text></view></view>
<image class="content-card__arrow" src="/assets/icons/ui/chevron-right.png" mode="aspectFit" />
</view>
</view>
<ui-empty wx:else illustration="default" title="暂无课堂内容" description="公益内容正在准备中,请稍后再来" />
</view>
</view>