Commit e0f9e699 by 李嘉林

换定位接口

parent 193da193
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
"mixid":"xyyx", "mixid":"xyyx",
"shopid":133 "shopid":133
}, },
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ,"chooseAddress" ] "requiredPrivateInfos" : [ "chooseLocation", "getFuzzyLocation" ,"chooseAddress" ]
} }
\ No newline at end of file
...@@ -32,7 +32,8 @@ export default { ...@@ -32,7 +32,8 @@ export default {
// production: { "mixid":"RON", "shopid": 1503 }, // 荣恩 // production: { "mixid":"RON", "shopid": 1503 }, // 荣恩
// production: { "mixid":"ant", "shopid": 6 }, // 小工蚁 // production: { "mixid":"ant", "shopid": 6 }, // 小工蚁
// production: { "mixid":"MetaSense", "shopid": 1237 }, // 册为 // production: { "mixid":"MetaSense", "shopid": 1237 }, // 册为
production: { "mixid":"6V0o4p", "shopid": 1332 }, // lost in echo订货 // production: { "mixid":"5BkDRR", "shopid": 1316 }, // lost in echo订货
production: { "mixid":"LFX", "shopid": 1710 }, // 老凤祥
// production: { "mixid":"CYNZ", "shopid": 1609 }, // 晨语女装 // production: { "mixid":"CYNZ", "shopid": 1609 }, // 晨语女装
xhyx_uat: { "mixid":"xhyxshop", "shopid": 1 }, xhyx_uat: { "mixid":"xhyxshop", "shopid": 1 },
xhyx_prod: { "mixid":"xhyxshop", "shopid": 1 }, xhyx_prod: { "mixid":"xhyxshop", "shopid": 1 },
......
...@@ -37,10 +37,10 @@ ...@@ -37,10 +37,10 @@
"navigationBarTextStyle": "black" "navigationBarTextStyle": "black"
}, },
"permission": { "permission": {
"scope.userLocation": { "scope.userFuzzyLocation": {
"desc": "你的位置信息将用于获取附近的门店" "desc": "你的位置信息将用于获取附近的门店"
} }
}, },
"requiredPrivateInfos" : [ "chooseLocation", "getLocation" ,"chooseAddress" ], "requiredPrivateInfos" : [ "chooseLocation", "getFuzzyLocation" ,"chooseAddress" ],
"__usePrivacyCheck__": true "__usePrivacyCheck__": true
} }
...@@ -69,7 +69,7 @@ export default { ...@@ -69,7 +69,7 @@ export default {
}, },
getLocationHandle(callback) { getLocationHandle(callback) {
let _this = this; let _this = this;
wx.getLocation({ wx.getFuzzyLocation({
type: "gcj02", // gcj02 wgs84 type: "gcj02", // gcj02 wgs84
isHighAccuracy: true, isHighAccuracy: true,
success: res => { success: res => {
......
...@@ -155,7 +155,7 @@ ...@@ -155,7 +155,7 @@
this.locationStatus = true; this.locationStatus = true;
return return
} }
wx.getLocation({ wx.getFuzzyLocation({
type: 'wgs84', type: 'wgs84',
success:function(res){ success:function(res){
const latitude = res.latitude const latitude = res.latitude
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
}) })
}else{ }else{
wx.getLocation({ wx.getFuzzyLocation({
type: 'wgs84', type: 'wgs84',
success:function(res){ success:function(res){
const latitude = res.latitude const latitude = res.latitude
......
...@@ -9,7 +9,7 @@ export function wx_decode(appId, sessionKey, encryptedData, iv) { ...@@ -9,7 +9,7 @@ export function wx_decode(appId, sessionKey, encryptedData, iv) {
// 定位方法 // 定位方法
export function getUserLocation() { export function getUserLocation() {
return new Promise((resolve,reject)=>{ return new Promise((resolve,reject)=>{
wx.getLocation({ wx.getFuzzyLocation({
type: 'gcj02', // type有两中类型,gcj02 是腾讯地图所能解析的 type: 'gcj02', // type有两中类型,gcj02 是腾讯地图所能解析的
success: res => { success: res => {
resolve(res) resolve(res)
......
...@@ -81,7 +81,7 @@ Component({ ...@@ -81,7 +81,7 @@ Component({
if(this.data.changeLocation == 1){ if(this.data.changeLocation == 1){
return return
} }
wx.getLocation({ wx.getFuzzyLocation({
type: 'wgs84', type: 'wgs84',
success(res) { success(res) {
console.log('组件1111', _this.data.designateAreaObj) 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