diff --git a/src/utils/appBridge.js b/src/utils/appBridge.js index f86a794..ef39ddb 100644 --- a/src/utils/appBridge.js +++ b/src/utils/appBridge.js @@ -10,13 +10,34 @@ import { // ==================== 工具函数 ==================== /** - * 检测是否为设备(Android、ios)系统 + * 检测是否为移动设备(Android、iOS)系统 * @returns {boolean} */ export function android() { return /Android|iPad|iPhone|iPod/.test(navigator.userAgent) } +/** + * 检测是否为 Android 设备 + * @returns {boolean} + */ +export function isAndroidDevice() { + if (typeof navigator === 'undefined') return false + return /Android/i.test(navigator.userAgent || '') +} + +/** + * 检测是否为 iOS 设备 + * @returns {boolean} + */ +export function isIosDevice() { + if (typeof navigator === 'undefined') return false + const userAgent = navigator.userAgent || '' + const isIosUserAgent = /iPad|iPhone|iPod/i.test(userAgent) + const isIPadOS = /Macintosh/i.test(userAgent) && navigator.maxTouchPoints > 1 + return isIosUserAgent || isIPadOS +} + /** * 检测是否在APP环境中 * @returns {boolean} @@ -289,6 +310,21 @@ export function gotoAppPage(pageName) { } } +/** + * 通知 APP 调用 VAP 播放 + */ +export function notifyAppPlayVap(sourceUrl) { + if (!sourceUrl) return + try { + const message = `play_vap:${sourceUrl}` + infoLog(message) + // 直接使用Flutter通道 + window.FlutterPageControl.postMessage(message) + } catch (error) { + errorLog('通知APP调用VAP失败:', error) + } +} + /** * 打开app组件 */ diff --git a/src/views/Activities/DailyRecharge/components/vapBg.vue b/src/views/Activities/DailyRecharge/components/vapBg.vue new file mode 100644 index 0000000..cf59275 --- /dev/null +++ b/src/views/Activities/DailyRecharge/components/vapBg.vue @@ -0,0 +1,119 @@ + + + + + diff --git a/src/views/Activities/DailyRecharge/index.vue b/src/views/Activities/DailyRecharge/index.vue index 1c1c7b3..e9aac11 100644 --- a/src/views/Activities/DailyRecharge/index.vue +++ b/src/views/Activities/DailyRecharge/index.vue @@ -15,12 +15,14 @@
- + + +
@@ -425,11 +426,7 @@ justify-content: flex-start; class="reward-extra-scroll-wrapper" :class="{ 'reward-extra-scroll-wrapper-rtl': isRtlLayout }" > -
+
{{ getRewardDisplayText(reward) }}
@@ -511,11 +508,16 @@ justify-content: flex-start; @@ -1144,9 +1253,14 @@ onBeforeUnmount(() => { top: 0; left: 0; z-index: 1; + object-fit: cover; pointer-events: none; } +.vap-background-vap-layer { + height: 150vw; +} + .page-background-layer { position: absolute; top: 120vw;