feat(web): 增加根据环境切换debug状态
This commit is contained in:
@@ -5,8 +5,10 @@ import 'amis/lib/helper.css'
|
|||||||
import 'amis/sdk/iconfont.css'
|
import 'amis/sdk/iconfont.css'
|
||||||
import '@fortawesome/fontawesome-free/css/all.min.css'
|
import '@fortawesome/fontawesome-free/css/all.min.css'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
import {isEqual} from 'licia'
|
||||||
|
|
||||||
export const commonInfo = {
|
export const commonInfo = {
|
||||||
|
debug: isEqual(import.meta.env.MODE, 'development'),
|
||||||
baseUrl: 'http://132.126.207.130:35690/hudi_services/service_web',
|
baseUrl: 'http://132.126.207.130:35690/hudi_services/service_web',
|
||||||
baseAiChatUrl: 'http://132.126.207.130:35690/hudi_services/ai_chat',
|
baseAiChatUrl: 'http://132.126.207.130:35690/hudi_services/ai_chat',
|
||||||
baseAiKnowledgeUrl: 'http://132.126.207.130:35690/hudi_services/ai_knowledge',
|
baseAiKnowledgeUrl: 'http://132.126.207.130:35690/hudi_services/ai_knowledge',
|
||||||
@@ -79,7 +81,7 @@ export const amisRender = (schema: Schema, data: Record<any, any> = {}) => {
|
|||||||
theme: theme,
|
theme: theme,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enableAMISDebug: true,
|
enableAMISDebug: commonInfo.debug,
|
||||||
fetcher: async (api: any) => {
|
fetcher: async (api: any) => {
|
||||||
let {url, method, data, responseType, config, headers} = api
|
let {url, method, data, responseType, config, headers} = api
|
||||||
config = config || {}
|
config = config || {}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import react from '@vitejs/plugin-react-swc'
|
import react from '@vitejs/plugin-react-swc'
|
||||||
import {defineConfig, UserConfig} from 'vite'
|
import {defineConfig, type UserConfig} from 'vite'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig(({mode}) => {
|
export default defineConfig(({mode}) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user