From 6e3e88ec3221bc5869eb304d970dcf683f577873 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Fri, 27 Feb 2026 11:36:02 +0800
Subject: [PATCH] feat:工单获取数据

---
 applications/mobile-web-view/env/.env.development                   |    2 ++
 applications/mobile-web-view/src/api/work/index.js                  |   12 ++++++++++++
 applications/mobile-web-view/vite.config.mjs                        |    7 +++++++
 applications/mobile-web-view/src/appPages/work/workDetail/index.vue |   12 ++++++++++--
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/applications/mobile-web-view/env/.env.development b/applications/mobile-web-view/env/.env.development
index 2757c5e..a4ec947 100644
--- a/applications/mobile-web-view/env/.env.development
+++ b/applications/mobile-web-view/env/.env.development
@@ -10,6 +10,8 @@
 #开发环境代理地址(推荐本地新建文件 .env.development.local 来进行覆盖)
 VITE_APP_XT_URL = http://218.202.104.82:8200
 
+#工单详情(分享链接)
+VITE_APP_XT_URL_GD = http://192.168.1.204
 # ws地址
 VITE_APP_WS_API_URL = wss://wrj.shuixiongit.com/drone-wss/api/v1/ws
 
diff --git a/applications/mobile-web-view/src/api/work/index.js b/applications/mobile-web-view/src/api/work/index.js
new file mode 100644
index 0000000..75713f0
--- /dev/null
+++ b/applications/mobile-web-view/src/api/work/index.js
@@ -0,0 +1,12 @@
+import request from '@/axios'
+/**
+ * @description: 获取分享地址数据
+ */
+
+export const getSharingDetailsApi = (params) => {
+	return request({
+		url: '/drone-gd/workOrder/gdPatrolTask/get-share-cache-data',
+		method: 'get',
+		params,
+	})
+}
\ No newline at end of file
diff --git a/applications/mobile-web-view/src/appPages/work/workDetail/index.vue b/applications/mobile-web-view/src/appPages/work/workDetail/index.vue
index 4e19622..33c6486 100644
--- a/applications/mobile-web-view/src/appPages/work/workDetail/index.vue
+++ b/applications/mobile-web-view/src/appPages/work/workDetail/index.vue
@@ -55,10 +55,11 @@
 </template>
 
 <script setup>
+import {getSharingDetailsApi} from '@/api/work/index'
 import { showToast, showNotify, showImagePreview } from 'vant'
 import { getShowImg, getSmallImg } from '@/utils/util'
 import { useRoute,useRouter } from 'vue-router'
-
+const keyword = ref('')
 const route = useRoute()
 const router = useRouter()
 
@@ -93,7 +94,14 @@
 }
 
 onMounted(async () => {
-workDetailData.value = JSON.parse(route.query.workDetailData)
+	keyword.value = JSON.parse(route.query.workDetailData)
+	try {
+		const res = await getSharingDetailsApi({ cacheKey: keyword.value })
+		workDetailData.value = res.data.data
+	} catch (error) {
+		showToast('分享链接失效')
+	}
+
 })
 </script>
 <style lang="scss" scoped>
diff --git a/applications/mobile-web-view/vite.config.mjs b/applications/mobile-web-view/vite.config.mjs
index 35b904e..e40262f 100644
--- a/applications/mobile-web-view/vite.config.mjs
+++ b/applications/mobile-web-view/vite.config.mjs
@@ -21,6 +21,7 @@
     VITE_APP_BASE,
     VITE_APP_API_URL,
     VITE_APP_XT_URL,
+    VITE_APP_XT_URL_GD,
     VITE_APP_RECTANGLE,
     VITE_APP_ARCGIS_URL,
     VITE_APP_MAP_TILE_URL,
@@ -119,6 +120,12 @@
           rewrite: path => path.replace(/^\/webservice/, '/webservice'),
         },
 
+        '/drone-gd': {
+          target: VITE_APP_XT_URL_GD,
+          changeOrigin: true,
+          rewrite: path => path.replace(/^\/drone-gd/, '/drone-gd'),
+        },
+
         '/api': {
           target: VITE_APP_API_URL,
           changeOrigin: true,

--
Gitblit v1.9.3