更改环境配置
This commit is contained in:
parent
11cf2a690f
commit
fa1ecdafbc
@ -1 +1,2 @@
|
||||
VITE_BASE_URL= 'https://vue3.go-admin.dev'
|
||||
BASE_URL= "https://vue3.go-admin.dev"
|
||||
VITE_BASE_URL= "http://dev.hospital.admin.igandanyiyuan.com"
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import request from '../../utils/request';
|
||||
export function login(data) {
|
||||
return request({
|
||||
url:'/api/v1/login',
|
||||
url:'/admin/basic/login',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
@ -9,7 +9,7 @@ export function login(data) {
|
||||
|
||||
export function getCaptcha() {
|
||||
return request({
|
||||
url:'/api/v1/captcha',
|
||||
url:'/admin/basic/captcha',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
@ -4,9 +4,9 @@
|
||||
v-if="menu.children && menu.menuType == 'M' && menu.visible == 0"
|
||||
:key="menu.path"
|
||||
>
|
||||
<template #icon>
|
||||
<!-- <template #icon>
|
||||
<component :is="menu.icon" />
|
||||
</template>
|
||||
</template> -->
|
||||
<template #title>{{ menu.title }}</template>
|
||||
<sub-menu :menuList="menu.children" />
|
||||
</a-sub-menu>
|
||||
|
||||
@ -33,9 +33,9 @@ export const useUserStore = defineStore('user', {
|
||||
},
|
||||
async getSysConfig() {
|
||||
try {
|
||||
const res = await getAppConfig();
|
||||
setLocalStorage('sysConfig', res.data);
|
||||
this.sysConfig = res.data;
|
||||
// const res = await getAppConfig();
|
||||
// setLocalStorage('sysConfig', res.data);
|
||||
this.sysConfig ={sys_app_logo: "https://doc-image.zhangwj.com/img/go-admin.png", sys_app_name: "go-admin管理系统"} //res.data;
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
@ -7,6 +7,10 @@ console.log("________"+import.meta.env.VITE_BASE_URL)
|
||||
const service = axios.create({
|
||||
baseURL:import.meta.env.VITE_BASE_URL,
|
||||
timeout: 8000,
|
||||
headers:{
|
||||
'Content-Type':'application/json',
|
||||
'Authorization':''
|
||||
}
|
||||
});
|
||||
|
||||
// request interceptor
|
||||
|
||||
@ -28,14 +28,18 @@ export default defineConfig({
|
||||
}
|
||||
},
|
||||
server: {
|
||||
host: true,
|
||||
port: 1798,
|
||||
|
||||
//secure: false,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://vue3.go-admin.dev',
|
||||
// '/api': {
|
||||
// target: 'https://vue3.go-admin.dev',
|
||||
// changeOrigin: true, //开启跨域
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
// },
|
||||
'/admin': {
|
||||
target: 'http://dev.hospital.admin.igandanyiyuan.com',
|
||||
changeOrigin: true, //开启跨域
|
||||
rewrite: (path) => path.replace(/^\/api/, '')
|
||||
rewrite: (path) => path.replace(/^\/admin/, '')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user