<template>
  <div class="content">
    <lucency-header :lang="lang" page-key="news" :is-phone="isPhone"/>
    <item-banner :title="'合方圆'" :sub-title="'专致执着，追求无限卓越'"></item-banner>

    <showing-ad :lang="lang"/>
    <default-footer :lang="lang"/>

    <site-bar></site-bar>
  </div>

</template>

<script>
import langMap from "@/map/langMap";
import {isMediaView} from "@/until/mediaView";

export default {
  name: "adIndex",
  props:['uLang'],
  data(){
    return {
      langType: langMap.lang,
      lang: this.uLang?this.uLang:langMap.lang.cn,
      isPhone: false,
    }
  },
  mounted() {
    this.$root.$on('changeLang',this.switchLang)
    this.isPhone = isMediaView(0,1024);
  },
  methods:{
    getLangText(str) {
      return langMap.getText(this.lang, str);
    },
    getAbbrText(str) {
      return langMap.getAbbrText(this.lang, str);
    },
    switchLang(nextLang){
      // console.log("11111111111111111")
      if(nextLang){
        this.lang = nextLang;
      }else{
        if(this.lang === langMap.lang.cn){
          this.lang = langMap.lang.en
        }else{
          this.lang = langMap.lang.cn
        }
      }
    },
  }
}
</script>

<style scoped>

</style>
