From 240e010745f58a6b2e04f558c72fe9c0c3106cc9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BE=AE=E5=BE=AE=E4=B8=80=E7=AC=91?= <709648985@qq.com>
Date: Sat, 2 Aug 2025 16:38:54 +0800
Subject: [PATCH] =?UTF-8?q?ios=E5=9C=B0=E5=9B=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.hbuilderx/launch.json | 2 +-
manifest.json | 9 +-
package-lock.json | 6 +
package.json | 1 +
pages/common/map/index.vue | 302 ++++++-----------------
static/native-res/raw/mapstyle_grey.json | 44 ++++
yarn.lock | 5 +
7 files changed, 136 insertions(+), 233 deletions(-)
create mode 100644 static/native-res/raw/mapstyle_grey.json
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
index e5a582a..e905fe3 100644
--- a/.hbuilderx/launch.json
+++ b/.hbuilderx/launch.json
@@ -2,7 +2,7 @@
"version" : "1.0",
"configurations" : [
{
- "playground" : "standard",
+ "playground" : "custom",
"type" : "uni-app:app-ios"
},
{
diff --git a/manifest.json b/manifest.json
index d4a5a53..145f9d9 100644
--- a/manifest.json
+++ b/manifest.json
@@ -3,7 +3,7 @@
"appid" : "__UNI__A21EF43",
"description" : "设备管控",
"versionName" : "1.0.0",
- "versionCode" : "100",
+ "versionCode" : 101,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
@@ -62,7 +62,9 @@
"appid" : "uni.app.UNIA21EF43",
"privacyDescription" : {
"NSBluetoothPeripheralUsageDescription" : "需要蓝牙访问权限,用于设备通信",
- "NSBluetoothAlwaysUsageDescription" : "需要蓝牙访问权限,用于设备通信"
+ "NSBluetoothAlwaysUsageDescription" : "需要蓝牙访问权限,用于设备通信",
+ "NSLocationWhenInUseUsageDescription" : "用于地图定位服务",
+ "NSLocationAlwaysAndWhenInUseUsageDescription" : "用于地图定位服务"
},
"dSYMs" : false
},
@@ -80,7 +82,8 @@
"amap" : {
"name" : "amapHG8nIFW5",
"appkey_ios" : "065c43f02c7b627a74ad7dd23b16bb4f",
- "appkey_android" : "d7d852dbda2b95f6f796fb9a711a9fee"
+ "appkey_android" : "d7d852dbda2b95f6f796fb9a711a9fee",
+ "style" : "enable"
}
},
"oauth" : {},
diff --git a/package-lock.json b/package-lock.json
index 6165a5b..0487a1b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,6 +5,7 @@
"packages": {
"": {
"dependencies": {
+ "@amap/amap-jsapi-loader": "^1.0.1",
"axios": "^1.9.0",
"cordova-sqlite-storage": "^7.0.0",
"iconv-lite": "^0.6.3",
@@ -13,6 +14,11 @@
"vk-uview-ui": "^1.5.2"
}
},
+ "node_modules/@amap/amap-jsapi-loader": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz",
+ "integrity": "sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw=="
+ },
"node_modules/asynckit": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
diff --git a/package.json b/package.json
index 0ded30f..2d22a88 100644
--- a/package.json
+++ b/package.json
@@ -1,5 +1,6 @@
{
"dependencies": {
+ "@amap/amap-jsapi-loader": "^1.0.1",
"axios": "^1.9.0",
"cordova-sqlite-storage": "^7.0.0",
"iconv-lite": "^0.6.3",
diff --git a/pages/common/map/index.vue b/pages/common/map/index.vue
index bf29939..cf0799e 100644
--- a/pages/common/map/index.vue
+++ b/pages/common/map/index.vue
@@ -1,12 +1,8 @@
-
-
-
-
-
- 地图加载中...
-
+
@@ -14,239 +10,87 @@
export default {
data() {
return {
- loading: true
- }
- },
- methods: {
- hideLoading() {
- this.loading = false
- }
- }
- }
-
-
-
\ No newline at end of file
+
diff --git a/static/native-res/raw/mapstyle_grey.json b/static/native-res/raw/mapstyle_grey.json
new file mode 100644
index 0000000..0f60976
--- /dev/null
+++ b/static/native-res/raw/mapstyle_grey.json
@@ -0,0 +1,44 @@
+[
+ {
+ "featureType": "water",
+ "elementType": "geometry",
+ "stylers": {
+ "color": "#ff0000"
+ }
+ },
+ {
+ "featureType": "land",
+ "elementType": "geometry",
+ "stylers": {
+ "color": "#000000"
+ }
+ },
+ {
+ "featureType": "road",
+ "elementType": "all",
+ "stylers": {
+ "color": "#555555"
+ }
+ },
+ {
+ "featureType": "building",
+ "elementType": "all",
+ "stylers": {
+ "color": "#222222"
+ }
+ },
+ {
+ "featureType": "all",
+ "elementType": "labels.text.fill",
+ "stylers": {
+ "color": "#ffffff"
+ }
+ },
+ {
+ "featureType": "all",
+ "elementType": "labels.text.stroke",
+ "stylers": {
+ "color": "#000000"
+ }
+ }
+]
\ No newline at end of file
diff --git a/yarn.lock b/yarn.lock
index e7090f5..cffe648 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,11 @@
# yarn lockfile v1
+"@amap/amap-jsapi-loader@^1.0.1":
+ version "1.0.1"
+ resolved "https://registry.npmjs.org/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz"
+ integrity sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw==
+
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"