From b2af84cbd77c9e5b5cf26d74acc04179cedcea0f Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 13 Nov 2025 15:51:46 +0800
Subject: [PATCH] feat:新建工单刷新

---
 src/pages/work/index.vue |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/src/pages/work/index.vue b/src/pages/work/index.vue
index 43eb117..ec3d5a8 100644
--- a/src/pages/work/index.vue
+++ b/src/pages/work/index.vue
@@ -1,6 +1,6 @@
 <template>
-	<view class="flex flex-col eventTickets">
-		<WebViewPlus v-if="isApp" ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage" />
+	<view class="eventTickets">
+		<WebViewPlus  ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage" />
 
 	</view>
 
@@ -15,8 +15,11 @@
 		useTabAddButton
 	} from "@/hooks/index.js";
 	const sWebViewRef = ref(null);
-	const viewUrl = getWebViewUrl('/work', {})
-
+	// const viewUrl = getWebViewUrl('/work', {})
+const updateKey = ref(0)
+const viewUrl = computed(() => {
+  return getWebViewUrl(  '/work', { updateKey: updateKey.value })
+})
 	function onPostMessage(data) {
 
 		if (data.type === 'jumpMapNav') {
@@ -38,6 +41,13 @@
 	}
 	const isApp = ref(false)
 	onShow(() => {
+		  const joinParams = uni.getStorageSync('joinParams');
+		  if (joinParams) {
+		    // 使用后清除
+		    console.log('是否打印', updateKey.value)
+		    updateKey.value = updateKey.value + 1
+		    uni.removeStorageSync('joinParams');
+		  }
 		uni.setTabBarItem({
 			index: 2, // Tab 的索引(从0开始)
 			// text: '新建工单',
@@ -48,18 +58,19 @@
 			index: 3, // Tab
 			visible: false,
 		});
-		isApp.value = true
+		// isApp.value = true
 	});
 
 	onHide(() => {
-		isApp.value = false
+		// isApp.value = false
 	});
 </script>
 
 <style scoped lang="scss">
 	.eventTickets {
+
 		width: 100%;
 		height: 100%;
-		
+
 	}
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3