From e8ef127f92d88f03238f7ee8cf47f20ac060ddb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E5=B2=A9?= Date: Fri, 9 Jan 2026 17:32:32 +0800 Subject: [PATCH] =?UTF-8?q?JLBA202505130001=5F=E5=85=B3=E4=BA=8E=E5=90=89?= =?UTF-8?q?=E6=9E=97=E9=93=B6=E8=A1=8C=E6=96=B0=E5=BB=BAAI=E6=99=BA?= =?UTF-8?q?=E8=83=BD=E5=9F=B9=E8=AE=AD=E7=B3=BB=E7=BB=9F=E7=9A=84=E9=9C=80?= =?UTF-8?q?=E6=B1=82=5F0120=E5=BC=80=E5=8F=91=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- certificate/ios/苹果账号.txt | 1 + src/App.vue | 6 +- src/common/common.js | 81 ++++++++------ src/components/examination/subject.vue | 11 +- src/components/points-and-badge/holiday.vue | 105 +++++++++--------- src/pages/competition/pk.vue | 18 +-- src/pages/examination/index.vue | 21 ++-- src/pages/practice/index.vue | 29 ++++- .../components/favorites-course.vue | 9 -- src/pages/wrongQuestionRecord/correct.vue | 18 +-- src/static/images/pointsAndRank/gift.png | Bin 0 -> 110107 bytes 11 files changed, 167 insertions(+), 132 deletions(-) create mode 100644 src/static/images/pointsAndRank/gift.png diff --git a/certificate/ios/苹果账号.txt b/certificate/ios/苹果账号.txt index 2ca46d78..54a427ed 100644 --- a/certificate/ios/苹果账号.txt +++ b/certificate/ios/苹果账号.txt @@ -3,6 +3,7 @@ xiangyuanhua@126.com Xiang@1987 你的 App 专用密码:wais-pyeh-cmww-zqvc +法人实体名称:BANK OF JILIN CO.,LTD 田岩UDID: 00008101-001911401152001E diff --git a/src/App.vue b/src/App.vue index 55b9b3ad..49758a7c 100644 --- a/src/App.vue +++ b/src/App.vue @@ -66,6 +66,9 @@ .max_page { min-height: 100vh; } + .no-touch { + touch-action: none !important; + } // #endif .mr-10 { @@ -176,4 +179,5 @@ margin-right: 8rpx; margin-left: 2rpx; } - + + \ No newline at end of file diff --git a/src/common/common.js b/src/common/common.js index e5416482..45127627 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -284,38 +284,38 @@ function isLogin() { * @returns {string} 最终的额外高度值(带单位) */ export const getExtraHeight = () => { - // 所有常量移入函数内部定义,TARGET_DEVICE_MODEL 改为数组类型 - const TARGET_DEVICE_MODEL = ['XT2321-2']; // 目标设备型号数组(摩托罗拉razr 40 Ultra) - const EXTRA_HEIGHT_TARGET = '15rpx'; // 目标设备额外高度 - const EXTRA_HEIGHT_DEFAULT = '2rpx'; // 默认额外高度 - try { - // 1. 优先读取缓存 - const cachedHeight = getValue('extra_height', ''); - if (cachedHeight) { - console.log('缓存有值直接返回', cachedHeight); - return cachedHeight; // 缓存有值直接返回 - } - // 2. 缓存无值时,获取设备信息 - const deviceInfo = uni.getDeviceInfo(); - // 校验设备信息有效性 - if (!deviceInfo || !deviceInfo.deviceModel) { - throw new Error('设备信息获取失败'); - } - - // 3. 判断设备型号(数组包含判断,适配多型号) - const isTargetDevice = TARGET_DEVICE_MODEL.includes(deviceInfo.deviceModel); - const finalHeight = isTargetDevice ? EXTRA_HEIGHT_TARGET : EXTRA_HEIGHT_DEFAULT; + // 所有常量移入函数内部定义,TARGET_DEVICE_MODEL 改为数组类型 + const TARGET_DEVICE_MODEL = ['XT2321-2']; // 目标设备型号数组(摩托罗拉razr 40 Ultra) + const EXTRA_HEIGHT_TARGET = '15rpx'; // 目标设备额外高度 + const EXTRA_HEIGHT_DEFAULT = '2rpx'; // 默认额外高度 + try { + // 1. 优先读取缓存 + const cachedHeight = getValue('extra_height', ''); + if (cachedHeight) { + console.log('缓存有值直接返回', cachedHeight); + return cachedHeight; // 缓存有值直接返回 + } + // 2. 缓存无值时,获取设备信息 + const deviceInfo = uni.getDeviceInfo(); + // 校验设备信息有效性 + if (!deviceInfo || !deviceInfo.deviceModel) { + throw new Error('设备信息获取失败'); + } - // 4. 缓存结果(后续复用) - setValue('extra_height', finalHeight); - return finalHeight; // 返回计算后的高度 + // 3. 判断设备型号(数组包含判断,适配多型号) + const isTargetDevice = TARGET_DEVICE_MODEL.includes(deviceInfo.deviceModel); + const finalHeight = isTargetDevice ? EXTRA_HEIGHT_TARGET : EXTRA_HEIGHT_DEFAULT; - } catch (error) { - // 5. 异常兜底:返回默认值并缓存 - console.warn('获取/设置额外高度失败:', error.message); - setValue('extra_height', EXTRA_HEIGHT_DEFAULT); - return EXTRA_HEIGHT_DEFAULT; - } + // 4. 缓存结果(后续复用) + setValue('extra_height', finalHeight); + return finalHeight; // 返回计算后的高度 + + } catch (error) { + // 5. 异常兜底:返回默认值并缓存 + console.warn('获取/设置额外高度失败:', error.message); + setValue('extra_height', EXTRA_HEIGHT_DEFAULT); + return EXTRA_HEIGHT_DEFAULT; + } }; @@ -327,20 +327,27 @@ export function setupKeyboardHeightListener(updateCallback) { return () => {}; // #endif // #ifdef APP-PLUS - // 获取系统信息 - const systemInfo = uni.getSystemInfoSync(); - // 计算安全区域底部高度 - const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom; + // 校验回调函数类型,避免非函数传入导致报错 + if (typeof updateCallback !== 'function') { + console.error('setupKeyboardHeightListener: updateCallback 必须是函数'); + return () => {}; + } // 定义处理函数 const handleKeyboardHeightChange = (res) => { + // 获取系统信息 + const systemInfo = uni.getSystemInfoSync(); + console.log('systemInfo', systemInfo); + // 计算安全区域底部高度 + const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom; + console.log('计算安全区域底部高度', safeAreaBottomHeight); let keyboardHeight = res.height; - + console.log('软键盘高度', keyboardHeight); // 仅在iOS端补偿安全区域高度 if (systemInfo.platform === 'ios') { - keyboardHeight = Math.max(0, keyboardHeight - safeAreaBottomHeight); // 避免负数 + keyboardHeight = Math.max(0, keyboardHeight); // 避免负数 } - + console.log('keyboardHeight', keyboardHeight); // 通过回调函数更新外部的响应式变量 updateCallback(keyboardHeight); }; diff --git a/src/components/examination/subject.vue b/src/components/examination/subject.vue index 220ed4f5..ff181608 100644 --- a/src/components/examination/subject.vue +++ b/src/components/examination/subject.vue @@ -1,5 +1,5 @@