1.修改定位获取失败问题

yj-dev
杨杰 2 years ago
parent c5c7d876da
commit 03dd170200
  1. 16
      App.vue
  2. 97
      manifest.json
  3. 7
      pages/tabBar/home/home.vue

@ -5,15 +5,15 @@
// brestUrl: 'http://192.168.3.4:9302/brest', // brestUrl: 'http://192.168.3.4:9302/brest',
// imgUrl: 'https://192.168.3.4:9301/filesystem/', // imgUrl: 'https://192.168.3.4:9301/filesystem/',
// //
url: 'https://hsg.dctpay.com/crest', // url: 'https://hsg.dctpay.com/crest',
imgUrl: 'https://hsg.dctpay.com/filesystem/', // imgUrl: 'https://hsg.dctpay.com/filesystem/',
brestUrl: 'https://hsg.dctpay.com/brest', // brestUrl: 'https://hsg.dctpay.com/brest',
imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/', // imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
// //
// url: 'https://hsgcs.dctpay.com/crest', url: 'https://hsgcs.dctpay.com/crest',
// brestUrl: 'https://hsgcs.dctpay.com/brest', brestUrl: 'https://hsgcs.dctpay.com/brest',
// imgUrl: 'https://hsgcs.dctpay.com/filesystem/', imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
// imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/', imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',
userInfo: "", userInfo: "",
brestUserInfo: '', brestUserInfo: '',
bresthighAgent: '', bresthighAgent: '',

@ -1,33 +1,33 @@
{ {
"name" : "嗨森逛", "name": "嗨森逛",
"appid" : "__UNI__E807B53", "appid": "__UNI__E807B53",
"description" : "", "description": "",
"versionName" : "1.2.1", "versionName": "1.2.1",
"versionCode" : "100", "versionCode": "100",
"transformPx" : false, "transformPx": false,
"app-plus" : { "app-plus": {
"usingComponents" : true, //``true`` `template` "usingComponents": true, //``true`` `template`
"softinput" : { "softinput": {
"navBar" : "none" // "navBar": "none" //
}, },
/* 5+App */ /* 5+App */
"splashscreen" : { "splashscreen": {
"alwaysShowBeforeRender" : true, "alwaysShowBeforeRender": true,
"waiting" : true, "waiting": true,
"autoclose" : true, "autoclose": true,
"delay" : 0 "delay": 0
}, },
"modules" : { "modules": {
"Share" : {}, "Share": {},
"OAuth" : {} "OAuth": {}
}, },
/* */ /* */
"distribute" : { "distribute": {
"orientation" : [ "portrait-primary" ], "orientation": ["portrait-primary"],
/* */ /* */
"android" : { "android": {
/* android */ /* android */
"permissions" : [ "permissions": [
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>", "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>", "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
"<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>", "<uses-permission android:name=\"android.permission.READ_CONTACTS\"/>",
@ -52,43 +52,46 @@
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
] ]
}, },
"ios" : {}, "ios": {},
/* ios */ /* ios */
"sdkConfigs" : {} "sdkConfigs": {}
} }
}, },
/* SDK */ /* SDK */
"quickapp" : {}, "quickapp": {},
/* */ /* */
"mp-weixin" : { "mp-weixin": {
"appid" : "wx8d49e2f83025229d", "appid": "wx8d49e2f83025229d",
"setting" : { "setting": {
"urlCheck" : true "urlCheck": true
}, },
"permission" : { "permission": {
"scope.userLocation" : { "scope.userLocation": {
"desc" : "你的位置信息将用于小程序定位" "desc": "你的位置信息将用于小程序定位"
}
} }
}, },
"h5" : { "requiredPrivateInfos": [
"sdkConfigs" : { "getLocation"
"maps" : { ]
"qqmap" : { },
"key" : "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB" "h5": {
"sdkConfigs": {
"maps": {
"qqmap": {
"key": "7UMBZ-HFEHX-HSD4Q-Z3QY6-OQKN7-2QBDB"
} }
} }
}, },
"title" : "嗨森逛", "title": "嗨森逛",
"router" : { "router": {
"mode" : "hash", "mode": "hash",
"base" : "/hsgH5" "base": "/hsgH5"
}, },
"devServer" : { "devServer": {
"port" : "", "port": "",
"https" : false "https": false
}, },
"domain" : "https://hsgcs.dctpay.com", "domain": "https://hsgcs.dctpay.com",
"template" : "index.html" "template": "index.html"
} }
} }

@ -460,12 +460,19 @@
that.findByLatAndLng(res.longitude, res.latitude); that.findByLatAndLng(res.longitude, res.latitude);
}, },
fail: (err) => { fail: (err) => {
uni.hideLoading();
if (err.errCode == 2) { if (err.errCode == 2) {
uni.showToast({ uni.showToast({
title: '请开启系统定位', title: '请开启系统定位',
duration: 3000, duration: 3000,
icon: 'none' icon: 'none'
}) })
}else{
uni.showToast({
title: '定位失败,请重新进入小程序',
duration: 3000,
icon: 'none'
})
} }
} }
}) })

Loading…
Cancel
Save