| src/pages/work/index.vue | ●●●●● patch | view | raw | blame | history | |
| src/subPackages/workDetail/photoMagnify/index.vue | ●●●●● patch | view | raw | blame | history |
src/pages/work/index.vue
@@ -1,7 +1,7 @@ <template> <view class="flex flex-col eventTickets"> <WebViewPlus v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/> </view> </template> @@ -12,16 +12,22 @@ const sWebViewRef = ref(null); const viewUrl = getWebViewUrl('/work', {}) function onPostMessage(data) { uni.navigateTo({ url: `/subPackages/workDetail/index?eventNum=${data.eventNum}` }); if(data.type==='workid'){ uni.navigateTo({ url: `/subPackages/workDetail/index?eventNum=${data.eventNum}` }); }else if(data.type === 'bigImage'){ uni.navigateTo({ url: `/subPackages/workDetail/photoMagnify/index?eventNum=${data.eventNum}` }); } } const isApp = ref(false) onShow(() => { isApp.value = true }); onHide(() => { isApp.value = false }); @@ -29,4 +35,4 @@ <style scoped lang="scss"> </style> </style> src/subPackages/workDetail/photoMagnify/index.vue
@@ -1,18 +1,26 @@ <!-- * @Author : yuan * @Date : 2025-09-29 13:56:16 * @LastEditors : yuan * @LastEditTime : 2025-09-29 13:56:25 * @FilePath : \src\subPackages\workDetail\photoMagnify\index.vue * @Description : * Copyright 2025 OBKoro1, All Rights Reserved. * 2025-09-29 13:56:16 --> <!-- 照片放大 --> <template> <view> 基础 </view> <view> <WebViewPlus v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/></view> </template> <script setup></script> <script setup> import {getWebViewUrl} from "@/utils/index.js"; import { onLoad } from '@dcloudio/uni-app'; const viewUrl = ref('') onLoad( (options) => { const eventNum= options.eventNum; viewUrl.value = getWebViewUrl('/photoMagnify', {eventNum:eventNum}) }); const isApp = ref(false) onShow(() => { isApp.value = true }); onHide(() => { isApp.value = false }); </script> <style lang="scss" scoped></style>