注释地理位置获取
parent
b255ef510d
commit
f9d837f3f2
|
@ -596,17 +596,17 @@
|
|||
}
|
||||
},
|
||||
goThere(val){//去这里
|
||||
wx.getLocation({//获取当前经纬度
|
||||
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
success: function (res) {
|
||||
wx.openLocation({//使用微信内置地图查看位置。
|
||||
latitude: 30.67554,//要去的纬度-地址
|
||||
longitude: 104.010642,//要去的经度-地址
|
||||
name: val,
|
||||
address: val
|
||||
})
|
||||
}
|
||||
})
|
||||
// wx.getLocation({//获取当前经纬度
|
||||
// type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
// success: function (res) {
|
||||
// wx.openLocation({//使用微信内置地图查看位置。
|
||||
// latitude: 30.67554,//要去的纬度-地址
|
||||
// longitude: 104.010642,//要去的经度-地址
|
||||
// name: val,
|
||||
// address: val
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
checkAddress(){//默认地址查询
|
||||
this.$requst.post('user/address').then(res=>{
|
||||
|
|
|
@ -595,17 +595,17 @@
|
|||
}
|
||||
},
|
||||
goThere(val){//去这里
|
||||
wx.getLocation({//获取当前经纬度
|
||||
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
success: function (res) {
|
||||
wx.openLocation({//使用微信内置地图查看位置。
|
||||
latitude: 30.67554,//要去的纬度-地址
|
||||
longitude: 104.010642,//要去的经度-地址
|
||||
name: val,
|
||||
address: val
|
||||
})
|
||||
}
|
||||
})
|
||||
// wx.getLocation({//获取当前经纬度
|
||||
// type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
// success: function (res) {
|
||||
// wx.openLocation({//使用微信内置地图查看位置。
|
||||
// latitude: 30.67554,//要去的纬度-地址
|
||||
// longitude: 104.010642,//要去的经度-地址
|
||||
// name: val,
|
||||
// address: val
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
checkAddress(){//默认地址查询
|
||||
this.$requst.post('user/address').then(res=>{
|
||||
|
|
|
@ -138,12 +138,12 @@
|
|||
this.isMo = 0;
|
||||
this.clearAll();
|
||||
// 获取当前位置的经纬度
|
||||
wx.getLocation({
|
||||
success:(res)=> {
|
||||
// 逆解析经纬度
|
||||
this.getDistrict(res.latitude, res.longitude)
|
||||
},
|
||||
})
|
||||
// wx.getLocation({
|
||||
// success:(res)=> {
|
||||
// // 逆解析经纬度
|
||||
// this.getDistrict(res.latitude, res.longitude)
|
||||
// },
|
||||
// })
|
||||
|
||||
},
|
||||
getDistrict(latitude, longitude) {//获取当前位置的省市区县
|
||||
|
|
|
@ -132,12 +132,12 @@
|
|||
let chuo = new Date().getTime()// 获取当前时间戳
|
||||
let time = this.$toolAll.tools.timestampToTime(chuo)// 转换日期格式为XXXX-XX-XX
|
||||
// 获取当前位置的经纬度
|
||||
wx.getLocation({
|
||||
success:(res)=> {
|
||||
// 逆解析经纬度
|
||||
this.getDistrict(res.latitude, res.longitude)
|
||||
},
|
||||
})
|
||||
// wx.getLocation({
|
||||
// success:(res)=> {
|
||||
// // 逆解析经纬度
|
||||
// this.getDistrict(res.latitude, res.longitude)
|
||||
// },
|
||||
// })
|
||||
let firstObj = uni.getStorageSync('firstInfo')
|
||||
if(firstObj==''){
|
||||
let obj = uni.getStorageSync('uinfo')
|
||||
|
|
|
@ -319,17 +319,17 @@
|
|||
}
|
||||
},
|
||||
goThere(val){//去这里
|
||||
wx.getLocation({//获取当前经纬度
|
||||
type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
success: function (res) {
|
||||
wx.openLocation({//使用微信内置地图查看位置。
|
||||
latitude: 30.67554,//要去的纬度-地址
|
||||
longitude: 104.010642,//要去的经度-地址
|
||||
name: val,
|
||||
address: val
|
||||
})
|
||||
}
|
||||
})
|
||||
// wx.getLocation({//获取当前经纬度
|
||||
// type: 'wgs84', //返回可以用于wx.openLocation的经纬度,官方提示bug: iOS 6.3.30 type 参数不生效,只会返回 wgs84 类型的坐标信息
|
||||
// success: function (res) {
|
||||
// wx.openLocation({//使用微信内置地图查看位置。
|
||||
// latitude: 30.67554,//要去的纬度-地址
|
||||
// longitude: 104.010642,//要去的经度-地址
|
||||
// name: val,
|
||||
// address: val
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue