更新
This commit is contained in:
@@ -28,6 +28,16 @@ const instance = defineStore('user', {
|
|||||||
actions: {
|
actions: {
|
||||||
getPosition() {
|
getPosition() {
|
||||||
this.position = { latitude: 36.636753, longitude: 119.11914 }
|
this.position = { latitude: 36.636753, longitude: 119.11914 }
|
||||||
|
|
||||||
|
if (navigator?.geolocation?.getCurrentPosition) {
|
||||||
|
console.log('存在原生定位')
|
||||||
|
navigator.geolocation.getCurrentPosition(position => {
|
||||||
|
console.log('原生定位', position)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
console.log('原生定位不可用')
|
||||||
|
}
|
||||||
|
|
||||||
// return
|
// return
|
||||||
initAMap().then(() => {
|
initAMap().then(() => {
|
||||||
// console.log(3)
|
// console.log(3)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
const { defineConfig } = require('@vue/cli-service')
|
const { defineConfig } = require('@vue/cli-service')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const port = 9528
|
|
||||||
function resolve(dir) {
|
function resolve(dir) {
|
||||||
return path.join(__dirname, dir)
|
return path.join(__dirname, dir)
|
||||||
}
|
}
|
||||||
@@ -12,7 +12,7 @@ module.exports = defineConfig({
|
|||||||
lintOnSave: false,
|
lintOnSave: false,
|
||||||
|
|
||||||
devServer: {
|
devServer: {
|
||||||
port: port,
|
port: 9528,
|
||||||
// https: true,
|
// https: true,
|
||||||
proxy: {
|
proxy: {
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
|
|||||||
Reference in New Issue
Block a user