fix code
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user