|
@@ -2,6 +2,7 @@ import Vue from 'vue'
|
|
|
import Router from 'vue-router'
|
|
import Router from 'vue-router'
|
|
|
import ElementUI from 'element-ui'
|
|
import ElementUI from 'element-ui'
|
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
import 'element-ui/lib/theme-chalk/index.css'
|
|
|
|
|
+import locale from 'element-ui/lib/locale/lang/en'
|
|
|
import login from '@/components/login'
|
|
import login from '@/components/login'
|
|
|
import index from '@/components/index'
|
|
import index from '@/components/index'
|
|
|
import indexGM from '@/components/GM/indexGM'
|
|
import indexGM from '@/components/GM/indexGM'
|
|
@@ -39,9 +40,36 @@ import studyStudentTrain from '@/components/trainCourse/studyStudent'
|
|
|
import studyStudentE2Train from '@/components/trainCourse/easy2/studyStudent'
|
|
import studyStudentE2Train from '@/components/trainCourse/easy2/studyStudent'
|
|
|
import studyStudentE3Train from '@/components/trainCourse/easy3/studyStudent'
|
|
import studyStudentE3Train from '@/components/trainCourse/easy3/studyStudent'
|
|
|
import pptEasyClass from '@/components/pptEasyClass'
|
|
import pptEasyClass from '@/components/pptEasyClass'
|
|
|
|
|
+
|
|
|
|
|
+import cn from "../lang/cn.json";
|
|
|
|
|
+import hk from "../lang/hk.json";
|
|
|
|
|
+import en from "../lang/en.json";
|
|
|
|
|
+
|
|
|
// 全局修改默认配置,点击空白处不能关闭弹窗
|
|
// 全局修改默认配置,点击空白处不能关闭弹窗
|
|
|
ElementUI.Dialog.props.closeOnClickModal.default = false
|
|
ElementUI.Dialog.props.closeOnClickModal.default = false
|
|
|
-Vue.use(Router).use(ElementUI)
|
|
|
|
|
|
|
+Vue.use(Router)
|
|
|
|
|
+let lang = new Object();
|
|
|
|
|
+let domain_name = "";
|
|
|
|
|
+
|
|
|
|
|
+if (window.location.href.includes("cocorobo.cn")) {
|
|
|
|
|
+ domain_name="cn";
|
|
|
|
|
+ lang = cn;
|
|
|
|
|
+} else if (window.location.href.includes("cocorobo.hk")) {
|
|
|
|
|
+ domain_name="hk";
|
|
|
|
|
+ lang = hk;
|
|
|
|
|
+} else if (window.location.href.includes("cocorobo.com")) {
|
|
|
|
|
+ domain_name="com";
|
|
|
|
|
+ lang=en;
|
|
|
|
|
+}else{
|
|
|
|
|
+ domain_name="cn";
|
|
|
|
|
+ lang=cn;
|
|
|
|
|
+}
|
|
|
|
|
+Vue.prototype.lang =lang;
|
|
|
|
|
+if(domain_name==='com'){//英文版
|
|
|
|
|
+ Vue.use(ElementUI,{locale})
|
|
|
|
|
+}else{
|
|
|
|
|
+ Vue.use(ElementUI)
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
export default new Router({
|
|
export default new Router({
|
|
|
routes: [
|
|
routes: [
|