| | |
| | | <!-- |
| | | * @Author : yuan |
| | | * @Date : 2025-10-14 17:43:52 |
| | | * @LastEditors : yuan |
| | | * @LastEditTime : 2025-12-19 15:33:48 |
| | | * @FilePath : \src\subPackages\qrCode\index.vue |
| | | * @Description : |
| | | * Copyright 2025 OBKoro1, All Rights Reserved. |
| | | * 2025-10-14 17:43:52 |
| | | --> |
| | | <template> |
| | | <view class="page-wrap"> |
| | | <WebViewPlus :src="`${viewUrl}`" @webMessage="onPostMessage" /> |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { |
| | | getWebViewUrl |
| | | } from "@/utils/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | import { getWebViewUrl } from "@/utils/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | |
| | | const viewUrl = getWebViewUrl("/QrCodeScanner"); |
| | | const viewUrl = getWebViewUrl("/QrCodeScanner"); |
| | | |
| | | const onPostMessage = (data) => { |
| | | if (data.type === 'browser') { |
| | | uni.navigateTo({ |
| | | url: '/subPackages/browser/index?url=' + encodeURIComponent(data.data.url) |
| | | }); |
| | | } |
| | | }; |
| | | const onPostMessage = (data) => { |
| | | if (data.type === "browser") { |
| | | // #ifdef MP-WEIXIN |
| | | |
| | | onLoad(() => {}); |
| | | // #endif |
| | | |
| | | // #ifndef MP-WEIXIN |
| | | uni.navigateTo({ |
| | | url: |
| | | "/subPackages/browser/index?url=" + encodeURIComponent(data.data.url), |
| | | }); |
| | | // #endif |
| | | } |
| | | }; |
| | | |
| | | onLoad(() => {}); |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .page-wrap { |
| | | font-size: 20px; |
| | | } |
| | | .page-wrap { |
| | | font-size: 20px; |
| | | } |
| | | </style> |