diff --git a/.env b/.env
index ac08e963..7982b66a 100644
--- a/.env
+++ b/.env
@@ -1,4 +1,4 @@
-# NODE_ENV = 'production'
-NODE_ENV = 'development'
+# VITE_USER_NODE_ENV = 'production'
+VITE_USER_NODE_ENV = 'development'
# VITE_APP_BASE_URL = 'http://18.167.251.121:10086'
VITE_APP_BASE_URL = 'https://www.api.aida.com.hk'
diff --git a/.env.dev b/.env.dev
index c6537d19..139c8201 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,4 +1,4 @@
-NODE_ENV = 'development'
+VITE_USER_NODE_ENV = 'development'
# VITE_APP_BASE_URL = 'https://develop.api.aida.com.hk'
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
diff --git a/.env.dev_build b/.env.dev_build
index aaa7cd9e..6717cb17 100644
--- a/.env.dev_build
+++ b/.env.dev_build
@@ -1,4 +1,4 @@
-NODE_ENV = 'production'
+VITE_USER_NODE_ENV = 'production'
# VITE_APP_BASE_URL = 'https://aida.com.hk/test'
# VITE_APP_BASE_URL = 'http://18.167.251.121:10088'
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
diff --git a/.env.production b/.env.production
index 4783f524..852b3840 100644
--- a/.env.production
+++ b/.env.production
@@ -1,4 +1,4 @@
-NODE_ENV = 'production'
+VITE_USER_NODE_ENV = 'production'
# VITE_APP_BASE_URL = 'http://18.167.251.121:10086'
# VITE_APP_BASE_URL = 'https://polyu.api.aida.com.hk'
VITE_APP_BASE_URL = 'https://www.api.aida.com.hk'
diff --git a/.env.test b/.env.test
index df7796d3..cc8ff50b 100644
--- a/.env.test
+++ b/.env.test
@@ -1,4 +1,4 @@
-NODE_ENV = 'development'
+VITE_USER_NODE_ENV = 'development'
VITE_APP_BASE_URL = 'https://test.api.aida.com.hk'
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
diff --git a/.env.test_build b/.env.test_build
index 0350cb11..3a251a8e 100644
--- a/.env.test_build
+++ b/.env.test_build
@@ -1,4 +1,4 @@
-NODE_ENV = 'production'
+VITE_USER_NODE_ENV = 'production'
# VITE_APP_BASE_URL = 'https://aida.com.hk/test'
# VITE_APP_BASE_URL = 'http://18.167.251.121:10088'
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
diff --git a/components.d.ts b/components.d.ts
index f81e88de..2a668200 100644
--- a/components.d.ts
+++ b/components.d.ts
@@ -9,13 +9,9 @@ export {}
declare module 'vue' {
export interface GlobalComponents {
ABadge: typeof import('ant-design-vue/es')['Badge']
- ABreadcrumb: typeof import('ant-design-vue/es')['Breadcrumb']
ACheckbox: typeof import('ant-design-vue/es')['Checkbox']
- ADatePicker: typeof import('ant-design-vue/es')['DatePicker']
ADrawer: typeof import('ant-design-vue/es')['Drawer']
AImage: typeof import('ant-design-vue/es')['Image']
- AMenu: typeof import('ant-design-vue/es')['Menu']
- AMenuItem: typeof import('ant-design-vue/es')['MenuItem']
AModal: typeof import('ant-design-vue/es')['Modal']
APagination: typeof import('ant-design-vue/es')['Pagination']
APopover: typeof import('ant-design-vue/es')['Popover']
@@ -24,15 +20,11 @@ declare module 'vue' {
ASelect: typeof import('ant-design-vue/es')['Select']
ASelectOption: typeof import('ant-design-vue/es')['SelectOption']
ASlider: typeof import('ant-design-vue/es')['Slider']
- ASpace: typeof import('ant-design-vue/es')['Space']
ASpin: typeof import('ant-design-vue/es')['Spin']
- ASubMenu: typeof import('ant-design-vue/es')['SubMenu']
ASwitch: typeof import('ant-design-vue/es')['Switch']
ATable: typeof import('ant-design-vue/es')['Table']
- ATabPane: typeof import('ant-design-vue/es')['TabPane']
- ATabs: typeof import('ant-design-vue/es')['Tabs']
- ATimeRangePicker: typeof import('ant-design-vue/es')['TimeRangePicker']
AUpload: typeof import('ant-design-vue/es')['Upload']
+ ElCascader: typeof import('element-plus/es')['ElCascader']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
diff --git a/src/component/HomePage/scaleImage.vue b/src/component/HomePage/scaleImage.vue
index 95684c2d..c6a092f6 100644
--- a/src/component/HomePage/scaleImage.vue
+++ b/src/component/HomePage/scaleImage.vue
@@ -132,10 +132,10 @@
-
+
diff --git a/src/component/home/chat/index.vue b/src/component/home/chat/index.vue
index 5b338245..134d0371 100644
--- a/src/component/home/chat/index.vue
+++ b/src/component/home/chat/index.vue
@@ -141,7 +141,7 @@ export default defineComponent({
let imageUrlList = (fileList.filter((item:any)=>item.type == 'image').length > 0)? fileList.filter((item:any)=>item.type == 'image').map((item:any)=>item.minioPath).join(',') : ''
data.chatList.push({content:{message:data.chatContent,think:''},role:'user',fileList:fileList})
data.chatList.push({content:{message:'',think:''},role:'system'})
- const eventSource = new EventSource(`${import.meta.env.VUE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=${data.selectObject.id}&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}`);
+ const eventSource = new EventSource(`${import.meta.env.VITE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=${data.selectObject.id}&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}`);
data.chatContent = ''
dataDom.textarea.value = ''
data.filList = []
diff --git a/src/component/home/design/index.vue b/src/component/home/design/index.vue
index c8b486c5..a8b4eff4 100644
--- a/src/component/home/design/index.vue
+++ b/src/component/home/design/index.vue
@@ -289,7 +289,6 @@ import { getMousePosition } from "@/tool/mdEvent";
import { removeClass } from "element-plus/es/utils";
import collectionModal from './collection.vue'
import designTools from './tools.vue'
-const FileSaver = require("file-saver");
export default defineComponent({
name: "homePage",
diff --git a/src/component/home/newProject/index.vue b/src/component/home/newProject/index.vue
index 7796accb..ae18e390 100644
--- a/src/component/home/newProject/index.vue
+++ b/src/component/home/newProject/index.vue
@@ -152,7 +152,7 @@ export default defineComponent({
data.loadingShow = false
})
// let projectId = ''
- // const eventSource = new EventSource(`${import.meta.env.VUE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}&process=${data.selectFlow.value}`);
+ // const eventSource = new EventSource(`${import.meta.env.VITE_APP_BASE_URL}${Https.httpUrls.llmStream}?token=${getCookie('token')}&prompt=${data.chatContent}&projectId=&fileUrl=${fileUrl}&imageUrlList=${imageUrlList}&enableThinking=${data.enableThinking}&process=${data.selectFlow.value}`);
// eventSource.onmessage = function(event) {
// let eventData = JSON.parse(event.data)
// if(eventData.status == "[PROJECT_CREATE_SIGNAL]"){
diff --git a/src/main.ts b/src/main.ts
index be7aac58..ee6905b5 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -16,6 +16,8 @@ import "../node_modules/@flaticon/flaticon-uicons/css/all/all.css";
// import { Https } from "@/tool/https";
import "swiper/css";
import "swiper/css/pagination";
+import SvgIcon from "@/component/Canvas/SvgIcon/index.vue";
+
// import "@/tool/color-thief.js";
// import "@/tool/fabric.brushes.js";
@@ -38,5 +40,6 @@ app
.use(router)
.use(Antd)
.use(VueLazyload, loadingParam)
+.component("SvgIcon", SvgIcon)
.use(i18n)
.mount("#app");
diff --git a/src/tool/https.js b/src/tool/https.js
index 835690aa..addc799c 100644
--- a/src/tool/https.js
+++ b/src/tool/https.js
@@ -14,28 +14,28 @@ axios.defaults.headers.post['lang'] = 'en'; //配置语言请求头
axios.defaults.withCredentials = true; //跨域携带cookie
import { message } from 'ant-design-vue';
import store from '@/store';
-// if(process.env.NODE_ENV == "development"){
+// if(import.meta.env.VITE_USER_NODE_ENV == "development"){
// axios.defaults.baseURL = ""; //配置接口地址
// }else{
-// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
+// axios.defaults.baseURL = import.meta.env.VITE_APP_BASE_URL; //配置接口地址
// }
// let httpIp
-// if(process.env.NODE_ENV == 'development'){
+// if(import.meta.env.VITE_USER_NODE_ENV == 'development'){
// httpIp = 'http://192.168.1.12:10086'
// }else{
// httpIp = ''
// }
-let httpIp = process.env.NODE_ENV == 'development' ? "" : "";
-// let httpIp = process.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : "";
+let httpIp = import.meta.env.VITE_USER_NODE_ENV == 'development' ? "" : "";
+// let httpIp = import.meta.env.VITE_USER_NODE_ENV == 'development' ? "https://192.168.1.8:10086" : "";
axios.defaults.baseURL = httpIp; //配置接口地址
// console.log(axios.defaults.baseURL);
-axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址
+axios.defaults.baseURL = import.meta.env.VITE_APP_BASE_URL; //配置接口地址
// 创建取消令牌
const CancelToken = axios.CancelToken;
const source = CancelToken.source();
-// console.log(process.env.VUE_APP_BASE_URL);
+// console.log(import.meta.env.VITE_APP_BASE_URL);
const filterHttpsUrl = ['/api/portfolio/page','/api/portfolio/detail','/api/account/preLogin','/api/account/schoolLogin','/api/account/enterpriseLogin','/api/account/login']
//POST传参序列化(添加请求拦截器)
axios.interceptors.request.use((config) => {
diff --git a/src/tool/util.js b/src/tool/util.js
index 8f14f010..30f57a16 100644
--- a/src/tool/util.js
+++ b/src/tool/util.js
@@ -18,7 +18,7 @@ function getUniversalZoomLevel() {
return window.outerWidth / window.innerWidth;
}
const getUploadUrl = () => {
- let url = import.meta.env.VUE_APP_BASE_URL || ''
+ let url = import.meta.env.VITE_APP_BASE_URL || ''
// let url = "http://18.167.251.121:10086"
return url
}
diff --git a/vite.config.js b/vite.config.js
index a13ee5c8..c089fe5b 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -5,6 +5,7 @@ import { AntDesignVueResolver } from "unplugin-vue-components/resolvers";
import AutoImport from "unplugin-auto-import/vite";
import { createSvgIconsPlugin } from "vite-plugin-svg-icons";
import path from "path";
+import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
// https://vite.dev/config/
export default defineConfig(({ mode }) => {
@@ -20,9 +21,10 @@ export default defineConfig(({ mode }) => {
plugins: [
vue(),
Components({
- resolvers: [AntDesignVueResolver({ importStyle: false })],
+ resolvers: [AntDesignVueResolver({ importStyle: false }),ElementPlusResolver()],
}),
AutoImport({
+ resolvers: [ElementPlusResolver()],
imports: [
"vue",
"vue-router",