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

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

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

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

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

Loading…
Cancel
Save