diff --git a/src/store/piniaIndex.js b/src/store/piniaIndex.js index 9a93701..553dce2 100644 --- a/src/store/piniaIndex.js +++ b/src/store/piniaIndex.js @@ -34,9 +34,9 @@ const instance = defineStore('user', { let geolocation = new AMap.Geolocation({ // enableHighAccuracy: true // 是否使用高精度定位,默认:true }) - geolocation.getCurrentPosition(function (status, result) { - console.log('piniaIndex status', status) - console.log('piniaIndex result', result) + geolocation.getCurrentPosition((status, result) => { + // console.log('piniaIndex status', status) + // console.log('piniaIndex result', result) if (status === 'complete') { let { lat: latitude, lng: longitude } = result.position this.position = { latitude, longitude } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index c57e6ef..76b4e7f 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -137,8 +137,8 @@ export default { // enableHighAccuracy: true // 是否使用高精度定位,默认:true }) geolocation.getCurrentPosition((status, result) => { - console.log('status', status) - console.log('result', result) + // console.log('status', status) + // console.log('result', result) if (status === 'complete') { let { lat: latitude, lng: longitude } = result.position this.position = { latitude, longitude } diff --git a/src/views/orderDetails/components/oilNextFooter.vue b/src/views/orderDetails/components/oilNextFooter.vue index d3c9551..8b47b01 100644 --- a/src/views/orderDetails/components/oilNextFooter.vue +++ b/src/views/orderDetails/components/oilNextFooter.vue @@ -126,7 +126,11 @@ export default { if (this.positionChenk(position)) { position = JSON.parse(localStorage.getItem('position')) if (this.positionChenk(position)) { - console.log(position, this.$pinia.state.value.user.position, '地理位置错误') + Notify({ + message: '地理位置错误', + type: 'danger', + duration: 1000 + }) return } }