| | |
| | | <template> |
| | | <view > |
| | | <WebViewPlus @webMessage="onPostMessage" ref="sWebViewRef" :src="`${viewUrl}`" /> |
| | | |
| | | </view> |
| | | |
| | | <template> |
| | | <view> |
| | | <WebViewPlus |
| | | @webMessage="onPostMessage" |
| | | ref="sWebViewRef" |
| | | :src="`${viewUrl}`" |
| | | /> |
| | | </view> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import {getWebViewUrl} from "@/utils/index.js"; |
| | | import { getWebViewUrl } from "@/utils/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | const sWebViewRef = ref(null); |
| | | const viewUrl = getWebViewUrl('/addWork') |
| | | const viewUrl = getWebViewUrl("/addWork"); |
| | | |
| | | function onPostMessage(data) { |
| | | if (data.type === 'submitSuccess'){ |
| | | uni.switchTab({ |
| | | url: '/pages/work/index' |
| | | if (data.type === "submitSuccess") { |
| | | // #ifdef MP-WEIXIN |
| | | if ("fun" in data && data.fun === "add") { |
| | | uni.setStorageSync("joinParams", { |
| | | type: "add", |
| | | }); |
| | | } |
| | | // #endif |
| | | |
| | | // #ifndef MP-WEIXIN |
| | | uni.setStorageSync("joinParams", { |
| | | type: "add", |
| | | }); |
| | | uni.switchTab({ |
| | | url: `/pages/work/index?addLog=111`, |
| | | }); |
| | | // #endif |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |
| | | <style scoped lang="scss"></style> |