diff --git a/.env.development b/.env.development index d384a681..c3a6cc24 100644 --- a/.env.development +++ b/.env.development @@ -18,4 +18,6 @@ VITE_APP_BASE_API_Url = 'https://aitstest.jlbank.com.cn:7001' # h5专用地址 + VITE_APP_BASE_H5_API_Url = 'http://aitstest.jlbank.com.cn:7001' + diff --git a/certificate/ICP备案信息.xlsx b/certificate/ICP备案信息.xlsx new file mode 100644 index 00000000..d01afeaf Binary files /dev/null and b/certificate/ICP备案信息.xlsx differ diff --git a/certificate/android/cert.cer b/certificate/android/cert.cer new file mode 100644 index 00000000..9e8d3bc7 Binary files /dev/null and b/certificate/android/cert.cer differ diff --git a/certificate/android/public_key.pem b/certificate/android/public_key.pem new file mode 100644 index 00000000..92544346 --- /dev/null +++ b/certificate/android/public_key.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnZcvmQypn5F6Hym4517K +uTb5FKJXf4Z+QBqrA2YaAL3VDrHn9s1IpkRu7FwmqqEhYHs72BE3F41pbLkzg178 +d9grSFMJ8N3OtGc9D4/jt4seSyZ2fPWkSN38upQPetFEjYQGJQ3MeCqbhdXGXDQ+ +XRi/wLsVpT7Dp11u0H2r7uFEpD85kkJnooyFdJAptmbdqb/Oi5wCbJZRwO1BSV3h +YOw5T9/4yexLRteSODiMmq7xjAaotfxSNe7OpOGlBBBe84nsmplyDR0mldqh9esC +DcSlBywWIO2y9azWx8F4EyR/3PTJwi03meQFpSB2ioXQwZgQXXlV8Z0VcWx0JRqG +LwIDAQAB +-----END PUBLIC KEY----- diff --git a/certificate/android/获取备案的MD5值.txt b/certificate/android/获取备案的MD5值.txt new file mode 100644 index 00000000..0928575f --- /dev/null +++ b/certificate/android/获取备案的MD5值.txt @@ -0,0 +1,23 @@ + +为什么没有 MD5? +Java 8+ 默认禁用了 MD5(出于安全原因),keytool 默认只显示 SHA-1 和 SHA-256。 + +但 证书本身仍然可以计算 MD5,只是 keytool 默认不显示。 + +如何获取该 Keystore 的 MD5 指纹? +方法 1:使用 openssl 计算证书的 MD5 +导出证书(.cer 或 .pem 格式): + +bash +keytool -exportcert -alias ai_jlyh_app -keystore ai_jlyh_app.keystore -file cert.cer +(输入 keystore 密码) + +用 openssl 计算 MD5 指纹: + +bash +openssl x509 -inform der -in cert.cer -noout -fingerprint -md5 +输出示例: + +text +MD5 Fingerprint=D5:DC:64:CD:DD:A5:25:FE:26:B8:EF:24:8A:2B:B3:89 +去掉冒号,转为小写,就是备案所需的 d5dc64cddda525fe26b8ef248a2bb389。 \ No newline at end of file diff --git a/certificate/android/转换命令.txt b/certificate/android/转换命令.txt index f513de36..0ba3fc1c 100644 --- a/certificate/android/转换命令.txt +++ b/certificate/android/转换命令.txt @@ -6,4 +6,8 @@ keytool -v -importkeystore -srckeystore ai_jlyh_app.p12 -srcstoretype PKCS12 -de # 迁移到行业标准格式 PKCS12 keytool -importkeystore -srckeystore ai_jlyh_app.keystore -destkeystore ai_jlyh_app.keystore -deststoretype pkcs12 -keytool -v -list -keystore ai_jlyh_app.keystore \ No newline at end of file +keytool -v -list -keystore ai_jlyh_app.keystore + + +# cer生成pem +openssl x509 -inform der -in cert.cer -pubkey -noout > public_key.pem \ No newline at end of file diff --git a/certificate/ios/distribution.cer b/certificate/ios/distribution.cer new file mode 100644 index 00000000..04a8f6c9 Binary files /dev/null and b/certificate/ios/distribution.cer differ diff --git a/certificate/ios/public_key.pem b/certificate/ios/public_key.pem new file mode 100644 index 00000000..6090446b --- /dev/null +++ b/certificate/ios/public_key.pem @@ -0,0 +1,9 @@ +-----BEGIN PUBLIC KEY----- +MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAttdtX3bTzu/8jSHkGYd+ +VyaQO94lvu+movMufkT8Whg5X9dMjI4bZrQBXr6YWKi/QQZCruPQy740oD7mm0tq +tSJVD6z+HaTaIIwyLGLzTIuMlkrTrXAtFjSKmAUewsbyIoU5H/THDW1Qic/U+iYH +P75thAoVWKVHdfY8608lZOeeusThlNXz9hWTPvg4ynqR0f0xnBXVP0Aq16BgCE2F +xGsEmZF6aEpMxd4l8+0qo7Qmoh8/UJC0pTEi6RpZZy6i5Tns1GVuq/3wU3uZoB9v +uaf7uJdC8Wjv8IcFOa7VSqb5v2N9r8eYK0+7w9YPL04f0BJkK0e7nBowpO7avuMZ +DwIDAQAB +-----END PUBLIC KEY----- diff --git a/certificate/ios/生产证书.p12 b/certificate/ios/生产证书.p12 index 15d52c25..7145e3da 100644 Binary files a/certificate/ios/生产证书.p12 and b/certificate/ios/生产证书.p12 differ diff --git a/certificate/ios/生产证书.p12.zip b/certificate/ios/老证书/生产证书.p12.zip old mode 100755 new mode 100644 similarity index 100% rename from certificate/ios/生产证书.p12.zip rename to certificate/ios/老证书/生产证书.p12.zip diff --git a/certificate/ios/证书.p12 b/certificate/ios/老证书/证书.p12 similarity index 100% rename from certificate/ios/证书.p12 rename to certificate/ios/老证书/证书.p12 diff --git a/src/common/common.js b/src/common/common.js index 9640ffe0..665d1ade 100644 --- a/src/common/common.js +++ b/src/common/common.js @@ -1,5 +1,6 @@ +// #ifdef APP-PLUS import showDialog from '@/common/dialogMessage' - +// #endif function msg(title, duration = 1000) { uni.showToast({ title: title, @@ -10,40 +11,49 @@ function msg(title, duration = 1000) { } function show(title, msg, showCancel = true, cancelText = '取消', confirmText = '确定') { - return new Promise((resolve, reject) => { - // 创建通用参数对象 - const dialogOptions = { - title, - content: msg, - showCancel, - cancelText, - confirmText, - success: (res) => { - // 统一处理成功回调,解析为布尔值 - console.log('res.confirm', res.confirm); - resolve(!!res.confirm); - } - }; - - if (getPhoneEnvBool('AND')) { - // 安卓环境使用showDialog,补充cancel回调 - showDialog({ - ...dialogOptions, - cancel: () => { - console.log('用户点击取消'); - resolve(false); // 取消时也返回Promise结果 - } - }); - } else { - // 其他环境使用uni.showModal,补充fail回调 - uni.showModal({ - ...dialogOptions, - fail: (res) => { - reject(res); - } - }); - } - }); + return new Promise((resolve, reject) => { + // 创建通用参数对象 + const dialogOptions = { + title, + content: msg, + showCancel, + cancelText, + confirmText, + success: (res) => { + // 统一处理成功回调,解析为布尔值 + console.log('res.confirm', res.confirm); + resolve(!!res.confirm); + } + }; + // #ifdef APP-PLUS + if (getPhoneEnvBool('AND')) { + // 安卓环境使用showDialog,补充cancel回调 + showDialog({ + ...dialogOptions, + cancel: () => { + console.log('用户点击取消'); + resolve(false); // 取消时也返回Promise结果 + } + }); + } else { + // 其他环境使用uni.showModal,补充fail回调 + uni.showModal({ + ...dialogOptions, + fail: (res) => { + reject(res); + } + }); + } + // #endif + // #ifdef H5 + uni.showModal({ + ...dialogOptions, + fail: (res) => { + reject(res); + } + }); + // #endif + }); } const loading = (title = '加载中', mask = true) => uni.showLoading({ @@ -140,18 +150,20 @@ export const getUserInfo = (key = '') => { * @returns {boolean} 如果当前平台匹配指定标识返回true,否则返回false */ export const getPhoneEnvBool = (flag) => { - // 获取当前设备的平台信息 - - const { platform } = uni.getSystemInfoSync(); - - // 平台与标识的映射关系 - const platformMap = { - ios: 'IOS', - android: 'AND', - }; + // 获取当前设备的平台信息 - // 根据当前平台返回匹配结果 - return platformMap[platform] === flag; + const { + platform + } = uni.getSystemInfoSync(); + + // 平台与标识的映射关系 + const platformMap = { + ios: 'IOS', + android: 'AND', + }; + + // 根据当前平台返回匹配结果 + return platformMap[platform] === flag; }; diff --git a/src/common/dialogMessage.js b/src/common/dialogMessage.js index d215f8c4..b2451f01 100644 --- a/src/common/dialogMessage.js +++ b/src/common/dialogMessage.js @@ -1,4 +1,5 @@ export default function showDialog(options) { + const view = new plus.nativeObj.View('customModal', { top: '0', left: '0', @@ -7,7 +8,7 @@ export default function showDialog(options) { backgroundColor: 'rgba(0,0,0,0.1)', position: 'fixed' }); - + const screenWidth = plus.screen.resolutionWidth; const screenHeight = plus.screen.resolutionHeight; const borderRadius = 10; @@ -212,7 +213,7 @@ export default function showDialog(options) { } } }, false); - + view.show(); return { @@ -220,4 +221,5 @@ export default function showDialog(options) { view.close(); } }; + } \ No newline at end of file diff --git a/src/pages/courseDetail/components/comment.vue b/src/pages/courseDetail/components/comment.vue index afd12197..dde2ad79 100644 --- a/src/pages/courseDetail/components/comment.vue +++ b/src/pages/courseDetail/components/comment.vue @@ -134,9 +134,17 @@ reply_data.parentBbsId = parentBbsId reply_data.bbsId = item.bbsId reply_data.index = index + const systemInfo = uni.getSystemInfoSync(); + // 安全区域底部到屏幕底部的高度(即底部安全区域高度) + const safeAreaBottomHeight = systemInfo.screenHeight - systemInfo.safeArea.bottom; nextTick(() => { uni.onKeyboardHeightChange(res => { - popup_input_bottom.value = `${res.height}px`; + let keyboardHeight = res.height; + // 仅在iOS端补偿安全区域高度 + if (systemInfo.platform === 'ios') { + keyboardHeight = Math.max(0, keyboardHeight - safeAreaBottomHeight); // 避免负数 + } + popup_input_bottom.value = `${keyboardHeight}px`; console.log(res); }); }) @@ -167,10 +175,18 @@ } } - const getData = () => { - if (status.value !== 'loadmore' && status.value !== '') return - status.value = 'loading' - page.value++ + const getData = (from = '') => { + if (from == 'submit') { + status.value = '' + total.value = -1 + page.value = 1 + message_list.length = 0 + } else { + if (status.value !== 'loadmore' && status.value !== '') return + status.value = 'loading' + page.value++ + } + queryTraCrsBbsInfoByCrsId({ crsId: props.crsId, page: page.value, @@ -222,7 +238,7 @@