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 @@