罗广辉
2025-10-20 f2251d2f5c47fbe00a819f02f8d8c7ed70e60aaf
src/subPackages/taskDetail/addTask/index.vue
@@ -1,18 +1,30 @@
<!--
 * @Author       : yuan
 * @Date         : 2025-09-29 13:50:59
 * @LastEditors  : yuan
 * @LastEditTime : 2025-09-29 13:59:49
 * @FilePath     : \src\subPackages\taskDetail\addTask\index.vue
 * @Description  :
 * Copyright 2025 OBKoro1, All Rights Reserved.
 * 2025-09-29 13:50:59
-->
<!-- 新建任务 -->
<template>
  <view> 基础 </view>
  <WebViewPlus v-if="isApp" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup></script>
<script setup>
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
import {onHide, onShow} from "@dcloudio/uni-app";
const viewUrl = ref(getWebViewUrl('/addTask'))
function onPostMessage(data) {
  if (data.type === 'submitSuccess'){
    uni.switchTab({
      url: '/pages/inspectionTask/index'
    });
  }
}
const isApp = ref(false)
onShow(() => {
  isApp.value = true
});
onHide(() => {
  isApp.value = false
});
</script>
<style lang="scss" scoped></style>