|
@@ -27,6 +27,10 @@ import VueAudio from 'vue-audio-better'
|
|
|
|
|
|
const echarts = require('echarts');
|
|
|
|
|
|
+import cn from "./lang/cn.json";
|
|
|
+import hk from "./lang/hk.json";
|
|
|
+import en from "./lang/en.json";
|
|
|
+
|
|
|
//
|
|
|
Vue.use(VideoPlayer).use(VueAudio).use(VueCookies).use(Viewer).use(hevueImgPreview, {
|
|
|
clickMaskCLose: true
|
|
@@ -64,6 +68,33 @@ Viewer.setDefaults({
|
|
|
'fullscreen': false, //播放时是否全屏
|
|
|
'keyboard': true, //
|
|
|
})
|
|
|
+//注册到vue原型上
|
|
|
+let lang = new Object();
|
|
|
+
|
|
|
+if (window.location.href.includes("cocorobo.cn")) {
|
|
|
+ document.domain = "cocorobo.cn";
|
|
|
+ domain_name="cn";
|
|
|
+ lang = cn;
|
|
|
+} else if (window.location.href.includes("cocorobo.hk")) {
|
|
|
+ document.domain = "cocorobo.hk";
|
|
|
+ domain_name="hk";
|
|
|
+ lang = hk;
|
|
|
+} else if (window.location.href.includes("cocorobo.com")) {
|
|
|
+ document.domain = "cocorobo.com";
|
|
|
+ domain_name="com";
|
|
|
+ lang=en;
|
|
|
+}else{
|
|
|
+ document.domain = "cocorobo.cn";
|
|
|
+ domain_name="cn";
|
|
|
+ lang=cn;
|
|
|
+}
|
|
|
+Vue.prototype.lang =lang;
|
|
|
+
|
|
|
+// if(domain_name==='com'){//英文版
|
|
|
+// Vue.use(ElementUI,{locale})
|
|
|
+// }else{
|
|
|
+// Vue.use(ElementUI)
|
|
|
+// }
|
|
|
|
|
|
/* eslint-disable no-new */
|
|
|
new Vue({
|