From f5f42e3f785b334c24775d83c7c2be6fd2d9a38e Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 06 Nov 2025 13:50:06 +0800
Subject: [PATCH] feat:登录页调整
---
src/subPackages/taskDetail/execution/index.vue | 36 +++++++++++++++++++++++++++++++++---
1 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/src/subPackages/taskDetail/execution/index.vue b/src/subPackages/taskDetail/execution/index.vue
index 957529d..e31d002 100644
--- a/src/subPackages/taskDetail/execution/index.vue
+++ b/src/subPackages/taskDetail/execution/index.vue
@@ -1,14 +1,16 @@
<!-- 已执行 -->
<template>
- <WebViewPlus :src="`${viewUrl}`"/>
+ <WebViewPlus v-if="isApp" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
-import {onLoad} from "@dcloudio/uni-app";
+import {onHide, onLoad, onShow} from "@dcloudio/uni-app";
import WebViewPlus from "@/components/WebViewPlus.vue";
import {getWebViewUrl} from "@/utils/index.js";
-const viewUrl = ref(getWebViewUrl('/execution'))
+const wayLineJodInfoId = ref(null)
+const viewUrl = ref('')
+// const viewUrl = ref(getWebViewUrl('/execution'))
// function onPostMessage(data) {
// console.log(data, '9999')
@@ -19,6 +21,34 @@
// });
// }
// }
+function onPostMessage(data) {
+ if (data.type === 'back') {
+ uni.switchTab({
+ url: '/pages/inspectionTask/index'
+ });
+ } else if (data.type === 'control') {
+ uni.redirectTo({
+ url: `/pages/inspectionTask/execution/index?wayLineJodInfoId=${wayLineJodInfoId.value}`
+ });
+ } else if(data.type === 'workid') {
+ uni.navigateTo({
+ url: `/subPackages/workDetail/index?eventNum=${data.eventNum}`
+ });
+ }
+}
+
+onLoad((options) => {
+ wayLineJodInfoId.value = options.wayLineJodInfoId
+ viewUrl.value = getWebViewUrl('/execution', {wayLineJodInfoId: wayLineJodInfoId.value})
+})
+const isApp = ref(false)
+onShow(() => {
+ isApp.value = true
+});
+
+onHide(() => {
+ isApp.value = false
+});
</script>
<style lang="scss" scoped></style>
--
Gitblit v1.9.3