From 37574356d84e5cbd0122d100a9469b16e17857d9 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 13 Sep 2023 17:45:18 +0800 Subject: [PATCH] =?UTF-8?q?=E8=85=BE=E8=AE=AF=E5=AE=9A=E4=BD=8D=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E9=85=8D=E7=BD=AE=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../uni-getLocation-tencent/changelog.md | 2 + .../uni-getLocation-tencent/package.json | 72 ++++++++++--------- .../utssdk/app-android/config.json | 2 +- .../utssdk/app-android/index.uts | 2 +- .../utssdk/app-ios/config.json | 3 + 5 files changed, 46 insertions(+), 35 deletions(-) create mode 100644 uni_modules/uni-getLocation-tencent/utssdk/app-ios/config.json diff --git a/uni_modules/uni-getLocation-tencent/changelog.md b/uni_modules/uni-getLocation-tencent/changelog.md index e69de29..d9e3cc5 100644 --- a/uni_modules/uni-getLocation-tencent/changelog.md +++ b/uni_modules/uni-getLocation-tencent/changelog.md @@ -0,0 +1,2 @@ +## 1.0.0(2023-09-11) +基于腾讯定位服务,实现uni.getLocation 获取定位功能 diff --git a/uni_modules/uni-getLocation-tencent/package.json b/uni_modules/uni-getLocation-tencent/package.json index 93bd425..d6b0395 100644 --- a/uni_modules/uni-getLocation-tencent/package.json +++ b/uni_modules/uni-getLocation-tencent/package.json @@ -2,13 +2,13 @@ "id": "uni-getLocation-tencent", "displayName": "uni-getLocation-tencent", "version": "1.0.0", - "description": "uni-getLocation-tencent", + "description": "基于腾讯定位服务,实现uni.getLocation 获取定位功能", "keywords": [ - "uni-getLocation-tencent" - ], + "uni-getLocation-tencent" + ], "repository": "", "engines": { - "HBuilderX": "^3.6.11" + "HBuilderX": "^3.8.12" }, "dcloudext": { "type": "uts", @@ -24,59 +24,65 @@ "qq": "" }, "declaration": { - "ads": "", - "data": "", - "permissions": "" + "ads": "无", + "data": "插件使用的 腾讯定位SDK会采集数据,详情可参考:https://lbs.qq.com/", + "permissions": "\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n" }, "npmurl": "" }, "uni_modules": { "uni-ext-api": { - "uni": ["getLocation"] + "uni": [ + "getLocation" + ] }, "dependencies": [], "encrypt": [], "platforms": { "cloud": { - "tcb": "u", - "aliyun": "u" + "tcb": "y", + "aliyun": "y" }, "client": { "Vue": { - "vue2": "n", + "vue2": "y", "vue3": "y" }, "App": { - "app-android": "u", - "app-ios": "u" + "app-android": { + "minVersion": "19" + }, + "app-ios": { + "minVersion": "9" + } }, "H5-mobile": { - "Safari": "u", - "Android Browser": "u", - "微信浏览器(Android)": "u", - "QQ浏览器(Android)": "u" + "Safari": "n", + "Android Browser": "n", + "微信浏览器(Android)": "n", + "QQ浏览器(Android)": "n" }, "H5-pc": { - "Chrome": "u", - "IE": "u", - "Edge": "u", - "Firefox": "u", - "Safari": "u" + "Chrome": "n", + "IE": "n", + "Edge": "n", + "Firefox": "n", + "Safari": "n" }, "小程序": { - "微信": "u", - "阿里": "u", - "百度": "u", - "字节跳动": "u", - "QQ": "u", - "钉钉": "u", - "快手": "u", - "飞书": "u", - "京东": "u" + "微信": "n", + "阿里": "n", + "百度": "n", + "字节跳动": "n", + "QQ": "n", + "钉钉": "n", + "快手": "n", + "飞书": "n", + "京东": "n" }, "快应用": { - "华为": "u", - "联盟": "u" + "华为": "n", + "联盟": "n" } } } diff --git a/uni_modules/uni-getLocation-tencent/utssdk/app-android/config.json b/uni_modules/uni-getLocation-tencent/utssdk/app-android/config.json index 440faa8..f7f9ab6 100644 --- a/uni_modules/uni-getLocation-tencent/utssdk/app-android/config.json +++ b/uni_modules/uni-getLocation-tencent/utssdk/app-android/config.json @@ -2,6 +2,6 @@ "dependencies": [ "com.tencent.map.geolocation:TencentLocationSdk-openplatform:7.3.0" ], - "minSdkVersion": 21 + "minSdkVersion": "19" } diff --git a/uni_modules/uni-getLocation-tencent/utssdk/app-android/index.uts b/uni_modules/uni-getLocation-tencent/utssdk/app-android/index.uts index 4ad38af..df26477 100644 --- a/uni_modules/uni-getLocation-tencent/utssdk/app-android/index.uts +++ b/uni_modules/uni-getLocation-tencent/utssdk/app-android/index.uts @@ -37,7 +37,7 @@ export const getLocation : GetLocation = function (options : GetLocationOptions) /** * 准备权限 */ - let permissionNeed : string[] = utsArrayOf("android.permission.ACCESS_FINE_LOCATION"); + let permissionNeed = ["android.permission.ACCESS_FINE_LOCATION"]; UTSAndroid.requestSystemPermission(UTSAndroid.getUniActivity()!, permissionNeed, function (allRight:boolean,_grantedList:string[]) { if (allRight) { // 交给目前的location 引擎,真实执行 diff --git a/uni_modules/uni-getLocation-tencent/utssdk/app-ios/config.json b/uni_modules/uni-getLocation-tencent/utssdk/app-ios/config.json new file mode 100644 index 0000000..721b81e --- /dev/null +++ b/uni_modules/uni-getLocation-tencent/utssdk/app-ios/config.json @@ -0,0 +1,3 @@ +{ + "deploymentTarget": "9" +} \ No newline at end of file -- GitLab