From 246d776ad32c94280a3557c73cdbdbcc473fc4ad Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 23 Dec 2025 16:47:39 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/feature/v9.0/9.0.3' into feature/v9.0/9.0.3

---
 src/pages/map/index.vue                      |    2 
 src/pages.json                               |    3 
 src/subPackages/workDetail/index.vue         |   91 +++++++++++++---------
 src/subPackages/workDetail/addWork/index.vue |   72 +++++++++++------
 src/subPackages/taskDetail/addTask/index.vue |   24 +++++
 src/pages/work/index.vue                     |   19 ++++
 src/pages/inspectionTask/index.vue           |   18 ++++
 src/utils/common/index.js                    |    2 
 8 files changed, 162 insertions(+), 69 deletions(-)

diff --git a/src/pages.json b/src/pages.json
index ff2c1c6..9cd978c 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -65,7 +65,8 @@
         {
           "path": "taskDetail/addTask/index",
           "style": {
-            "navigationBarTitleText": "新建任务"
+            "navigationBarTitleText": "新建任务",
+            "navigationStyle": "custom"
           }
         },
         {
diff --git a/src/pages/inspectionTask/index.vue b/src/pages/inspectionTask/index.vue
index 7be966d..4aeeb55 100644
--- a/src/pages/inspectionTask/index.vue
+++ b/src/pages/inspectionTask/index.vue
@@ -19,10 +19,21 @@
 const updateKey = ref(0);
 const sxListKey = ref(0);
 const viewUrl = computed(() => {
+  // #ifdef MP-WEIXIN
   return getWebViewUrl("/inspectionTask", {
     updateKey: updateKey.value,
     sxListKey: sxListKey.value,
+    showAddBtn: 1,
   });
+  // #endif
+
+  // #ifndef MP-WEIXIN
+  return getWebViewUrl("/inspectionTask", {
+    updateKey: updateKey.value,
+    sxListKey: sxListKey.value,
+    showAddBtn: 0,
+  });
+  // #endif
 });
 
 watch(
@@ -49,8 +60,13 @@
     }
     // #endif
   }
+
+  if (data.type === "addTask") {
+    // #ifdef MP-WEIXIN
+    // #endif
+  }
 }
-const isApp = ref(false);
+
 onShow(() => {
   const joinParams = uni.getStorageSync("joinParams");
   if (joinParams) {
diff --git a/src/pages/map/index.vue b/src/pages/map/index.vue
index a24c644..b92167f 100644
--- a/src/pages/map/index.vue
+++ b/src/pages/map/index.vue
@@ -2,7 +2,7 @@
  * @Author       : yuan
  * @Date         : 2025-12-03 14:20:57
  * @LastEditors  : yuan
- * @LastEditTime : 2025-12-19 15:32:31
+ * @LastEditTime : 2025-12-20 16:49:02
  * @FilePath     : \src\pages\map\index.vue
  * @Description  :
  * Copyright 2025 OBKoro1, All Rights Reserved.
diff --git a/src/pages/work/index.vue b/src/pages/work/index.vue
index 942ecdd..a8e4a93 100644
--- a/src/pages/work/index.vue
+++ b/src/pages/work/index.vue
@@ -2,7 +2,7 @@
  * @Author       : yuan
  * @Date         : 2025-12-18 10:06:30
  * @LastEditors  : yuan
- * @LastEditTime : 2025-12-20 11:37:09
+ * @LastEditTime : 2025-12-20 14:18:42
  * @FilePath     : \src\pages\work\index.vue
  * @Description  : 
  * Copyright 2025 OBKoro1, All Rights Reserved. 
@@ -28,12 +28,28 @@
 // const viewUrl = getWebViewUrl('/work', {})
 const updateKey = ref(0);
 const viewUrl = computed(() => {
+  // #ifdef MP-WEIXIN
   return getWebViewUrl("/work", {
     updateKey: updateKey.value,
+    showAddBtn: 1,
   });
+  // #endif
+
+  // #ifndef MP-WEIXIN
+  return getWebViewUrl("/work", {
+    updateKey: updateKey.value,
+    showAddBtn: 0,
+  });
+  // #endif
 });
 
 function onPostMessage(data) {
+  // #ifdef MP-WEIXIN
+  if (data.type === "addWork") {
+  }
+  // #endif
+
+  // #ifndef MP-WEIXIN
   if (data.type === "jumpMapNav") {
     uni.navigateTo({
       url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
@@ -47,6 +63,7 @@
       url: `/subPackages/workDetail/photoMagnify/index?eventNum=${data.eventNum}`,
     });
   }
+  // #endif
 }
 const isApp = ref(false);
 onShow(() => {
diff --git a/src/subPackages/taskDetail/addTask/index.vue b/src/subPackages/taskDetail/addTask/index.vue
index 08cec2b..f175785 100644
--- a/src/subPackages/taskDetail/addTask/index.vue
+++ b/src/subPackages/taskDetail/addTask/index.vue
@@ -16,6 +16,11 @@
 function onPostMessage(data) {
   if (data.type === "submitSuccess") {
     // #ifdef MP-WEIXIN
+    if ("fun" in data && data.fun === "add") {
+      uni.setStorageSync("joinParams", {
+        type: "add",
+      });
+    }
     // #endif
 
     // #ifndef MP-WEIXIN
@@ -39,8 +44,24 @@
 //   const sns = options.device_sn
 //
 // });
-
 const isApp = ref(false);
+
+// #ifdef MP-WEIXIN
+onLoad((options) => {
+  isApp.value = true;
+  let params = {};
+  if ("data" in options) {
+    try {
+      params = JSON.parse(options.data);
+    } catch (e) {
+      console.error(e);
+    }
+  }
+  viewUrl.value = getWebViewUrl("/addTask", params);
+});
+// #endif
+
+// #ifndef MP-WEIXIN
 onShow(() => {
   isApp.value = true;
   let params = {};
@@ -54,6 +75,7 @@
   }
   viewUrl.value = getWebViewUrl("/addTask", params);
 });
+// #endif
 
 onHide(() => {
   isApp.value = false;
diff --git a/src/subPackages/workDetail/addWork/index.vue b/src/subPackages/workDetail/addWork/index.vue
index bdce9ca..6d9b4a0 100644
--- a/src/subPackages/workDetail/addWork/index.vue
+++ b/src/subPackages/workDetail/addWork/index.vue
@@ -1,34 +1,52 @@
+<!--
+ * @Author       : yuan
+ * @Date         : 2025-11-13 18:14:52
+ * @LastEditors  : yuan
+ * @LastEditTime : 2025-12-20 16:56:27
+ * @FilePath     : \src\subPackages\workDetail\addWork\index.vue
+ * @Description  : 
+ * Copyright 2025 OBKoro1, All Rights Reserved. 
+ * 2025-11-13 18:14:52
+-->
 <template>
-	<view>
-		<WebViewPlus @webMessage="onPostMessage" ref="sWebViewRef" :src="`${viewUrl}`" />
-
-	</view>
-
+  <view>
+    <WebViewPlus
+      @webMessage="onPostMessage"
+      ref="sWebViewRef"
+      :src="`${viewUrl}`"
+    />
+  </view>
 </template>
 
 <script setup>
-	import {
-		getWebViewUrl
-	} from "@/utils/index.js";
-	import WebViewPlus from "@/components/WebViewPlus.vue";
-	const sWebViewRef = ref(null);
-	const viewUrl = getWebViewUrl('/addWork')
+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.setStorageSync('joinParams', {
-				type: 'add'
-			});
-			// uni.switchTab({
-			//   url: '/pages/work/index'
-			// });
-			uni.switchTab({
-				url: `/pages/work/index?addLog=111`
-			});
-		}
-	}
+function onPostMessage(data) {
+  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'
+    // });
+    uni.switchTab({
+      url: `/pages/work/index?addLog=111`,
+    });
+    // #endif
+  }
+}
 </script>
 
-<style scoped lang="scss">
-
-</style>
\ No newline at end of file
+<style scoped lang="scss"></style>
diff --git a/src/subPackages/workDetail/index.vue b/src/subPackages/workDetail/index.vue
index 6fc8a4c..e4b497b 100644
--- a/src/subPackages/workDetail/index.vue
+++ b/src/subPackages/workDetail/index.vue
@@ -1,48 +1,67 @@
 <!-- 工单详情 - 包含待审核、待处理、处理中、已完成 -->
 <template>
-	<div class="workDetailContainer">
-		 <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
-	</div>
+  <div class="workDetailContainer">
+    <WebViewPlus
+      ref="sWebViewRef"
+      :src="`${viewUrl}`"
+      @webMessage="onPostMessage"
+    />
+  </div>
 </template>
 
 <script setup>
-		import {getWebViewUrl} from "@/utils/index.js";
-	import { onLoad } from '@dcloudio/uni-app';
-	import { useUserStore } from '@/store/index.js'
-	const userStore = useUserStore()
-	const userInfo = userStore.userInfo
-	const sWebViewRef = ref(null);
-	const viewUrl = ref('')
-	onLoad( (options) => {
-		const eventNum= options.eventNum;
-		viewUrl.value = getWebViewUrl('/workDetail', {eventNum:eventNum,totalNum:options.totalNum,keyword:options.keyword,aiType:options.aiType,wLJobInfoId:options.wLJobInfoId,status:options.status})
-	});
+import { getWebViewUrl } from "@/utils/index.js";
+import { onLoad } from "@dcloudio/uni-app";
+import { useUserStore } from "@/store/index.js";
+const userStore = useUserStore();
+const userInfo = userStore.userInfo;
+const sWebViewRef = ref(null);
+const viewUrl = ref("");
+onLoad((options) => {
+  const eventNum = options.eventNum;
+  viewUrl.value = getWebViewUrl("/workDetail", {
+    eventNum: eventNum,
+    totalNum: options.totalNum,
+    keyword: options.keyword,
+    aiType: options.aiType,
+    wLJobInfoId: options.wLJobInfoId,
+    status: options.status,
+  });
+});
 
-	function onPostMessage(data) {
+function onPostMessage(data) {
+  if (data.type === "workback") {
+    // #ifdef MP-WEIXIN
+    if ("fun" in data && data.fun === "add") {
+      uni.setStorageSync("joinParams", {
+        type: "add",
+      });
+    }
+    // #endif
 
-	  if (data.type === 'workback'){
-      uni.setStorageSync('joinParams', {
-				type: 'add'
-			});
-	    uni.switchTab({
-			url: `/pages/work/index?addLog=111`
-	      // url: '/pages/work/index'
-	    });
-	  }else if(data.type === 'jumpMapNav'){
-		   uni.navigateTo({
-		    url:`/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`
-		  });
-	  }
-	}
-
+    // #ifndef MP-WEIXIN
+    uni.setStorageSync("joinParams", {
+      type: "add",
+    });
+    uni.switchTab({
+      url: `/pages/work/index?addLog=111`,
+      // url: '/pages/work/index'
+    });
+    // #endif
+  } else if (data.type === "jumpMapNav") {
+    // #ifndef MP-WEIXIN
+    uni.navigateTo({
+      url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
+    });
+    // #endif
+  }
+}
 </script>
 
 <style lang="scss" scoped>
-	.workDetailContainer {
+.workDetailContainer {
   width: 100%;
-	height: 100%;
-	background-size: cover;
-
-
-	}
+  height: 100%;
+  background-size: cover;
+}
 </style>
diff --git a/src/utils/common/index.js b/src/utils/common/index.js
index 4de0465..a2bb1d8 100644
--- a/src/utils/common/index.js
+++ b/src/utils/common/index.js
@@ -42,7 +42,7 @@
 }
 export function getStatusBarHeight () {
   try {
-    const systemInfo = uni.getSystemInfoSync()
+    const systemInfo = uni.getWindowInfo()
 
     // #ifdef APP-PLUS
     return systemInfo.statusBarHeight || 0

--
Gitblit v1.9.3