11wqe1 il y a 1 semaine
Parent
commit
be6a87c979
1 fichiers modifiés avec 6 ajouts et 9 suppressions
  1. 6 9
      src/main.js

+ 6 - 9
src/main.js

@@ -52,31 +52,23 @@ Vue.prototype.openLoading = function(target) {
 Vue.prototype.$qs = qs
 //注册到vue原型上
 let lang = new Object();
+let domain_name = "";
 
 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({
@@ -85,6 +77,11 @@ new Vue({
     components: { App },
     template: '<App/>'
 })
+if(domain_name==='com'){//英文版
+	Vue.use(ElementUI,{locale})
+}else{
+	Vue.use(ElementUI)
+}
 
 VueCookies.config('30d')