From 839acd1fe3dec49c00f89522aceda084987b2dfd Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Thu, 23 Oct 2025 08:44:02 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/subPackages/workDetail/mapWork/index.vue | 64 ++++++++++++++++++++-----------
1 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/src/subPackages/workDetail/mapWork/index.vue b/src/subPackages/workDetail/mapWork/index.vue
index 081eafa..c1ac111 100644
--- a/src/subPackages/workDetail/mapWork/index.vue
+++ b/src/subPackages/workDetail/mapWork/index.vue
@@ -1,32 +1,50 @@
+<!--
+ * @Author : yuan
+ * @Date : 2025-10-22 14:59:10
+ * @LastEditors : yuan
+ * @LastEditTime : 2025-10-22 19:41:27
+ * @FilePath : \src\subPackages\workDetail\mapWork\index.vue
+ * @Description :
+ * Copyright 2025 OBKoro1, All Rights Reserved.
+ * 2025-10-22 14:59:10
+-->
<!-- 地图展示 -->
<template>
- <WebViewPlus ref="sWebViewRef" :src="`${viewUrl}`" @webMessage="onPostMessage"/>
+ <WebViewPlus
+ ref="sWebViewRef"
+ :src="`${viewUrl}`"
+ @webMessage="onPostMessage"
+ />
</template>
<script setup>
- import {getWebViewUrl} from "@/utils/index.js";
- import { onLoad } from '@dcloudio/uni-app';
-
- const sWebViewRef = ref(null);
- const viewUrl = ref('')
+import { getWebViewUrl } from "@/utils/index.js";
+import { onLoad } from "@dcloudio/uni-app";
- onLoad( (options) => {
-
- const currentItem = options.currentItem
- viewUrl.value = getWebViewUrl('/mapWork', {currentItem:currentItem})
-
- });
- function onPostMessage(data) {
- if (data.type === 'workDetailback'){
-
- // uni.navigateTo({
- // url: '/subPackages/workDetail/index'
- // });
- uni.navigateBack({
- delta: 1,
- })
- }
- }
+const sWebViewRef = ref(null);
+const viewUrl = ref("");
+
+onLoad((options) => {
+ const currentItem = options.currentItem;
+ viewUrl.value = getWebViewUrl("/mapWork", { currentItem: currentItem });
+});
+function onPostMessage(data) {
+ if (data.type === "workDetailback") {
+ // uni.navigateTo({
+ // url: '/subPackages/workDetail/index'
+ // });
+ uni.navigateBack({
+ delta: 1,
+ });
+ }
+
+ if (data.type === "browser") {
+ uni.navigateTo({
+ url:
+ "/subPackages/browser/index?url=" + encodeURIComponent(data.data.url),
+ });
+ }
+}
</script>
<style lang="scss" scoped></style>
--
Gitblit v1.9.3