1
0
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.

6 changed files with 9 additions and 13 deletions

View File

@ -4,9 +4,6 @@ VITE_USE_HASH = 'true'
# 资源公共路径,需要以 /开头和结尾 # 资源公共路径,需要以 /开头和结尾
VITE_PUBLIC_PATH = '/' VITE_PUBLIC_PATH = '/'
# Axios 基础路径 # 代理配置-target 本地服务 | Apifox云端mock
# VITE_AXIOS_BASE_URL = '/api' # 用于代理 # VITE_PROXY_TARGET = 'http://localhost:8085'
VITE_AXIOS_BASE_URL = 'https://mock.apifox.com/m1/3776410-0-default' # apifox云端mock VITE_PROXY_TARGET = 'https://mock.apifox.com/m1/3776410-0-default/'
# 代理配置-target
VITE_PROXY_TARGET = 'http://localhost:8085'

View File

@ -4,7 +4,5 @@ VITE_USE_HASH = 'false'
# 资源公共路径,需要以 /开头和结尾 # 资源公共路径,需要以 /开头和结尾
VITE_PUBLIC_PATH = '/' VITE_PUBLIC_PATH = '/'
VITE_AXIOS_BASE_URL = '/api' # 用于代理
# 代理配置-target # 代理配置-target
VITE_PROXY_TARGET = 'http://localhost:8085' VITE_PROXY_TARGET = 'http://localhost:8085'

View File

@ -51,7 +51,7 @@ const props = defineProps({
default: true, default: true,
}, },
/** /**
* @isPagination 是否分页 * @remote 是否分页
*/ */
isPagination: { isPagination: {
type: Boolean, type: Boolean,

View File

@ -12,7 +12,7 @@ import { setupInterceptors } from './interceptors'
export function createAxios(options = {}) { export function createAxios(options = {}) {
const defaultOptions = { const defaultOptions = {
baseURL: import.meta.env.VITE_AXIOS_BASE_URL, baseURL: '/api',
timeout: 12000, timeout: 12000,
} }
const service = axios.create({ const service = axios.create({

View File

@ -118,7 +118,7 @@ const loginInfo = ref({
const captchaUrl = ref('') const captchaUrl = ref('')
const initCaptcha = throttle(() => { const initCaptcha = throttle(() => {
captchaUrl.value = import.meta.env.VITE_AXIOS_BASE_URL + '/auth/captcha?' + Date.now() captchaUrl.value = '/api/auth/captcha?' + Date.now()
}, 500) }, 500)
const localLoginInfo = lStorage.get('loginInfo') const localLoginInfo = lStorage.get('loginInfo')

View File

@ -17,9 +17,10 @@ import { NaiveUiResolver } from 'unplugin-vue-components/resolvers'
import removeNoMatch from 'vite-plugin-router-warn' import removeNoMatch from 'vite-plugin-router-warn'
import { pluginPagePathes, pluginIcons } from './build/plugin-isme' 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 viteEnv = loadEnv(mode, process.cwd())
const { VITE_PUBLIC_PATH, VITE_PROXY_TARGET } = viteEnv const { VITE_TITLE, VITE_PUBLIC_PATH, VITE_PROXY_TARGET } = viteEnv
return { return {
base: VITE_PUBLIC_PATH || '/', base: VITE_PUBLIC_PATH || '/',