Browse Source

添加appId,在获取用户坐标失败问题修改

master
mk 7 months ago
parent
commit
b922fa4e54
  1. 5
      app.json
  2. 20
      project.config.json
  3. 11
      subpages/heart/pages/clockIn/clockIn.js

5
app.json

@ -107,5 +107,8 @@
"desc": "志愿者小程序将获取您的位置信息" "desc": "志愿者小程序将获取您的位置信息"
} }
}, },
"sitemapLocation": "sitemap.json" "sitemapLocation": "sitemap.json",
"requiredPrivateInfos": [
"getLocation"
]
} }

20
project.config.json

@ -1,9 +1,5 @@
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": {
"ignore": [],
"include": []
},
"setting": { "setting": {
"urlCheck": false, "urlCheck": false,
"es6": true, "es6": true,
@ -23,8 +19,6 @@
"uploadWithSourceMap": true, "uploadWithSourceMap": true,
"compileHotReLoad": false, "compileHotReLoad": false,
"useMultiFrameRuntime": true, "useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"babelSetting": { "babelSetting": {
"ignore": [], "ignore": [],
"disablePlugins": [], "disablePlugins": [],
@ -37,12 +31,10 @@
"userConfirmedBundleSwitch": false, "userConfirmedBundleSwitch": false,
"packNpmManually": false, "packNpmManually": false,
"packNpmRelationList": [], "packNpmRelationList": [],
"minifyWXSS": true "minifyWXSS": true,
"ignoreUploadUnusedFiles": true
}, },
"compileType": "miniprogram", "compileType": "miniprogram",
"libVersion": "3.2.2",
"appid": "wxc4fe0ea629aaa309",
"projectname": "e锦水-志愿者端",
"cloudfunctionTemplateRoot": "", "cloudfunctionTemplateRoot": "",
"simulatorType": "wechat", "simulatorType": "wechat",
"simulatorPluginLibVersion": {}, "simulatorPluginLibVersion": {},
@ -73,5 +65,11 @@
"editorSetting": { "editorSetting": {
"tabIndent": "auto", "tabIndent": "auto",
"tabSize": 4 "tabSize": 4
} },
"libVersion": "3.7.4",
"packOptions": {
"ignore": [],
"include": []
},
"appid": "wxc4fe0ea629aaa309"
} }

11
subpages/heart/pages/clockIn/clockIn.js

@ -114,6 +114,7 @@ Page({
latitude, latitude,
longitude longitude
}) { }) {
console.log(latitude,longitude,'逆地址解析经纬度');
var that = this; var that = this;
that.data.qqmapsdk.reverseGeocoder({ that.data.qqmapsdk.reverseGeocoder({
location: { location: {
@ -122,10 +123,18 @@ Page({
}, },
success: (res) => { success: (res) => {
wx.hideLoading(); wx.hideLoading();
if (res.message === "query ok") { if (res.message === "Success") {
that.setData({ that.setData({
operationAddress: res.result.address operationAddress: res.result.address
}) })
}else{
wx.showToast({
title: '定位信息有误,请检查权限',
icon:'none'
})
that.setData({
ldata: true
})
} }
} }
}) })

Loading…
Cancel
Save