|
@@ -4,6 +4,8 @@ import Vue from 'vue'
|
|
|
import App from './App'
|
|
import App from './App'
|
|
|
import router from './router'
|
|
import router from './router'
|
|
|
import store from './config/config'
|
|
import store from './config/config'
|
|
|
|
|
+import locale from 'element-ui/lib/locale/lang/en'
|
|
|
|
|
+
|
|
|
import { Loading } from 'element-ui';
|
|
import { Loading } from 'element-ui';
|
|
|
// Message,
|
|
// Message,
|
|
|
import { myMessage } from './components/tools/message';
|
|
import { myMessage } from './components/tools/message';
|
|
@@ -22,7 +24,6 @@ import './assets/css/button.css'
|
|
|
import './assets/css/dialog.css'
|
|
import './assets/css/dialog.css'
|
|
|
import './assets/css/markdownCss.css'
|
|
import './assets/css/markdownCss.css'
|
|
|
import './assets/css/markdownCssCopy.css'
|
|
import './assets/css/markdownCssCopy.css'
|
|
|
-
|
|
|
|
|
import VueAudio from 'vue-audio-better'
|
|
import VueAudio from 'vue-audio-better'
|
|
|
|
|
|
|
|
const echarts = require('echarts');
|
|
const echarts = require('echarts');
|
|
@@ -30,7 +31,6 @@ const echarts = require('echarts');
|
|
|
import cn from "./lang/cn.json";
|
|
import cn from "./lang/cn.json";
|
|
|
import hk from "./lang/hk.json";
|
|
import hk from "./lang/hk.json";
|
|
|
import en from "./lang/en.json";
|
|
import en from "./lang/en.json";
|
|
|
-
|
|
|
|
|
//
|
|
//
|
|
|
Vue.use(VideoPlayer).use(VueAudio).use(VueCookies).use(Viewer).use(hevueImgPreview, {
|
|
Vue.use(VideoPlayer).use(VueAudio).use(VueCookies).use(Viewer).use(hevueImgPreview, {
|
|
|
clickMaskCLose: true
|
|
clickMaskCLose: true
|
|
@@ -69,33 +69,56 @@ Viewer.setDefaults({
|
|
|
'keyboard': true, //
|
|
'keyboard': true, //
|
|
|
})
|
|
})
|
|
|
//注册到vue原型上
|
|
//注册到vue原型上
|
|
|
|
|
+// let BaseUrl=''
|
|
|
|
|
+// let Claude3Url = 'https://claude3.cocorobo.cn/';
|
|
|
|
|
+// let QwenUrl = 'https://llm.cocorobo.cn/'
|
|
|
let lang = new Object();
|
|
let lang = new Object();
|
|
|
|
|
+let speech_url="";
|
|
|
|
|
+let magic_brush_url="";
|
|
|
|
|
+let domain_name=""
|
|
|
|
|
+let isHk=null;
|
|
|
|
|
+// let new_url=null;
|
|
|
|
|
+// if(window.location.href.includes('localhost') || window.location.href.includes('192.168')){
|
|
|
|
|
+// BaseUrl='https://gpt4.cocorobo.cn/';
|
|
|
|
|
+// new_url='https://appapi.cocorobo.cn';
|
|
|
|
|
+// // new_url='http://127.0.0.1:8000';
|
|
|
|
|
+// //new_url='http://18.208.143.107:8001';
|
|
|
|
|
+// }else{
|
|
|
|
|
+// BaseUrl='//gpt4.cocorobo.cn/';
|
|
|
|
|
+// new_url='https://appapi.cocorobo.cn'
|
|
|
|
|
+// }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if (window.location.href.includes("cocorobo.cn")) {
|
|
if (window.location.href.includes("cocorobo.cn")) {
|
|
|
|
|
+ isHk=false;
|
|
|
document.domain = "cocorobo.cn";
|
|
document.domain = "cocorobo.cn";
|
|
|
- domain_name="cn";
|
|
|
|
|
lang = cn;
|
|
lang = cn;
|
|
|
|
|
+ domain_name="cn";
|
|
|
|
|
+ speech_url="https://beta.cloud.cocorobo.cn/browser/public/index.html";
|
|
|
|
|
+ magic_brush_url="https://real.cocorobo.cn/";
|
|
|
} else if (window.location.href.includes("cocorobo.hk")) {
|
|
} else if (window.location.href.includes("cocorobo.hk")) {
|
|
|
|
|
+ isHk=true;
|
|
|
document.domain = "cocorobo.hk";
|
|
document.domain = "cocorobo.hk";
|
|
|
- domain_name="hk";
|
|
|
|
|
lang = hk;
|
|
lang = hk;
|
|
|
|
|
+ domain_name="hk";
|
|
|
|
|
+ speech_url="https://cloud.cocorobo.hk/browser/public/index.html";
|
|
|
|
|
+ magic_brush_url="https://real.cocorobo.hk/";
|
|
|
} else if (window.location.href.includes("cocorobo.com")) {
|
|
} else if (window.location.href.includes("cocorobo.com")) {
|
|
|
|
|
+ isHk=true;
|
|
|
document.domain = "cocorobo.com";
|
|
document.domain = "cocorobo.com";
|
|
|
- domain_name="com";
|
|
|
|
|
lang=en;
|
|
lang=en;
|
|
|
|
|
+ domain_name="com";
|
|
|
|
|
+ speech_url="https://cloud.cocorobo.hk/browser/public/index.html";
|
|
|
|
|
+ magic_brush_url="https://real.cocorobo.hk/";
|
|
|
}else{
|
|
}else{
|
|
|
- document.domain = "cocorobo.cn";
|
|
|
|
|
- domain_name="cn";
|
|
|
|
|
|
|
+ isHk=false;
|
|
|
lang=cn;
|
|
lang=cn;
|
|
|
|
|
+ domain_name="cn";
|
|
|
|
|
+ speech_url="https://cloud.cocorobo.hk/browser/public/index.html";
|
|
|
|
|
+ magic_brush_url="https://real.cocorobo.hk/";
|
|
|
}
|
|
}
|
|
|
-Vue.prototype.lang =lang;
|
|
|
|
|
-
|
|
|
|
|
-// if(domain_name==='com'){//英文版
|
|
|
|
|
-// Vue.use(ElementUI,{locale})
|
|
|
|
|
-// }else{
|
|
|
|
|
-// Vue.use(ElementUI)
|
|
|
|
|
-// }
|
|
|
|
|
|
|
|
|
|
|
|
+Vue.prototype.lang =lang;
|
|
|
/* eslint-disable no-new */
|
|
/* eslint-disable no-new */
|
|
|
new Vue({
|
|
new Vue({
|
|
|
el: '#app',
|
|
el: '#app',
|
|
@@ -103,7 +126,11 @@ new Vue({
|
|
|
components: { App },
|
|
components: { App },
|
|
|
template: '<App/>'
|
|
template: '<App/>'
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+if(domain_name==='com'){//英文版
|
|
|
|
|
+ Vue.use(ElementUI,{locale})
|
|
|
|
|
+}else{
|
|
|
|
|
+ Vue.use(ElementUI)
|
|
|
|
|
+}
|
|
|
VueCookies.config('30d')
|
|
VueCookies.config('30d')
|
|
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
router.beforeEach((to, from, next) => {
|