| | |
| | | <!-- 新建工单 --> |
| | | <template> |
| | | <view> 基础 </view> |
| | | <view > |
| | | <WebViewPlus @webMessage="onPostMessage" v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" /> |
| | | |
| | | </view> |
| | | |
| | | </template> |
| | | |
| | | <script setup></script> |
| | | <script setup> |
| | | import {getWebViewUrl} from "@/utils/index.js"; |
| | | import WebViewPlus from "@/components/WebViewPlus.vue"; |
| | | const sWebViewRef = ref(null); |
| | | const viewUrl = getWebViewUrl('/addWork') |
| | | function onPostMessage(data) { |
| | | if (data.type === 'submitSuccess'){ |
| | | uni.switchTab({ |
| | | url: '/pages/work/index' |
| | | }); |
| | | } |
| | | } |
| | | const isApp = ref(false) |
| | | onShow(() => { |
| | | isApp.value = true |
| | | }); |
| | | |
| | | <style lang="scss" scoped></style> |
| | | onHide(() => { |
| | | isApp.value = false |
| | | }); |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | |
| | | </style> |