From 13938e14cd456936f07ca8aeb8f1268a0471f3cc Mon Sep 17 00:00:00 2001
From: aiShuiJiaoDeXioShou <2832294398@qq.com>
Date: Mon, 2 Sep 2024 19:55:55 +0800
Subject: [PATCH] =?UTF-8?q?map=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
acdr-ui/env/.env | 4 +-
acdr-ui/manifest.config.ts | 7 +-
acdr-ui/src/components/Map.vue | 144 ++++++++----------
acdr-ui/src/manifest.json | 8 +-
acdr-ui/src/pages/map/index.vue | 6 +-
acdr-ui/src/pages/my/index.vue | 132 +++++++---------
acdr-ui/src/service/mapService.js | 60 ++++++++
acdr/pom.xml | 4 +
.../controller/ServiceAddressController.java | 66 ++++++++
.../service/ServiceAddressService.java | 35 +++++
.../controller/CommunityController.java | 37 +++++
.../master/community/entity/Favorites.java | 58 ++++---
.../user/controller/UserController.java | 6 +-
acdr/src/main/resources/application-devp.yml | 2 +
.../src/test/java/com/yskj/acdr/AcdrTest.java | 9 ++
15 files changed, 391 insertions(+), 187 deletions(-)
create mode 100644 acdr-ui/src/service/mapService.js
create mode 100644 acdr/src/main/java/com/yskj/acdr/master/address/controller/ServiceAddressController.java
create mode 100644 acdr/src/main/java/com/yskj/acdr/master/address/service/ServiceAddressService.java
diff --git a/acdr-ui/env/.env b/acdr-ui/env/.env
index 762ad65e..1295350c 100644
--- a/acdr-ui/env/.env
+++ b/acdr-ui/env/.env
@@ -7,8 +7,8 @@ VITE_WX_APPID = 'wxf2c6d4b7361366b4'
# h5部署网站的base,配置到 manifest.config.ts 里的 h5.router.base
VITE_APP_PUBLIC_BASE=/acdr/
-VITE_SERVER_BASEURL = 'http://127.0.0.1:28184/api'
-VITE_UPLOAD_BASEURL = 'http://127.0.0.1:28184'
+VITE_SERVER_BASEURL = 'http://47.99.70.12:28184/api'
+VITE_UPLOAD_BASEURL = 'http://47.99.70.12:28184'
VITE_OSS_BASEURL = 'http://116.204.119.171:9000/linghe'
# h5是否需要配置代理
diff --git a/acdr-ui/manifest.config.ts b/acdr-ui/manifest.config.ts
index 33a643ea..a33502e7 100644
--- a/acdr-ui/manifest.config.ts
+++ b/acdr-ui/manifest.config.ts
@@ -123,7 +123,12 @@ export default defineManifestConfig({
setting: {
urlCheck: false,
},
- requiredPrivateInfos: ["getLocation"],
+ requiredPrivateInfos: ["getLocation","chooseLocation"],
+ permission: {
+ "scope.userLocation": {
+ "desc": "你的位置信息将用于定位效果展示"
+ }
+ },
usingComponents: true,
lazyCodeLoading: 'requiredComponents',
// __usePrivacyCheck__: true,
diff --git a/acdr-ui/src/components/Map.vue b/acdr-ui/src/components/Map.vue
index 0a380e1f..2c8adfbd 100644
--- a/acdr-ui/src/components/Map.vue
+++ b/acdr-ui/src/components/Map.vue
@@ -3,7 +3,7 @@
layout: "default",
style: {
navigationBarTitleText: "地图组件",
- // 隐藏该组件的头部;
+ // 隐藏该组件的头部
navigationStyle: "custom",
},
}
@@ -18,56 +18,41 @@
-
+
- 刷新当前位置
+ 刷新当前位置
- 返回定位位置
+ 返回定位位置
-
+
+
diff --git a/acdr-ui/src/manifest.json b/acdr-ui/src/manifest.json
index 57cd5820..d2340f5e 100644
--- a/acdr-ui/src/manifest.json
+++ b/acdr-ui/src/manifest.json
@@ -89,8 +89,14 @@
},
"usingComponents": true,
"requiredPrivateInfos": [
- "getLocation"
+ "getLocation",
+ "chooseLocation"
],
+ "permission": {
+ "scope.userLocation": {
+ "desc": "你的位置信息将用于定位效果展示"
+ }
+ },
"lazyCodeLoading": "requiredComponents"
},
"mp-alipay": {
diff --git a/acdr-ui/src/pages/map/index.vue b/acdr-ui/src/pages/map/index.vue
index 4c96af80..ba816722 100644
--- a/acdr-ui/src/pages/map/index.vue
+++ b/acdr-ui/src/pages/map/index.vue
@@ -17,4 +17,8 @@
import Map from '@/components/Map.vue';
-
+
diff --git a/acdr-ui/src/pages/my/index.vue b/acdr-ui/src/pages/my/index.vue
index 8f70fa16..afdc891c 100644
--- a/acdr-ui/src/pages/my/index.vue
+++ b/acdr-ui/src/pages/my/index.vue
@@ -10,24 +10,14 @@
-
+
-
+
{{ userInfo.nickname }}
爱猫猫,爱狗狗
@@ -42,27 +32,11 @@
-
+
-
-
+
+
{{ service.label }}
@@ -78,12 +52,7 @@
我的宠物
-
+
{{ pet.name }}
@@ -98,12 +67,7 @@
-
+
@@ -118,52 +82,74 @@