11
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
import headers from './views/header/index'
|
||||
import MobileHerder from './views/header/mobile_herder'
|
||||
import footers from './views/footer/index'
|
||||
import {setAppLanguage} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@@ -31,9 +32,13 @@ export default {
|
||||
return {
|
||||
iftop: false,
|
||||
timer : true,
|
||||
lang:'cn',
|
||||
width: document.documentElement.clientWidth >= 992
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setAppLanguage(this)
|
||||
},
|
||||
mounted() { //监听scroll方法
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 35 KiB After Width: | Height: | Size: 27 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 81 KiB After Width: | Height: | Size: 67 KiB |
@@ -5,10 +5,12 @@ import VueI18n from 'vue-i18n'
|
||||
import messages from './langs'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
const i18n = new VueI18n({
|
||||
locale: localStorage.lang || 'cn',
|
||||
messages
|
||||
})
|
||||
|
||||
locale.i18n((key, value) => i18n.t(key, value)) //重点:为了实现element插件的多语言切换
|
||||
|
||||
export default i18n
|
||||
|
||||
@@ -6,7 +6,11 @@ import i18n from './i18n/i18n'
|
||||
import ElementUI from 'element-ui';
|
||||
import 'element-ui/lib/theme-chalk/index.css';
|
||||
import 'element-ui/lib/theme-chalk/display.css';
|
||||
import en from 'element-ui/lib/locale/lang/en'
|
||||
import cn from 'element-ui/lib/locale/lang/zh-CN'
|
||||
|
||||
i18n.mergeLocaleMessage('en', en)
|
||||
i18n.mergeLocaleMessage('zh', cn)
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(ElementUI)
|
||||
@@ -32,6 +36,9 @@ const store = new Vuex.Store({
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
new Vue({
|
||||
i18n,
|
||||
router,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import axios from 'axios'
|
||||
import {Notification, Message} from 'element-ui'
|
||||
import errorCode from '@/utils/errorCode'
|
||||
import {setAppLanguage} from "@/utils/sist";
|
||||
|
||||
|
||||
//todo 显示消息处理
|
||||
@@ -16,6 +17,8 @@ const service = axios.create({
|
||||
service.interceptors.request.use(config => {
|
||||
if (config.method == 'post') {
|
||||
config.data['sitetype'] = 'NEd5n92EMIpyyBslaNqsRgE';
|
||||
let lang = sessionStorage.getItem("lang");
|
||||
config.data['lang'] = lang;
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
|
||||
@@ -39,3 +39,30 @@ export function getParentNode(id) {
|
||||
}
|
||||
}
|
||||
|
||||
export function setAppLanguage(that){
|
||||
let lang = sessionStorage.getItem("lang");
|
||||
if (lang != null){
|
||||
that.$i18n.locale = lang
|
||||
return
|
||||
}
|
||||
var language = window.navigator.userLanguage || window.navigator.language;
|
||||
if (language == 'zh-CN'){
|
||||
lang = 'cn'
|
||||
}else {
|
||||
lang = 'en'
|
||||
}
|
||||
that.$i18n.locale = lang
|
||||
sessionStorage.setItem("lang",lang)
|
||||
}
|
||||
export function setLanguage(that){
|
||||
let lang = that.$route.query && that.$route.query.lang
|
||||
if (lang != undefined){
|
||||
that.$i18n.locale = lang
|
||||
sessionStorage.setItem("lang",lang)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
<template>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
created() {
|
||||
this.$router.push("/home");
|
||||
|
||||
this.$router.push("/home?lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -70,7 +70,7 @@ export default {
|
||||
// mousewheel事件中的 “event.wheelDelta” 属性值:返回的如果是正值说明滚轮是向上滚动
|
||||
// DOMMouseScroll事件中的 “event.detail” 属性值:返回的如果是负值说明滚轮是向上滚动
|
||||
let delta = event.detail || (-event.wheelDelta);
|
||||
console.log(delta)
|
||||
//console.log(delta)
|
||||
// 如果当前滚动开始时间和上次滚动结束时间的差值小于1.5s,则不执行翻页动作,这样做是为了实现类似节流的效果
|
||||
if ((this.startTime - this.endTime) > 1) {
|
||||
if (delta > 0 && window.pageYOffset < window.innerHeight) {
|
||||
|
||||
@@ -103,9 +103,9 @@ export default {
|
||||
router="/" +this.value.navId+"?id="+context.id
|
||||
}
|
||||
if (this.width <=992){
|
||||
this.$router.push("/mobile/" + this.value.secondId +router);
|
||||
this.$router.push("/mobile/" + this.value.secondId +router+"?lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/pc/" + this.value.secondId +router);
|
||||
this.$router.push("/pc/" + this.value.secondId +router+"?lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<el-row>
|
||||
<el-col>
|
||||
<div class="tab">
|
||||
<router-link to="/">{{ $t('message.home') }}</router-link>
|
||||
<router-link to="/home">{{ $t('message.home') }}</router-link>
|
||||
<span> > </span>
|
||||
<router-link to="">
|
||||
<span v-if="$i18n.locale === 'cn'">{{ crumbs.one.title }}</span>
|
||||
@@ -128,7 +128,7 @@ import DireData from './components/dire_data.vue'
|
||||
import Details from './components/details.vue'
|
||||
import FileList from './components/file_list.vue'
|
||||
import {handleTree} from "@/utils/ebts";
|
||||
import {getParentNode} from "@/utils/sist";
|
||||
import {getParentNode, setLanguage} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
@@ -166,7 +166,6 @@ export default {
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
let id = this.$route.params && this.$route.params.secondId
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
console.log("触发了 $route")
|
||||
if (this.type == 3 || this.type == 1 || this.type == 2) {
|
||||
this.secondId = id
|
||||
this.showSecond = false
|
||||
@@ -203,6 +202,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setLanguage(this)
|
||||
this.secondId = this.$route.params && this.$route.params.secondId;
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
@@ -312,7 +312,7 @@ export default {
|
||||
//if (index != this.showIndex) {
|
||||
this.showIndex = index
|
||||
this.type = nav.type
|
||||
this.$router.push("/pc/" + this.secondId + "/" + nav.encodeId);
|
||||
this.$router.push("/pc/" + this.secondId + "/" + nav.encodeId+"?lang="+sessionStorage.getItem("lang"));
|
||||
//this.getContent(nav)
|
||||
//}
|
||||
}
|
||||
|
||||
@@ -47,10 +47,10 @@
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :md="24" :lg="19" :xl="19">
|
||||
<div class="banner">
|
||||
<router-link to="/">
|
||||
<router-link to="/home">
|
||||
<div class="link_text">
|
||||
<div v-show="!english" style="padding: 0 1.1rem;" class="link_text_title">学院首页</div>
|
||||
<div v-show="english" style="padding: 0 .9rem" class="link_text_title">Home</div>
|
||||
<div v-show="$i18n.locale === 'cn'" style="padding: 0 1.1rem;" class="link_text_title">学院首页</div>
|
||||
<div v-show="$i18n.locale === 'en'" style="padding: 0 .9rem" class="link_text_title">Home</div>
|
||||
</div>
|
||||
</router-link>
|
||||
|
||||
@@ -58,16 +58,16 @@
|
||||
<a>
|
||||
<div class="link_text">
|
||||
<div class="link_text_title">
|
||||
<span style="padding: 0 1.1rem;" v-show="!english">{{ menu.title }}</span>
|
||||
<span style="padding: 0 .9rem" v-show="english">{{ menu.englishTitle }}</span>
|
||||
<span style="padding: 0 1.1rem;" v-show="$i18n.locale === 'cn'">{{ menu.title }}</span>
|
||||
<span style="padding: 0 .9rem" v-show="$i18n.locale === 'en'">{{ menu.englishTitle }}</span>
|
||||
|
||||
<div class="secondary">
|
||||
<ul style="text-align:left;">
|
||||
<li class="menu_list" v-for="(item,i) in menu.children" :key="i" @click="menuCut(item)">
|
||||
<div class="menu_suffix">
|
||||
<div>
|
||||
<span v-show="!english">{{ item.title }}</span>
|
||||
<span v-show="english">{{ item.englishTitle }}</span>
|
||||
<span v-show="$i18n.locale === 'cn'">{{ item.title }}</span>
|
||||
<span v-show="$i18n.locale === 'en'">{{ item.englishTitle }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@@ -115,27 +115,22 @@ export default {
|
||||
sessionStorage.setItem("menu", JSON.stringify(res.data))
|
||||
})
|
||||
}
|
||||
//this.$router.push("/" + menu.encodeId);
|
||||
//}
|
||||
},
|
||||
methods: {
|
||||
menuCut(menu) {
|
||||
console.log(menu)
|
||||
this.$router.push("/pc/" + menu.encodeId + "?type=" + menu.type);
|
||||
this.$router.push("/pc/" + menu.encodeId + "?type=" + menu.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
},
|
||||
switchLang() {
|
||||
let lang = ''
|
||||
if (this.$i18n.locale === 'en') {
|
||||
lang = 'cn'
|
||||
|
||||
this.english = false;
|
||||
this.$store.state.isEnglish = this.english
|
||||
} else {
|
||||
lang = 'en'
|
||||
this.english = true;
|
||||
this.$store.state.isEnglish = this.english
|
||||
}
|
||||
this.$i18n.locale = lang;
|
||||
sessionStorage.setItem("lang",lang)
|
||||
let fullPath = this.$route.fullPath
|
||||
window.location.replace(fullPath.substr(0,fullPath.length-2)+lang)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,11 +205,7 @@ export default {
|
||||
clear: left;
|
||||
|
||||
.link_text {
|
||||
//width: 9%;
|
||||
height: 100%;
|
||||
//line-height: 8.2rem;
|
||||
//padding: 0 .9rem;
|
||||
//padding: 0 1.1rem;
|
||||
text-align: center;
|
||||
float: left;
|
||||
font-size: 1.4rem;
|
||||
@@ -222,7 +213,6 @@ export default {
|
||||
font-weight: 400;
|
||||
color: #FFFFFF;
|
||||
cursor: pointer;
|
||||
//position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
@@ -25,28 +25,28 @@
|
||||
class="el-menu-vertical-demo"
|
||||
@open="handleOpen"
|
||||
@close="handleClose">
|
||||
<el-menu-item index="1">
|
||||
<span slot="title">学院首页</span>
|
||||
<el-menu-item index="1" @click="home">
|
||||
<span slot="title">{{ $t('message.home') }}</span>
|
||||
</el-menu-item>
|
||||
<el-submenu :index="menuIndex+2" v-for="(menu,menuIndex) in menuData" :key="menuIndex">
|
||||
<template slot="title" >
|
||||
<span v-if="!english">{{ menu.title }}</span>
|
||||
<span v-if="english">{{ menu.title }}</span>
|
||||
<span v-if="$i18n.locale === 'cn'">{{ menu.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ menu.englishTitle }}</span>
|
||||
</template>
|
||||
<el-submenu :index="menuIndex +'-'+itemIndex" v-for="(item,itemIndex) in menu.children" :key="itemIndex" >
|
||||
|
||||
<template slot="title" v-if="item.children.length == 0 && !english">
|
||||
<template slot="title" v-if="item.children.length == 0 && $i18n.locale === 'cn'">
|
||||
<span @click="clickSecondMenu(item)">{{item.title}}</span>
|
||||
</template>
|
||||
<template slot="title" v-if="item.children.length == 0&& english">
|
||||
<template slot="title" v-if="item.children.length == 0&& $i18n.locale === 'en'">
|
||||
<span @click="clickSecondMenu(item)">{{item.englishTitle}}</span>
|
||||
</template>
|
||||
|
||||
<template slot="title" v-if="item.children.length > 0 &&!english " >{{item.title}}</template>
|
||||
<template slot="title" v-if="item.children.length > 0 && english" >{{item.englishTitle}}</template>
|
||||
<template slot="title" v-if="item.children.length > 0 &&$i18n.locale === 'cn' " >{{item.title}}</template>
|
||||
<template slot="title" v-if="item.children.length > 0 && $i18n.locale === 'en'" >{{item.englishTitle}}</template>
|
||||
<el-menu-item v-for="(chile ,chileIndex) in item.children" :key="chileIndex" :index="menuIndex +'-'+itemIndex +'-' +chileIndex" @click="clickMenu(chile,item)">
|
||||
<span v-if="!english">{{ chile.title }}</span>
|
||||
<span v-if="english">{{ chile.title }}</span>
|
||||
<span v-if="$i18n.locale === 'cn'">{{ chile.title }}</span>
|
||||
<span v-if="$i18n.locale === 'en'">{{ chile.englishTitle }}</span>
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</el-submenu>
|
||||
@@ -67,7 +67,6 @@ export default {
|
||||
return {
|
||||
drawer: false,
|
||||
direction: 'ltr',
|
||||
english : false,
|
||||
mobile:document.documentElement.clientWidth <=992,
|
||||
menuData:[],
|
||||
};
|
||||
@@ -81,25 +80,28 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
home(){
|
||||
this.$router.push("/home?lang="+sessionStorage.getItem("lang"))
|
||||
},
|
||||
clickSecondMenu(menu){
|
||||
this.drawer = false
|
||||
this.$router.push("/mobile/" +menu.encodeId+"?type="+menu.type);
|
||||
this.$router.push("/mobile/" +menu.encodeId+"?type="+menu.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
|
||||
},
|
||||
clickMenu(menu,parent){
|
||||
this.drawer = false
|
||||
this.$router.push("/mobile/" +parent.encodeId+"/"+menu.encodeId);
|
||||
this.$router.push("/mobile/" +parent.encodeId+"/"+menu.encodeId+"&lang="+sessionStorage.getItem("lang"));
|
||||
},
|
||||
switchLang() {
|
||||
let lang = ''
|
||||
if (this.$i18n.locale === 'en') {
|
||||
lang = 'cn'
|
||||
this.english = false;
|
||||
} else {
|
||||
this.english = true;
|
||||
lang = 'en'
|
||||
}
|
||||
this.$i18n.locale = lang;
|
||||
sessionStorage.setItem("lang",lang)
|
||||
let fullPath = this.$route.fullPath
|
||||
window.location.replace(fullPath.substr(0,fullPath.length-2)+lang)
|
||||
},
|
||||
handleOpen(key, keyPath) {
|
||||
console.log(key, keyPath);
|
||||
|
||||
@@ -1,30 +1,5 @@
|
||||
<template>
|
||||
<div class="news_center">
|
||||
<!--title
|
||||
<el-row>
|
||||
<el-col :xs="1" :sm="2" :md="4" :lg="6" :xl="6">
|
||||
<div class="grid-content"></div>
|
||||
</el-col>
|
||||
<el-col class="headline" :xs="22" :sm="20" :md="16" :lg="12" :xl="12">
|
||||
<div class="title">
|
||||
{{ $t('message.news_center') }}
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="9">
|
||||
<hr class="hr">
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<div class="divider_text">News Center</div>
|
||||
</el-col>
|
||||
<el-col :span="9">
|
||||
<hr class="hr">
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-col>
|
||||
</el-row>-->
|
||||
<!--title-->
|
||||
|
||||
|
||||
<div class="headline">
|
||||
<div class="hr_div">
|
||||
<div class="hr_line_left">
|
||||
@@ -52,8 +27,8 @@
|
||||
<el-col :xs="22" :sm="20" :md="20" :lg="18" :xl="14">
|
||||
<div class="slideshow">
|
||||
<el-carousel trigger="click" height="23.3vw">
|
||||
<el-carousel-item v-for="(item,index) in bannerDate" :key="index" @click="clickTo(item.link)">
|
||||
<div>
|
||||
<el-carousel-item v-for="(item,index) in bannerDate" :key="index">
|
||||
<div v-show="$i18n.locale === 'cn'" @click="clickTo(item.link)">
|
||||
<img :src="item.imgurl" alt="">
|
||||
<div class="bottom_title">
|
||||
<el-row>
|
||||
@@ -63,6 +38,16 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="$i18n.locale === 'en'" @click="clickTo(item.enLink)">
|
||||
<img :src="item.imgurl" alt="">
|
||||
<div class="bottom_title">
|
||||
<el-row>
|
||||
<el-col :offset="2" :span="18">
|
||||
{{ item.enTitle }}
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</div>
|
||||
@@ -125,25 +110,25 @@ export default {
|
||||
this.getBanner()
|
||||
},
|
||||
methods: {
|
||||
clickTo(link){
|
||||
clickTo(link) {
|
||||
//console.log(link)
|
||||
window.location.href=link;//当前标签页
|
||||
window.location.href = link;//当前标签页
|
||||
},
|
||||
lookMore(news){
|
||||
info(news.id).then(res=>{
|
||||
lookMore(news) {
|
||||
info(news.id).then(res => {
|
||||
let info = getParentNode(res.data.encodeId)
|
||||
console.log(res)
|
||||
if (info.three ==null){
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
if (info.three == null) {
|
||||
if (this.width) {
|
||||
this.$router.push("/pc/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
} else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
}
|
||||
}else {
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
} else {
|
||||
if (this.width) {
|
||||
this.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
} else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type + "&lang=" + sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -161,9 +146,9 @@ export default {
|
||||
info(news.id).then(res => {
|
||||
let info = getParentNode(res.data.encodeId)
|
||||
if (this.width) {
|
||||
this.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id);
|
||||
this.$router.push("/pc/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
|
||||
} else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id);
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?id=" + news.id + "&lang=" + sessionStorage.getItem("lang"));
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -176,7 +161,7 @@ export default {
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.el-carousel__indicators{
|
||||
.el-carousel__indicators {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
@@ -231,7 +216,8 @@ export default {
|
||||
border: 0.1rem solid #CAD9F3;
|
||||
|
||||
.news_context_img {
|
||||
height: 14rem;
|
||||
height: 62%;
|
||||
width: 100%;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
@@ -239,18 +225,19 @@ export default {
|
||||
}
|
||||
|
||||
.news_context_text {
|
||||
font-size: 1.6rem;
|
||||
font-family: "微软雅黑";
|
||||
font-weight: 400;
|
||||
color: #262626;
|
||||
margin: 1rem auto;
|
||||
height: 28%;
|
||||
width: 80%;
|
||||
//height: 4rem;
|
||||
overflow: hidden; //超出的文本隐藏
|
||||
text-overflow: ellipsis; //溢出用省略号显示
|
||||
display: -webkit-box; //作为弹性伸缩盒子模型显示。
|
||||
-webkit-box-orient: vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
|
||||
-webkit-line-clamp: 3; //显示的行
|
||||
font-size: 1.6rem;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
color: #262626;
|
||||
margin: 0 auto;
|
||||
padding: 1rem 0;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
display:-webkit-box; //作为弹性伸缩盒子模型显示。
|
||||
-webkit-box-orient:vertical; //设置伸缩盒子的子元素排列方式--从上到下垂直排列
|
||||
-webkit-line-clamp:3; //显示的行
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,15 +138,15 @@ export default {
|
||||
console.log(res)
|
||||
if (info.three ==null){
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}else {
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -175,15 +175,15 @@ export default {
|
||||
console.log(res)
|
||||
if (info.three ==null){
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}else {
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -204,15 +204,15 @@ export default {
|
||||
console.log(info)
|
||||
if (info.three == null){
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}else {
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<template>
|
||||
<div class="banner-card">
|
||||
<ul class="ul">
|
||||
<li v-for="(item,index) in bannerDate" :key="index" @click="clickTo(item.link)">
|
||||
<div class="card_img">
|
||||
<li v-for="(item,index) in bannerDate" :key="index">
|
||||
<div v-if="$i18n.locale === 'cn'" @click="clickTo(item.link)">
|
||||
<div class="card_img" >
|
||||
<img
|
||||
:src="item.imgurl"
|
||||
alt=""/>
|
||||
@@ -10,6 +11,17 @@
|
||||
<div class="card_title">
|
||||
{{item.title}}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="$i18n.locale === 'en'" @click="clickTo(item.enLink)">
|
||||
<div class="card_img" >
|
||||
<img
|
||||
:src="item.imgurl"
|
||||
alt=""/>
|
||||
</div>
|
||||
<div class="card_title">
|
||||
{{item.enTitle}}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<div class="left-btn">
|
||||
|
||||
@@ -98,15 +98,15 @@ export default {
|
||||
console.log(res)
|
||||
if (info.three ==null){
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}else {
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" + info.three.encodeId + "?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId + "/" + info.three.encodeId + "?type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -130,15 +130,15 @@ export default {
|
||||
console.log(info)
|
||||
if (info.three == null){
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"?id="+news.id + "&type=" + info.second.type+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}else {
|
||||
if (this.width){
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
|
||||
this.$router.push("/pc/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id+"&lang="+sessionStorage.getItem("lang"));
|
||||
}else {
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id);
|
||||
this.$router.push("/mobile/" + info.second.encodeId +"/" +info.three.encodeId+"?id="+news.id+"&lang="+sessionStorage.getItem("lang"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ import SlideshowCard from './components/slideshow_card.vue'
|
||||
import TeachingStudent from './components/teaching_student.vue'
|
||||
import Bottom from './components/bottom.vue'
|
||||
import {getConfig} from "@/api";
|
||||
import {setAppLanguage, setLanguage} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
@@ -71,6 +72,7 @@ export default {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
created() {
|
||||
setLanguage(this)
|
||||
getConfig("sist_bg").then(res=>{
|
||||
this.imageUrl = res.data
|
||||
})
|
||||
@@ -92,7 +94,6 @@ export default {
|
||||
methods: {
|
||||
handleScroll() {
|
||||
this.iftop = window.pageYOffset > 400
|
||||
console.log(window.pageYOffset)
|
||||
this.$emit("input", window.pageYOffset)
|
||||
},
|
||||
backTop() {
|
||||
|
||||
@@ -57,7 +57,7 @@ import DireData from '@/views/content/components/dire_data.vue'
|
||||
import Details from '@/views/content/components/details.vue'
|
||||
import FileList from '@/views/content/components/file_list.vue'
|
||||
import {handleTree} from "@/utils/ebts";
|
||||
import {getParentNode} from "@/utils/sist";
|
||||
import {getParentNode, setLanguage} from "@/utils/sist";
|
||||
|
||||
export default {
|
||||
name: "index",
|
||||
@@ -115,13 +115,13 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setLanguage(this)
|
||||
this.secondId = this.$route.params && this.$route.params.secondId;
|
||||
this.navId = this.$route.params && this.$route.params.navId;
|
||||
this.type = this.$route.query && this.$route.query.type
|
||||
setTimeout(() => {
|
||||
this.init()
|
||||
}, 200);
|
||||
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
|
||||
Reference in New Issue
Block a user