调整部分报错
This commit is contained in:
4
.env
4
.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'
|
||||
|
||||
2
.env.dev
2
.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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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'
|
||||
|
||||
10
components.d.ts
vendored
10
components.d.ts
vendored
@@ -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']
|
||||
}
|
||||
|
||||
@@ -132,10 +132,10 @@
|
||||
<generalMiniCanvas v-if="isCanvas" :imgUrl="scaleImageList[scaleImageIndex]?.imgUrl || scaleImageList[scaleImageIndex]?.url" @submitBase64Data="submitBase64Data"></generalMiniCanvas>
|
||||
<img v-else :src="scaleImageList[scaleImageIndex]?.imgUrl || scaleImageList[scaleImageIndex]?.url">
|
||||
|
||||
<div class="img_operate_block" v-if="isLike">
|
||||
<!-- <div class="img_operate_block" v-if="isLike">
|
||||
<i v-if="!scaleImageList[scaleImageIndex]?.like" class="fi fi-rr-heart operate_icon" @click.stop="LikeFile(scaleImageList[scaleImageIndex],'like')"></i>
|
||||
<i v-else class="fi fi-sr-heart operate_icon" :adminLike="!!scaleImageList[scaleImageIndex]?.like" @click.stop="LikeFile(scaleImageList[scaleImageIndex],'noLike')"></i>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="scaleImage_nav">
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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]"){
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user