From 1fafffd842ee6ee1da3c45b35fd8af308d092850 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Thu, 26 Feb 2026 10:45:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
uniapps/work-app/src/utils/common/index.js | 8 ++++++--
uniapps/work-app/src/pages/map/index.vue | 37 -------------------------------------
uniapps/work-app/src/hooks/useGlobalWS.js | 2 ++
uniapps/work-app/src/subPackages/voiceCallDetail/index.vue | 1 -
uniapps/work-app/src/App.vue | 3 +--
5 files changed, 9 insertions(+), 42 deletions(-)
diff --git a/uniapps/work-app/src/App.vue b/uniapps/work-app/src/App.vue
index 2cfcd46..2397296 100644
--- a/uniapps/work-app/src/App.vue
+++ b/uniapps/work-app/src/App.vue
@@ -33,7 +33,6 @@
allowFloat()
// #endif
-
useGlobalWS()
onShow(async () => {
@@ -60,7 +59,7 @@
// #ifdef APP-PLUS
keepAliveStart()
// 请求用户允许忽略电池优化(重要:用于保活)
- setTimeout(requestIgnoreBatteryOptimization, 120000)
+ setTimeout(requestIgnoreBatteryOptimization, 10000)
// #endif
}
diff --git a/uniapps/work-app/src/hooks/useGlobalWS.js b/uniapps/work-app/src/hooks/useGlobalWS.js
index 8e04d18..3173f88 100644
--- a/uniapps/work-app/src/hooks/useGlobalWS.js
+++ b/uniapps/work-app/src/hooks/useGlobalWS.js
@@ -1,6 +1,7 @@
import { useUserStore } from "@/store/index.js";
import useAppStore from "../store/modules/app/index.js";
import websocketService from "@/utils/websocket.js";
+import { openDialog, allowFloat, getBatteryCapacity } from '@/uni_modules/lgh-dialog'
export function useGlobalWS() {
const userStore = useUserStore();
@@ -36,6 +37,7 @@
type: 'incoming'
};
+ openDialog()
// 转义参数以便在URL中传递
const encodedParams = encodeURIComponent(JSON.stringify(callParams));
diff --git a/uniapps/work-app/src/pages/map/index.vue b/uniapps/work-app/src/pages/map/index.vue
index 2ee54c8..45d5fb8 100644
--- a/uniapps/work-app/src/pages/map/index.vue
+++ b/uniapps/work-app/src/pages/map/index.vue
@@ -23,9 +23,6 @@
const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}';
const updateKey = ref(0);
-// const viewUrl = computed(() => {
-// return `https://192.168.1.157:5176/mobile-web-view/#/webViewWrapper/defaultMap?params=${encodeURIComponent(userParams)}&isWeb=${envParam}&updateKey=${updateKey.value}`;
-// });
const viewUrl = computed(() => {
return getWebViewUrl("/defaultMap", {
isWeb: envParam,
@@ -34,40 +31,6 @@
});
const onPostMessage = (data) => {
- // #ifdef MP-WEIXIN
- if (data.type === "scanCode") {
- } else if (data.type === "jumpAddWork") {
- } else if (data.type === "jumpMapNav") {
- //事件导航
- } else if (data.type === "workid") {
- //事件详情
- }
- // #endif
-
- // #ifndef MP-WEIXIN
- if (data.type === "scanCode") {
- uni.navigateTo({
- url: "/subPackages/qrCode/index",
- });
- } else if (data.type === "jumpAddWork") {
- //新建任务
- const encodedData = encodeURIComponent(JSON.stringify(data.rowItem));
- uni.setStorageSync("webview_params", encodedData);
- uni.navigateTo({
- url: `/subPackages/taskDetail/addTask/index`,
- });
- } else if (data.type === "jumpMapNav") {
- //事件导航
- uni.navigateTo({
- url: `/subPackages/workDetail/mapWork/index?currentItem=${data.eventNum}`,
- });
- } else if (data.type === "workid") {
- //事件详情
- uni.navigateTo({
- url: `/subPackages/workDetail/index?eventNum=${data.eventNum}`,
- });
- }
- // #endif
};
onShow(() => {
diff --git a/uniapps/work-app/src/subPackages/voiceCallDetail/index.vue b/uniapps/work-app/src/subPackages/voiceCallDetail/index.vue
index c1bdf41..a1a3606 100644
--- a/uniapps/work-app/src/subPackages/voiceCallDetail/index.vue
+++ b/uniapps/work-app/src/subPackages/voiceCallDetail/index.vue
@@ -74,7 +74,6 @@
const contact = options.contact ? JSON.parse(decodeURIComponent(options.contact)) : null;
// 构建viewUrl,将contact参数拼接到URL中
const contactParam = contact ? encodeURIComponent(JSON.stringify(contact)) : '';
- // viewUrl.value = `https://192.168.1.157:5176/mobile-web-view/#/webViewWrapper/voiceCallDetail?params=${encodeURIComponent(userParams)}&contact=${contactParam}`;
viewUrl.value = getWebViewUrl("/voiceCallDetail", { contact: options.contact ,voiceparams: options.voiceparams});
});
diff --git a/uniapps/work-app/src/utils/common/index.js b/uniapps/work-app/src/utils/common/index.js
index 605ed86..a7b4e6c 100644
--- a/uniapps/work-app/src/utils/common/index.js
+++ b/uniapps/work-app/src/utils/common/index.js
@@ -72,8 +72,12 @@
// 1. 处理用户参数
const userParams = userStore?.userInfo ? JSON.stringify(userStore.userInfo) : '{}'
// 2. 构建查询参数字符串
- let queryString = `params=${encodeURIComponent(userParams)}&topMargin=${statusBarHeight}&uniPlatform=${uniPlatform}`
-
+ let queryString = null
+ if(targetUrl === '/workDetail') {
+ queryString = `topMargin=${statusBarHeight}&uniPlatform=${uniPlatform}`
+ }else{
+ queryString = `params=${encodeURIComponent(userParams)}&topMargin=${statusBarHeight}&uniPlatform=${uniPlatform}`
+ }
// 3. 处理 otherParams 对象
if (otherParams && typeof otherParams === 'object') {
Object.keys(otherParams).forEach(key => {
--
Gitblit v1.9.3