This commit is contained in:
Felix
2026-01-05 11:50:51 +08:00
parent 827b939299
commit bdf0112046
5 changed files with 11 additions and 9 deletions

View File

@@ -74,7 +74,8 @@ Component({
const hasPhrs = !!(detail['phrs'] && detail['phrs'].phrs && detail['phrs'].phrs.length > 0)
const hasPastExam = !!(detail['individual'] && detail['individual'].pastExamSents && detail['individual'].pastExamSents.length > 0)
const defaultTab = hasCollins ? '0' : (hasPhrs ? '1' : (hasPastExam ? '2' : '3'))
const proto = (detail.ee?.word?.['return-phrase']?.['l']?.['i']) || (detail?.ec?.word?.[0]?.prototype)
const protoTemp = detail.ee?.word?.['return-phrase']?.['l']?.['i'] || ''
const proto = protoTemp != '' && protoTemp != word ? protoTemp : (detail?.ec?.word?.[0]?.prototype || '')
const hideProto = !!self.data.forceHidePrototype
self.setData({
wordDict: {

View File

@@ -15,7 +15,7 @@
<t-icon wx:if="{{showBackIcon}}" name="chevron-left" size="40rpx" bindtap="onBack"></t-icon>
{{wordDict.simple.query}}
</view>
<view class="word-source" wx:if="{{prototypeWord && !prototypeWord !== ''}}">词源: <t-tag variant="light" theme="primary" data-word="{{prototypeWord}}" bindtap="onWordTap">{{prototypeWord}}</t-tag></view>
<view class="word-source" wx:if="{{prototypeWord && prototypeWord !== ''}}">词源: <t-tag variant="light" theme="primary" data-word="{{prototypeWord}}" bindtap="onWordTap">{{prototypeWord}}</t-tag></view>
<view class="more-btn" wx:if="{{!isWordEmptyResult}}" bindtap="onMore">
<text wx:if="{{!expanded}}">More</text>
<t-icon wx:if="{{!expanded}}" name="chevron-up" size="48rpx"></t-icon>

View File

@@ -198,12 +198,13 @@ Page({
let new_y = y
// 修正 x
if (new_x > max_x) new_x = max_x
if (new_x < min_x) new_x = min_x
// 增加 2px 的容差缓冲,防止因浮点数计算精度导致的边界吸附过早
if (new_x > max_x + 2) new_x = max_x
if (new_x < min_x - 2) new_x = min_x
// 修正 y
if (new_y > max_y) new_y = max_y
if (new_y < min_y) new_y = min_y
if (new_y > max_y + 2) new_y = max_y
if (new_y < min_y - 2) new_y = min_y
// 只有当位置需要修正时,或者 scale 发生变化时才 setData
if (Math.abs(new_x - x) > 1 || Math.abs(new_y - y) > 1 || Math.abs(scale - this.data.scale) > 0.001) {

View File

@@ -4,8 +4,8 @@
class="image-holder"
direction="all"
scale
scale-min="0.5"
scale-max="10"
scale-min="{{minScale}}"
scale-max="{{maxScale}}"
scale-value="{{scale}}"
x="{{x}}"
y="{{y}}"

View File

@@ -2,7 +2,7 @@ const accountInfo = wx.getAccountInfoSync()
const envVersion = accountInfo?.miniProgram?.envVersion || 'release'
const BASE_URL_MAP: Record<string, string> = {
develop: 'https://app.xhzone.cn',
develop: 'https://app.quanzhan.cc',
trial: 'http://guzjwuna.prod.ihnm9taa.e13h9xq5.com',
release: 'http://guzjwuna.prod.ihnm9taa.e13h9xq5.com'
}