From 186103e8cf362b0711d823f8e4e6ec9ae49b5d39 Mon Sep 17 00:00:00 2001 From: minimaxagent1 Date: Wed, 13 Aug 2025 18:06:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E4=BD=8D=E7=BD=AE=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- manifest.json | 24 ++++++-- pages.json | 7 ++- pages/lease/lease.vue | 105 +++++++++++++++++++++++++++++++++-- utils/permission.js | 126 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 250 insertions(+), 12 deletions(-) create mode 100644 utils/permission.js diff --git a/manifest.json b/manifest.json index 0dab090..b592ed0 100644 --- a/manifest.json +++ b/manifest.json @@ -37,7 +37,9 @@ "", "", "", - "" + "", + "", + "" ] }, /* ios打包配置 */ @@ -54,16 +56,28 @@ "setting": { "urlCheck": false }, - "usingComponents": true + "usingComponents": true, + "requiredPrivateInfos": [ + "getLocation" + ] }, "mp-alipay": { - "usingComponents": true + "usingComponents": true, + "requiredPrivateInfos": [ + "getLocation" + ] }, "mp-baidu": { - "usingComponents": true + "usingComponents": true, + "requiredPrivateInfos": [ + "getLocation" + ] }, "mp-toutiao": { - "usingComponents": true + "usingComponents": true, + "requiredPrivateInfos": [ + "getLocation" + ] }, "uniStatistics": { "enable": false diff --git a/pages.json b/pages.json index efd90bf..e624db5 100644 --- a/pages.json +++ b/pages.json @@ -59,5 +59,10 @@ "navigationBarBackgroundColor": "#F8F8F8", "backgroundColor": "#F8F8F8" }, - "uniIdRouter": {} + "uniIdRouter": {}, + "mp-weixin": { + "requiredPrivateInfos": [ + "getLocation" + ] + } } diff --git a/pages/lease/lease.vue b/pages/lease/lease.vue index 6365344..91515be 100644 --- a/pages/lease/lease.vue +++ b/pages/lease/lease.vue @@ -55,8 +55,8 @@ - - + + 当前定位 @@ -66,6 +66,16 @@ + + + + 获取位置 + 点击获取当前位置 + + 需要定位权限 + + + @@ -122,6 +132,7 @@