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