This commit is contained in:
Felix
2026-01-02 13:49:47 +08:00
parent a99bf39dfb
commit 0aab0e2172
5 changed files with 22 additions and 5 deletions

View File

@@ -178,6 +178,7 @@ type IPageMethods = {
ensureRecordPermission: () => void
onMoreTap: () => void
onSceneSentenceTap: () => void
onImageQaExerciseTap: () => void
onSentenceTouchStart: (e: any) => void
onSentenceTouchMove: (e: any) => void
onSentenceTouchEnd: () => void
@@ -1411,6 +1412,18 @@ Page<IPageData, IPageInstance>({
})
},
onImageQaExerciseTap() {
const imageId = this.data.imageId || ''
if (!imageId) {
wx.showToast({ title: '缺少图片ID', icon: 'none' })
return
}
this.setData({ isMoreMenuOpen: false, isMoreMenuClosing: false })
wx.navigateTo({
url: `/pages/qa_exercise/qa_exercise?image_id=${encodeURIComponent(imageId)}`
})
},
noop() {},
onUnload() {

View File

@@ -71,7 +71,7 @@
<view class="bottom-more-area {{isMoreMenuOpen ? 'open' : (isMoreMenuClosing ? 'close' : '')}}" wx:if="{{isMoreMenuOpen || isMoreMenuClosing}}">
<view class="more-items">
<view class="more-item" bindtap="onSceneSentenceTap">场景句型</view>
<!-- <view class="more-item">功能2</view> -->
<view class="more-item" bindtap="onImageQaExerciseTap">场景练习</view>
<!-- <view class="more-item">功能3</view> -->
</view>
</view>

View File

@@ -10,10 +10,10 @@
¥{{item.displayAmount}} · 积分 {{item.points}}
<block wx:if="{{item.refundable_amount_cents > 0}}"> · 可退 ¥{{item.displayRefundable}}</block>
</view>
<view slot="right-icon">
<!-- <view slot="right-icon">
<view wx:if="{{!item.refund_status}}" class="refund-btn" bindtap="onRefundTap" data-id="{{item.id}}">退款</view>
<view wx:else class="refund-status {{item.refund_class}}">{{item.refund_display}}</view>
</view>
</view> -->
</t-cell>
</block>
</view>

View File

@@ -239,7 +239,11 @@ Page<IData, IPageInstance>({
},
onOptionLongPress(e: any) {
const ds = e?.currentTarget?.dataset || {}
const word = String(ds.word || '').replace(/[^A-Za-z-]/g, '')
const raw = String(ds.word || '').trim()
// 只有独立的单词能够触发查询,如果包含空格则认为是短语或句子
if (!raw || /\s/.test(raw)) return
const word = raw.replace(/[^A-Za-z-]/g, '')
if (!word) return
this.setData({ showDictPopup: true, showDictExtended: false })
const comp = this.selectComponent('#wordDict') as any

View File

@@ -80,7 +80,7 @@
<view class="bottom-bar {{contentVisible ? 'show' : ''}}">
<t-icon name="chevron-left" class="bottom-btn {{currentIndex <= 0 ? 'disabled' : ''}}" size="48rpx" bind:tap="onPrevTap" />
<t-icon name="{{isPlaying ? 'pause' : 'play'}}" class="bottom-btn" size="48rpx" bind:tap="playStandardVoice" />
<t-icon name="swap" class="bottom-btn" size="48rpx" bind:tap="toggleMode" />
<!-- <t-icon name="swap" class="bottom-btn" size="48rpx" bind:tap="toggleMode" /> -->
<t-icon name="fact-check" class="bottom-btn {{resultDisplayed ? '' : 'disabled'}}" size="48rpx" bind:tap="onScoreTap" />
<t-icon name="chevron-right" class="bottom-btn {{(qaList && (currentIndex >= qaList.length - 1)) ? 'disabled' : ''}}" size="48rpx" bind:tap="onNextTap" />
</view>