diff --git a/src/App.vue b/src/App.vue index c78513c2..dc3feeac 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,11 +2,29 @@ - diff --git a/src/component/home/chat/index.vue b/src/component/home/chat/index.vue index 5e713069..c350593b 100644 --- a/src/component/home/chat/index.vue +++ b/src/component/home/chat/index.vue @@ -136,7 +136,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(`${process.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.VUE_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 de650a6e..78f05617 100644 --- a/src/component/home/design/index.vue +++ b/src/component/home/design/index.vue @@ -275,7 +275,6 @@ import { useI18n } from "vue-i18n"; import { getMousePosition } from "@/tool/mdEvent"; import { removeClass } from "element-plus/es/utils"; import collectionModal from './collection.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 a8b23c20..87ab8226 100644 --- a/src/component/home/newProject/index.vue +++ b/src/component/home/newProject/index.vue @@ -150,7 +150,7 @@ export default defineComponent({ data.loadingShow = false }) // let projectId = '' - // const eventSource = new EventSource(`${process.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.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}`); // eventSource.onmessage = function(event) { // let eventData = JSON.parse(event.data) // if(eventData.status == "[PROJECT_CREATE_SIGNAL]"){ diff --git a/src/tool/flexible.js b/src/tool/flexible.js index f49fddf0..85cf0c1e 100644 --- a/src/tool/flexible.js +++ b/src/tool/flexible.js @@ -12,6 +12,11 @@ let flexible = (designWidth, maxWidth,minWidth) =>{ width = getUniversalZoomLevel() * width height = getUniversalZoomLevel() * height maxWidth = maxWidth || 1920; + if(width < 1100){ + document.body.classList.add('ipad') + }else{ + document.body.classList.remove('ipad') + } if(width/height>1.98) width = height * 1.98; width > maxWidth && (width = maxWidth); width < minWidth && (width = minWidth); diff --git a/src/tool/https.js b/src/tool/https.js index 44b77cc4..e9c4b15b 100644 --- a/src/tool/https.js +++ b/src/tool/https.js @@ -13,19 +13,19 @@ 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.NODE_ENV == "development"){ // axios.defaults.baseURL = ""; //配置接口地址 // }else{ -// axios.defaults.baseURL = process.env.VUE_APP_BASE_URL; //配置接口地址 +// axios.defaults.baseURL = import.meta.env.VUE_APP_BASE_URL; //配置接口地址 // } // let httpIp -// if(process.env.NODE_ENV == 'development'){ +// if(import.meta.env.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.NODE_ENV == "development" ? "" : ""; +// let httpIp = import.meta.env.NODE_ENV == 'development' ? "https://192.168.1.8:10086" : ""; axios.defaults.baseURL = httpIp; //配置接口地址 // console.log(axios.defaults.baseURL); diff --git a/src/tool/util.js b/src/tool/util.js index 6cef33e7..8f14f010 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 = process.env.VUE_APP_BASE_URL || '' + let url = import.meta.env.VUE_APP_BASE_URL || '' // let url = "http://18.167.251.121:10086" return url }