From 882f83c8d4a4aa3d5c947a7d5852a359eab2e5e4 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Mon, 20 Oct 2025 18:29:23 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/subPackages/taskDetail/execution/index.vue | 22 ++++++++++++++++++++--
src/subPackages/qrCode/index.vue | 8 +++++++-
src/pages/inspectionTask/index.vue | 4 ++--
3 files changed, 29 insertions(+), 5 deletions(-)
diff --git a/src/pages/inspectionTask/index.vue b/src/pages/inspectionTask/index.vue
index 8789b73..1b3791a 100644
--- a/src/pages/inspectionTask/index.vue
+++ b/src/pages/inspectionTask/index.vue
@@ -16,9 +16,9 @@
uni.navigateTo({
url: `/subPackages/inProgress/index?wayLineJodInfoId=${data.rowItem.id}`
});
- }else{
+ } else {
uni.navigateTo({
- url: '/subPackages/taskDetail/execution/index'
+ url: `/subPackages/taskDetail/execution/index?wayLineJodInfoId=${data.rowItem.id}`
});
}
}
diff --git a/src/subPackages/qrCode/index.vue b/src/subPackages/qrCode/index.vue
index 91d0434..ed7737f 100644
--- a/src/subPackages/qrCode/index.vue
+++ b/src/subPackages/qrCode/index.vue
@@ -12,7 +12,13 @@
const viewUrl = getWebViewUrl("/QrCodeScanner");
- const onPostMessage = (event) => {};
+ const onPostMessage = (data) => {
+ if (data.type === 'browser') {
+ uni.navigateTo({
+ url: '/subPackages/browser/index?url=' + encodeURIComponent(data.data.url)
+ });
+ }
+ };
onLoad(() => {});
</script>
diff --git a/src/subPackages/taskDetail/execution/index.vue b/src/subPackages/taskDetail/execution/index.vue
index 09234ef..bef53e1 100644
--- a/src/subPackages/taskDetail/execution/index.vue
+++ b/src/subPackages/taskDetail/execution/index.vue
@@ -1,6 +1,6 @@
<!-- 已执行 -->
<template>
- <WebViewPlus v-if="isApp" :src="`${viewUrl}`"/>
+ <WebViewPlus v-if="isApp" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
</template>
<script setup>
@@ -8,7 +8,9 @@
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,22 @@
// });
// }
// }
+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}`
+ });
+ }
+}
+
+onLoad((options) => {
+ wayLineJodInfoId.value = options.wayLineJodInfoId
+ viewUrl.value = getWebViewUrl('/execution', {wayLineJodInfoId: wayLineJodInfoId.value})
+})
const isApp = ref(false)
onShow(() => {
isApp.value = true
--
Gitblit v1.9.3