Commit 8bdecc66 authored by chenqikuai's avatar chenqikuai

fix

parent b70bf61e
...@@ -43,13 +43,13 @@ class AddressService { ...@@ -43,13 +43,13 @@ class AddressService {
} }
if ('geolocation' in window.navigator) { if ('geolocation' in window.navigator) {
console.log('geolocation');
window.navigator.geolocation.getCurrentPosition( window.navigator.geolocation.getCurrentPosition(
(position) => { (position) => {
console.log(position, 'position')
const la = position.coords.latitude.toString() const la = position.coords.latitude.toString()
const lo = position.coords.longitude.toString() const lo = position.coords.longitude.toString()
console.log(position, 'position')
resolve( resolve(
baseAxios<iNearbyOutLet[]>({ baseAxios<iNearbyOutLet[]>({
method: 'post', method: 'post',
url: '/address/nearby', url: '/address/nearby',
...@@ -67,6 +67,7 @@ class AddressService { ...@@ -67,6 +67,7 @@ class AddressService {
}, },
) )
} else { } else {
console.log('geolocation not in window');
getGps() getGps()
} }
}) })
......
...@@ -74,8 +74,6 @@ export default defineComponent({ ...@@ -74,8 +74,6 @@ export default defineComponent({
addressService.getNearby({ addressService.getNearby({
bank_code: Number(process.env.VUE_APP_BANK_CODE), bank_code: Number(process.env.VUE_APP_BANK_CODE),
number: 4, number: 4,
latitude: '120.156203',
longitude: '30.285618',
}).then(res => { }).then(res => {
result.loading = false; result.loading = false;
result.topItem = res.data[0] result.topItem = res.data[0]
......
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