tangshi300/pages/poetry-item/poetry-item.wxml

48 lines
2.2 KiB
Plaintext
Raw Permalink Normal View History

2024-12-05 14:56:07 +08:00
<privacy-popup id="privacy-popup-index"></privacy-popup>
<view class="container">
<van-tabs active="{{active}}" bind:change="onTabChange" class="tabs">
<van-tab title="古诗">
<scroll-view class="book" scrollY="true">
<view class="book-line" data-index="{{index}}" wx:for="{{poetry.poetryLineList}}" wx:key="index">
<view class="book-line-item" wx:for="{{item}}" wx:for-index="idx" wx:for-item="childItem" wx:key="idx">
<view class="book-line-pingyin" wx:if="{{pinyin}}">{{childItem.pinyin}}</view>
<view class="book-line-word">{{childItem.word}}</view>
</view>
</view>
</scroll-view>
<view class="control">
<view bindtap="toRecord" class="record">
<image class="record-img" mode="aspectFit" src="/img/microphone.png"></image>
</view>
<view bindtap="playPoetry" class="record">
<image class="play-img" mode="aspectFit" src="{{playing?'/img/sound.png':'/img/play.png'}}"></image>
</view>
<view bindtap="choosePinyin" class="record">
<image class="pinyin-img" mode="aspectFit" src="{{pinyin?'/img/pinyin-s.png':'/img/pinyin.png'}}"></image>
</view>
</view>
</van-tab>
<van-tab title="译文">
<view class="yuanwen">
<rich-text class="yuanwen-html" nodes="{{poetry.translation}}"></rich-text>
</view>
</van-tab>
<van-tab title="赏析">
<view class="yuanwen">
<rich-text class="yuanwen-html" nodes="{{poetry.appreciate}}"></rich-text>
</view>
</van-tab>
<van-tab title="背景">
<view class="yuanwen">
<rich-text class="yuanwen-html" nodes="{{poetry.background}}"></rich-text>
</view>
</van-tab>
<van-tab title="作者">
<view class="yuanwen">
<rich-text class="yuanwen-html" nodes="{{poetry.authorSummary}}"></rich-text>
</view>
</van-tab>
</van-tabs>
</view>
<van-toast id="van-toast"></van-toast>