Compare commits

5 Commits

Author SHA1 Message Date
2287a3c9ac Merge pull request '更新' (#5) from xiaozy into master
Reviewed-on: #5
2023-04-12 11:37:59 +00:00
xiaozhiyong
19ad15f345 更新 2023-04-12 19:36:08 +08:00
92bd816494 Merge pull request 'xiaozy' (#4) from xiaozy into master
Reviewed-on: #4
2023-04-12 08:34:01 +00:00
xiaozhiyong
11c3bad638 更新 2023-04-12 16:33:36 +08:00
xiaozhiyong
d804c50583 更新 2023-04-12 13:25:42 +08:00
4 changed files with 35 additions and 2 deletions

View File

@@ -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()

View File

@@ -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
}
}
})
})

View File

@@ -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
}
}
})
})

View File

@@ -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]: ''