Compare commits
5 Commits
78a4cafc38
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 2287a3c9ac | |||
|
|
19ad15f345 | ||
| 92bd816494 | |||
|
|
11c3bad638 | ||
|
|
d804c50583 |
@@ -14,6 +14,7 @@ import vConsole from 'vconsole'
|
||||
if (process.env.VUE_APP_ENV !== 'production') {
|
||||
new vConsole()
|
||||
}
|
||||
// new vConsole()
|
||||
|
||||
Vue.use(PiniaVuePlugin)
|
||||
const pinia = createPinia()
|
||||
|
||||
@@ -41,6 +41,22 @@ const instance = defineStore('user', {
|
||||
let { lat: latitude, lng: longitude } = result.position
|
||||
this.position = { latitude, longitude }
|
||||
} else {
|
||||
switch (result.status) {
|
||||
case 1:
|
||||
Notify({
|
||||
message: '用户拒绝对获取地理位置的请求。',
|
||||
type: 'danger',
|
||||
duration: 1000
|
||||
})
|
||||
break
|
||||
default:
|
||||
Notify({
|
||||
message: '定位获取失败,请退出重试。',
|
||||
type: 'danger',
|
||||
duration: 1000
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -144,6 +144,22 @@ export default {
|
||||
this.position = { latitude, longitude }
|
||||
this.obtainData()
|
||||
} else {
|
||||
switch (result.status) {
|
||||
case 1:
|
||||
Notify({
|
||||
message: '用户拒绝对获取地理位置的请求。',
|
||||
type: 'danger',
|
||||
duration: 1000
|
||||
})
|
||||
break
|
||||
default:
|
||||
Notify({
|
||||
message: '定位获取失败,请退出重试。',
|
||||
type: 'danger',
|
||||
duration: 1000
|
||||
})
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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]: ''
|
||||
|
||||
Reference in New Issue
Block a user