From fafc88da5e3d312a2d5b50abf6d28d4c5f4830d1 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Wed, 17 Dec 2025 14:14:11 +0800
Subject: [PATCH] feat:更改跳转方式

---
 src/pages/map/index.vue |   20 +++++++++-----------
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/src/pages/map/index.vue b/src/pages/map/index.vue
index 994d5fa..fa17406 100644
--- a/src/pages/map/index.vue
+++ b/src/pages/map/index.vue
@@ -2,8 +2,8 @@
  * @Author       : yuan
  * @Date         : 2025-12-03 14:20:57
  * @LastEditors  : yuan
- * @LastEditTime : 2025-12-03 14:20:57
- * @FilePath     : \src\pages\map\index copy 2.vue
+ * @LastEditTime : 2025-12-16 17:23:02
+ * @FilePath     : \src\pages\map\index.vue
  * @Description  : 
  * Copyright 2025 OBKoro1, All Rights Reserved. 
  * 2025-12-03 14:20:57
@@ -17,7 +17,7 @@
 <script setup>
 import { getWebViewUrl } from "@/utils/index.js";
 import WebViewPlus from "@/components/WebViewPlus.vue";
-import { onHide } from "@dcloudio/uni-app";
+import { onHide, onShow } from "@dcloudio/uni-app";
 // const viewUrl = getWebViewUrl("/defaultMap");
 
 let envParam = "";
@@ -45,7 +45,7 @@
     //新建任务
     const encodedData = encodeURIComponent(JSON.stringify(data.rowItem));
     uni.setStorageSync("webview_params", encodedData);
-    uni.switchTab({
+    uni.navigateTo({
       url: `/subPackages/taskDetail/addTask/index`,
     });
   } else if (data.type === "jumpMapNav") {
@@ -62,14 +62,12 @@
 };
 
 onShow(() => {
+  uni.setStorageSync("lastTab", "map");
   uni.setTabBarItem({
-    index: 2, // Tab 的索引(从0开始)
-    visible: false,
-    pagePath: "subPackages/taskDetail/addTask/index",
-  });
-  uni.setTabBarItem({
-    index: 3, // Tab
-    visible: true,
+    index: 2,
+    text: "",
+    iconPath: "static/images/tabbar/drone.png",
+    selectedIconPath: "static/images/tabbar/drone.png",
   });
 });
 

--
Gitblit v1.9.3