From 01a5a2ad72821e8194c48dd969c62c7b85fb1ccf Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Mon, 10 Apr 2023 09:02:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/piniaIndex.js | 16 +++++++++------- vue.config.js | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/store/piniaIndex.js b/src/store/piniaIndex.js index afda4a5..b523f69 100644 --- a/src/store/piniaIndex.js +++ b/src/store/piniaIndex.js @@ -28,7 +28,7 @@ const instance = defineStore('user', { actions: { getPosition() { this.position = { latitude: 36.636753, longitude: 119.11914 } - return + // return initAMap().then(() => { // console.log(3) let AMap = Vue.prototype.$AMap @@ -36,12 +36,14 @@ const instance = defineStore('user', { // enableHighAccuracy: true // 是否使用高精度定位,默认:true }) geolocation.getCurrentPosition(function (status, result) { - console.log(2) - if (status === 'complete') { - let { lat: latitude, lng: longitude } = result.position - this.position = { latitude, longitude } - console.log('this.position', this.position) - } + console.log('geolocation.getCurrentPosition') + console.log('status', status) + console.log('result', result) + // if (status === 'complete') { + // let { lat: latitude, lng: longitude } = result.position + // this.position = { latitude, longitude } + // console.log('this.position', this.position) + // } }) }) return diff --git a/vue.config.js b/vue.config.js index 413b3af..dae57e4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -17,8 +17,8 @@ module.exports = defineConfig({ proxy: { [process.env.VUE_APP_BASE_API]: { // target: `http://192.168.1.83:38080`, - // target: `https://www.xingoil.com/adminapi`, - target: `http://uat.xingoil.com/adminapi`, + target: `https://www.xingoil.com/adminapi`, + // target: `http://uat.xingoil.com/adminapi`, changeOrigin: true, pathRewrite: { ['^' + process.env.VUE_APP_BASE_API]: ''