Commit 01d56b68 authored by 潘永坪's avatar 潘永坪

组合票定位取消

parent 31d096d6
...@@ -344,23 +344,6 @@ export default { ...@@ -344,23 +344,6 @@ export default {
let newTimestamp=uni.getStorageSync('newTimestamp')||'' let newTimestamp=uni.getStorageSync('newTimestamp')||''
let token = uni.getStorageSync('token') let token = uni.getStorageSync('token')
if (token) { if (token) {
uni.getLocation({
success: res => {
let latitude = res.latitude //纬度
let longitude = res.longitude //经度
this.showDistance = true
//判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
if(newTimestamp){
if(Date.now()>newTimestamp){
this.initList(latitude, longitude)
}else{
this.showTip=true
}
}else{
this.initList(latitude, longitude)
}
},
fail: res => {
let latitude = '' let latitude = ''
let longitude = '' let longitude = ''
//判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求 //判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
...@@ -373,8 +356,37 @@ export default { ...@@ -373,8 +356,37 @@ export default {
}else{ }else{
this.initList(latitude, longitude) this.initList(latitude, longitude)
} }
} // uni.getLocation({//定位暂时注释
}) // success: res => {
// let latitude = res.latitude //纬度
// let longitude = res.longitude //经度
// this.showDistance = true
// //判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
// if(newTimestamp){
// if(Date.now()>newTimestamp){
// this.initList(latitude, longitude)
// }else{
// this.showTip=true
// }
// }else{
// this.initList(latitude, longitude)
// }
// },
// fail: res => {
// let latitude = ''
// let longitude = ''
// //判断时间戳,之前请求失败,必须大于缓存时间戳才进行请求
// if(newTimestamp){
// if(Date.now()>newTimestamp){
// this.initList(latitude, longitude)
// }else{
// this.showTip=true
// }
// }else{
// this.initList(latitude, longitude)
// }
// }
// })
} }
}, },
methods: { methods: {
......
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