mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-05-01 22:59:01 +08:00
Compare commits
No commits in common. "5766510ad907bb912a8d77287afd8c421bfe2c5e" and "6cdf905cd45e2e79141a5fb1512656c8c7cb35c8" have entirely different histories.
5766510ad9
...
6cdf905cd4
@ -4,9 +4,6 @@ VITE_USE_HASH = 'true'
|
||||
# 资源公共路径,需要以 /开头和结尾
|
||||
VITE_PUBLIC_PATH = '/'
|
||||
|
||||
# Axios 基础路径
|
||||
# VITE_AXIOS_BASE_URL = '/api' # 用于代理
|
||||
VITE_AXIOS_BASE_URL = 'https://mock.apifox.com/m1/3776410-0-default' # apifox云端mock
|
||||
|
||||
# 代理配置-target
|
||||
VITE_PROXY_TARGET = 'http://localhost:8085'
|
||||
# 代理配置-target 本地服务 | Apifox云端mock
|
||||
# VITE_PROXY_TARGET = 'http://localhost:8085'
|
||||
VITE_PROXY_TARGET = 'https://mock.apifox.com/m1/3776410-0-default/'
|
||||
|
@ -4,7 +4,5 @@ VITE_USE_HASH = 'false'
|
||||
# 资源公共路径,需要以 /开头和结尾
|
||||
VITE_PUBLIC_PATH = '/'
|
||||
|
||||
VITE_AXIOS_BASE_URL = '/api' # 用于代理
|
||||
|
||||
# 代理配置-target
|
||||
VITE_PROXY_TARGET = 'http://localhost:8085'
|
||||
|
@ -51,7 +51,7 @@ const props = defineProps({
|
||||
default: true,
|
||||
},
|
||||
/**
|
||||
* @isPagination 是否分页
|
||||
* @remote 是否分页
|
||||
*/
|
||||
isPagination: {
|
||||
type: Boolean,
|
||||
|
@ -12,7 +12,7 @@ import { setupInterceptors } from './interceptors'
|
||||
|
||||
export function createAxios(options = {}) {
|
||||
const defaultOptions = {
|
||||
baseURL: import.meta.env.VITE_AXIOS_BASE_URL,
|
||||
baseURL: '/api',
|
||||
timeout: 12000,
|
||||
}
|
||||
const service = axios.create({
|
||||
|
@ -118,7 +118,7 @@ const loginInfo = ref({
|
||||
|
||||
const captchaUrl = ref('')
|
||||
const initCaptcha = throttle(() => {
|
||||
captchaUrl.value = import.meta.env.VITE_AXIOS_BASE_URL + '/auth/captcha?' + Date.now()
|
||||
captchaUrl.value = '/api/auth/captcha?' + Date.now()
|
||||
}, 500)
|
||||
|
||||
const localLoginInfo = lStorage.get('loginInfo')
|
||||
|
@ -17,9 +17,10 @@ import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
|
||||
import removeNoMatch from 'vite-plugin-router-warn'
|
||||
import { pluginPagePathes, pluginIcons } from './build/plugin-isme'
|
||||
|
||||
export default defineConfig(({ mode }) => {
|
||||
export default defineConfig(({ command, mode }) => {
|
||||
const isBuild = command === 'build'
|
||||
const viteEnv = loadEnv(mode, process.cwd())
|
||||
const { VITE_PUBLIC_PATH, VITE_PROXY_TARGET } = viteEnv
|
||||
const { VITE_TITLE, VITE_PUBLIC_PATH, VITE_PROXY_TARGET } = viteEnv
|
||||
|
||||
return {
|
||||
base: VITE_PUBLIC_PATH || '/',
|
||||
|
Loading…
x
Reference in New Issue
Block a user