Browse Source

commit in 2.18

小太阳 6 năm trước cách đây
mục cha
commit
415b3a117d

+ 19 - 0
src/App.vue

@@ -66,12 +66,31 @@ export default {
         }
       }
     }
+    // 根据页面的url lang 参数 切换不同语言版本
+    const lang = this.$route.query.lang
+    switch (lang) {
+      case 'en':
+        this.$store.commit('LANGUAGE', lang)
+        break
+      case 'ge':
+        this.$store.commit('LANGUAGE', lang)
+        break
+      default:
+        this.$store.commit('LANGUAGE', 'zh')
+        break
+    }
+
+    console.log(this.$store)
+    console.log(this.$route.query.lang)
   }
 }
 
 </script>
 
 <style>
+  html{
+    min-width: 1024px;
+  }
   body {
     width: 100%;
     height: 100%;

+ 1 - 1
src/components/m-footer/m-footer.vue

@@ -32,7 +32,7 @@ export default {
           p1: 'Tel: +86 400-6698-025',
           p2: '',
           p3: '',
-          p4: '© 2018 CGAII. Alle Rechte vorbehalten.'
+          p4: '© 2019 CGAII. Alle Rechte vorbehalten.'
         }
       }
     }

+ 2 - 1
src/components/wrap-nav/style.css

@@ -13,6 +13,7 @@ a {
   justify-content: space-between;
   align-items: center;
   border-bottom: 1px solid #ccc;
+  min-width: 1024px;
 }
 
 .nav-left {
@@ -286,7 +287,7 @@ a {
     font-size: 29px;
   }
   .nav > div{
-    width: 4.2em!important;
+    width: 3.2em!important;
   }
   .toggle-txt{
     width: 50px;

+ 9 - 5
src/components/wrap-nav/wrap-nav.vue

@@ -1,17 +1,17 @@
 <template>
   <div id='wrap-nav'>
     <div class="nav-left">
-      <img class="logo" @click="navClick(0,{})" alt="666" src="../../../static/images/icon/logo2.svg"/>
+      <img class="logo" @click="navClick(0,{})" alt="666" :src="nowLanguage === 'zh' ? language_logo_zh : language_logo_en"/>
       <!--<object data="../../../static/images/icon/logo2.svg" type="image/svg+xml"></object>-->
     </div>
     <div class="nav-right">
       <div class="nav">
         <div v-for="(subItem, subIndex) in languageStatus" :key="subIndex" :class="{nav_active: subItem.id == activeIndex}"
-             @click="navClick(subItem.id,subItem)" :style="{width:nowLanguage==='zh'?'3.775em':'4.2em'}">
+             @click="navClick(subItem.id,subItem)" :style="{width:nowLanguage==='zh'?'3.2em':'4.1em'}">
           <a class="nav-subItem">
             {{ subItem.name }}
             <ul class="nav-subMenu">
-              <li v-for='(item, index) in subItem.subMenu' :key="index" @click="liIndex=index" :style="{width:nowLanguage==='zh'?'3.775em':'4.2em'}" :class="{li_active: index == liIndex&&subIndex==activeIndex}">
+              <li v-for='(item, index) in subItem.subMenu' :key="index" @click="liIndex=index" :style="{width:nowLanguage==='zh'?'3.2em':'4.1em'}" :class="{li_active: index == liIndex&&subIndex==activeIndex}">
                 <router-link :style="{fontSize:nowLanguage==='zh'?'0.4em':'0.3em'}" :to="item.hash"><div v-html="item.title"></div></router-link>
                 <span></span>
               </li>
@@ -71,6 +71,8 @@ export default {
       logo: 'http://video.cgaii.com/images/icon/logo.png',
       language_en: 'http://video.cgaii.com/images/icon/language_en.png',
       language_zh: 'http://video.cgaii.com/images/icon/language_zh.png',
+      language_logo_en: 'http://video.cgaii.com/images/cgaiien.svg',
+      language_logo_zh: 'http://video.cgaii.com/images/cgaiizh.svg',
       object: {
         Zh: [
           {name: '首页', id: 0, url: '/index'},
@@ -246,14 +248,16 @@ export default {
     languageStatus: function () {
       switch (this.$store.state.lang) {
         case 'zh':
+          this.activeLang = txtArr[0].name
           return this.object.Zh
         case 'ge':
+          this.activeLang = txtArr[2].name
           return this.object.Ge
-
         case 'en':
+          this.activeLang = txtArr[1].name
           return this.object.En
-
         default:
+          this.activeLang = txtArr[0].name
           return this.object.Zh
       }
     },