Commit a3580570 by 李嘉林

改定位接口

parent 36d91f1d
......@@ -6,5 +6,5 @@
"mixid":"xyyx",
"shopid":133
},
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ,"chooseAddress" ]
"requiredPrivateInfos" : [ "chooseLocation", "getFuzzyLocation" ,"chooseAddress" ]
}
\ No newline at end of file
......@@ -36,10 +36,10 @@
"navigationBarTextStyle": "black"
},
"permission": {
"scope.userLocation": {
"scope.userFuzzyLocation": {
"desc": "你的位置信息将用于获取附近的门店"
}
},
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ,"chooseAddress" ],
"requiredPrivateInfos" : [ "chooseLocation", "getFuzzyLocation" ,"chooseAddress" ],
"__usePrivacyCheck__": true
}
......@@ -69,7 +69,7 @@ export default {
},
getLocationHandle(callback) {
let _this = this;
wx.getLocation({
wx.getFuzzyLocation({
type: "gcj02", // gcj02 wgs84
isHighAccuracy: true,
success: res => {
......
......@@ -155,7 +155,7 @@
this.locationStatus = true;
return
}
wx.getLocation({
wx.getFuzzyLocation({
type: 'wgs84',
success:function(res){
const latitude = res.latitude
......@@ -216,7 +216,7 @@
})
}else{
wx.getLocation({
wx.getFuzzyLocation({
type: 'wgs84',
success:function(res){
const latitude = res.latitude
......
......@@ -9,7 +9,7 @@ export function wx_decode(appId, sessionKey, encryptedData, iv) {
// 定位方法
export function getUserLocation() {
return new Promise((resolve,reject)=>{
wx.getLocation({
wx.getFuzzyLocation({
type: 'gcj02', // type有两中类型,gcj02 是腾讯地图所能解析的
success: res => {
resolve(res)
......
......@@ -81,7 +81,7 @@ Component({
if(this.data.changeLocation == 1){
return
}
wx.getLocation({
wx.getFuzzyLocation({
type: 'wgs84',
success(res) {
console.log('组件1111', _this.data.designateAreaObj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment