| | |
| | | <template> |
| | | <view class="eventTickets"> |
| | | <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage" /> |
| | | <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage" /> |
| | | |
| | | </view> |
| | | |
| | |
| | | } from "@/hooks/index.js"; |
| | | const sWebViewRef = ref(null); |
| | | // const viewUrl = getWebViewUrl('/work', {}) |
| | | const updateKey = ref(0) |
| | | const viewUrl = computed(() => { |
| | | return getWebViewUrl( '/work', { updateKey: updateKey.value }) |
| | | }) |
| | | function onPostMessage(data) { |
| | | const updateKey = ref(0) |
| | | const viewUrl = computed(() => { |
| | | return getWebViewUrl('/work', { |
| | | updateKey: updateKey.value |
| | | }) |
| | | }) |
| | | |
| | | function onPostMessage(data) { |
| | | if (data.type === 'jumpMapNav') { |
| | | uni.navigateTo({ |
| | | url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}` |
| | |
| | | |
| | | } else if (data.type === 'workid') { |
| | | uni.navigateTo({ |
| | | url: `/subPackages/workDetail/index?eventNum=${data.eventNum}` |
| | | url: `/subPackages/workDetail/index?eventNum=${data.eventNum}&totalNum=${data.totalNum}&keyword=${data.keyword}&aiType=${data.aiType}` |
| | | }); |
| | | } else if (data.type === 'bigImage') { |
| | | uni.navigateTo({ |
| | |
| | | } |
| | | const isApp = ref(false) |
| | | onShow(() => { |
| | | const joinParams = uni.getStorageSync('joinParams'); |
| | | if (joinParams) { |
| | | // 使用后清除 |
| | | console.log('是否打印', updateKey.value) |
| | | updateKey.value = updateKey.value + 1 |
| | | uni.removeStorageSync('joinParams'); |
| | | } |
| | | const joinParams = uni.getStorageSync('joinParams'); |
| | | if (joinParams) { |
| | | updateKey.value = updateKey.value + 1 |
| | | uni.removeStorageSync('joinParams'); |
| | | } |
| | | uni.setTabBarItem({ |
| | | index: 2, // Tab 的索引(从0开始) |
| | | // text: '新建工单', |
| | |
| | | height: 100%; |
| | | |
| | | } |
| | | </style> |
| | | </style> |