clay commit : 解决有三级菜单时面包屑问题
This commit is contained in:
@@ -3,7 +3,7 @@ ENV = 'development'
|
|||||||
|
|
||||||
# EBTS/开发环境
|
# EBTS/开发环境
|
||||||
#VUE_APP_BASE_API = '/dev-api'
|
#VUE_APP_BASE_API = '/dev-api'
|
||||||
VUE_APP_BASE_API = 'http://192.168.101.4:8085/dev-api'
|
VUE_APP_BASE_API = 'http://192.168.101.5:8085/dev-api'
|
||||||
#VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
|
#VUE_APP_BASE_API = 'http://sist.swjtu.edu.cn/dev-api'
|
||||||
SITE_TYPE = 'NEd5n92EMIpyyBslaNqsRgE'
|
SITE_TYPE = 'NEd5n92EMIpyyBslaNqsRgE'
|
||||||
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
#VUE_APP_BASE_API = 'http://sistapi.hchyun.cn/dev-api'
|
||||||
|
|||||||
@@ -102,7 +102,13 @@ export default {
|
|||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
if (month < 10){
|
||||||
|
month = "0"+month
|
||||||
|
}
|
||||||
let day = time.getDate();
|
let day = time.getDate();
|
||||||
|
if (day<10){
|
||||||
|
day = "0"+ day
|
||||||
|
}
|
||||||
return year + "-" + month + "-" + day;
|
return year + "-" + month + "-" + day;
|
||||||
},
|
},
|
||||||
getContext(context) {
|
getContext(context) {
|
||||||
@@ -177,6 +183,7 @@ export default {
|
|||||||
|
|
||||||
.article_name {
|
.article_name {
|
||||||
float: left;
|
float: left;
|
||||||
|
cursor: pointer;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box; //作为弹性伸缩盒子模型显示。
|
display: -webkit-box; //作为弹性伸缩盒子模型显示。
|
||||||
|
|||||||
@@ -217,8 +217,8 @@ export default {
|
|||||||
this.type = this.$route.query && this.$route.query.type
|
this.type = this.$route.query && this.$route.query.type
|
||||||
if (this.type == 3 || this.type == 1 || this.type == 2) {
|
if (this.type == 3 || this.type == 1 || this.type == 2) {
|
||||||
this.secondId = id
|
this.secondId = id
|
||||||
this.getCrumbs();
|
|
||||||
this.showSecond = false
|
this.showSecond = false
|
||||||
|
this.getCrumbs();
|
||||||
let info = getParentNode(this.secondId);
|
let info = getParentNode(this.secondId);
|
||||||
console.log("获取到info", info)
|
console.log("获取到info", info)
|
||||||
if (arcId != undefined) {
|
if (arcId != undefined) {
|
||||||
@@ -232,8 +232,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
console.log(this.navId, "this.navId")
|
console.log(this.navId, "this.navId")
|
||||||
if (undefined == this.navId) {
|
if (undefined == this.navId) {
|
||||||
|
console.log(this.navId, "this.navId1")
|
||||||
this.secondId = id
|
this.secondId = id
|
||||||
this.getNodes()
|
this.getNodes()
|
||||||
|
this.getCrumbs();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.showSecond = true
|
this.showSecond = true
|
||||||
@@ -245,7 +247,10 @@ export default {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
}
|
}
|
||||||
this.showIndex = 0
|
this.showIndex = 0
|
||||||
console.log("开始循环查找id信息")
|
// if (this.secondId!=id){
|
||||||
|
// this.getCrumbs();
|
||||||
|
// }
|
||||||
|
console.log("开始循环查找id信息",this.secondId == id && this.navList,this.secondId , id, this.navList)
|
||||||
if (this.secondId == id && this.navList) {
|
if (this.secondId == id && this.navList) {
|
||||||
for (let i = 0; i < this.navList.length; i++) {
|
for (let i = 0; i < this.navList.length; i++) {
|
||||||
if (this.navId == this.navList[i].encodeId) {
|
if (this.navId == this.navList[i].encodeId) {
|
||||||
@@ -286,7 +291,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 获得面包屑导航
|
* 获得面包屑导航
|
||||||
*/
|
*/
|
||||||
getCrumbs() {
|
getCrumbs(id) {
|
||||||
crumbs(this.secondId).then(res => {
|
crumbs(this.secondId).then(res => {
|
||||||
this.crumbs = res.data
|
this.crumbs = res.data
|
||||||
})
|
})
|
||||||
@@ -593,7 +598,6 @@ export default {
|
|||||||
|
|
||||||
a {
|
a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
font-size: 1.4rem !important;
|
|
||||||
color: #3C3C3C;
|
color: #3C3C3C;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -153,14 +153,26 @@ export default {
|
|||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
if (month < 10){
|
||||||
|
month = "0"+month
|
||||||
|
}
|
||||||
let day = time.getDate();
|
let day = time.getDate();
|
||||||
|
if (day<10){
|
||||||
|
day = "0"+ day
|
||||||
|
}
|
||||||
return year + "-" + month + "-" + day;
|
return year + "-" + month + "-" + day;
|
||||||
},
|
},
|
||||||
|
|
||||||
getMonthTime(date) {
|
getMonthTime(date) {
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
if (month < 10){
|
||||||
|
month = "0"+month
|
||||||
|
}
|
||||||
let day = time.getDate();
|
let day = time.getDate();
|
||||||
|
if (day<10){
|
||||||
|
day = "0"+ day
|
||||||
|
}
|
||||||
return month + "-" + day;
|
return month + "-" + day;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -81,7 +81,13 @@ export default {
|
|||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let year = time.getFullYear();
|
let year = time.getFullYear();
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
if (month < 10){
|
||||||
|
month = "0"+month
|
||||||
|
}
|
||||||
let day = time.getDate();
|
let day = time.getDate();
|
||||||
|
if (day<10){
|
||||||
|
day = "0"+ day
|
||||||
|
}
|
||||||
return year + "-" + month + "-" + day;
|
return year + "-" + month + "-" + day;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -318,7 +324,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.time {
|
.time {
|
||||||
width: 6rem;
|
|
||||||
height: 1.4rem;
|
height: 1.4rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
|
|||||||
@@ -9,12 +9,13 @@
|
|||||||
<span>{{ $t("message.undergraduate_education") }}</span>
|
<span>{{ $t("message.undergraduate_education") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="vline">
|
<div class="vline">
|
||||||
<div class="undergraduate_content" v-for="(item,index) in undergraduateData" :key="index" @click="getArticle(item)">
|
<div class="undergraduate_content" v-for="(item,index) in undergraduateData" :key="index"
|
||||||
|
@click="getArticle(item)">
|
||||||
<div class="undergraduate_content_time">
|
<div class="undergraduate_content_time">
|
||||||
{{getMonthTime(item.publishTime)}}
|
{{ getMonthTime(item.publishTime) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="undergraduate_content_text">
|
<div class="undergraduate_content_text">
|
||||||
{{item.title}}
|
{{ item.title }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="lookMore('KW_T7dJ2lt5sC-RJZSnPtk0')">
|
<div class="more" @click="lookMore('KW_T7dJ2lt5sC-RJZSnPtk0')">
|
||||||
@@ -25,15 +26,17 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
<el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
||||||
<div class="graduate headline">
|
<div class="graduate headline">
|
||||||
<img class="graduate_img" src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png" alt=""/>
|
<img class="graduate_img" src="../../../assets/index/undergraduate_and_graduate/boshimaobeifen.png"
|
||||||
|
alt=""/>
|
||||||
<span>{{ $t("message.postgraduate_education") }}</span>
|
<span>{{ $t("message.postgraduate_education") }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="undergraduate_content" v-for="(item,index) in graduateData" :key="index" @click="getArticle(item)">
|
<div class="undergraduate_content" v-for="(item,index) in graduateData" :key="index"
|
||||||
|
@click="getArticle(item)">
|
||||||
<div class="undergraduate_content_time">
|
<div class="undergraduate_content_time">
|
||||||
{{getMonthTime(item.publishTime)}}
|
{{ getMonthTime(item.publishTime) }}
|
||||||
</div>
|
</div>
|
||||||
<div class="undergraduate_content_text">
|
<div class="undergraduate_content_text">
|
||||||
{{item.title}}
|
{{ item.title }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more" @click="lookMore('1yaM_T4qiBsFULvLXHbMflQ')">
|
<div class="more" @click="lookMore('1yaM_T4qiBsFULvLXHbMflQ')">
|
||||||
@@ -54,10 +57,10 @@ import {lookMoreFixedComment} from "../../../utils/sist";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "undergraduate_and_graduate",
|
name: "undergraduate_and_graduate",
|
||||||
data(){
|
data() {
|
||||||
return{
|
return {
|
||||||
undergraduateData:[],
|
undergraduateData: [],
|
||||||
graduateData:[],
|
graduateData: [],
|
||||||
width: document.documentElement.clientWidth > 992
|
width: document.documentElement.clientWidth > 992
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -97,18 +100,16 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getDateTime(date) {
|
|
||||||
let time = new Date(date);
|
|
||||||
let year = time.getFullYear();
|
|
||||||
let month = time.getMonth() + 1
|
|
||||||
let day = time.getDate();
|
|
||||||
return year + "-" + month + "-" + day;
|
|
||||||
},
|
|
||||||
|
|
||||||
getMonthTime(date) {
|
getMonthTime(date) {
|
||||||
let time = new Date(date);
|
let time = new Date(date);
|
||||||
let month = time.getMonth() + 1
|
let month = time.getMonth() + 1
|
||||||
|
if (month < 10) {
|
||||||
|
month = "0" + month
|
||||||
|
}
|
||||||
let day = time.getDate();
|
let day = time.getDate();
|
||||||
|
if (day < 10) {
|
||||||
|
day = "0" + day
|
||||||
|
}
|
||||||
return month + "-" + day;
|
return month + "-" + day;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -118,9 +119,10 @@ export default {
|
|||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
|
|
||||||
.undergraduate_content{
|
.undergraduate_content {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 960px) {
|
@media screen and (max-width: 960px) {
|
||||||
.undergraduate {
|
.undergraduate {
|
||||||
border-radius: 36px 36px 0 0 !important;
|
border-radius: 36px 36px 0 0 !important;
|
||||||
@@ -129,12 +131,13 @@ export default {
|
|||||||
border-radius: 36px 36px 0 0 !important;
|
border-radius: 36px 36px 0 0 !important;
|
||||||
}
|
}
|
||||||
.more {
|
.more {
|
||||||
justify-content: center!important;
|
justify-content: center !important;
|
||||||
}
|
}
|
||||||
.vline {
|
.vline {
|
||||||
border-right: none!important;
|
border-right: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.undergraduate {
|
.undergraduate {
|
||||||
border-radius: 36px 36px 0 0 !important;
|
border-radius: 36px 36px 0 0 !important;
|
||||||
@@ -143,11 +146,11 @@ export default {
|
|||||||
border-radius: 36px 36px 0 0 !important;
|
border-radius: 36px 36px 0 0 !important;
|
||||||
}
|
}
|
||||||
.more {
|
.more {
|
||||||
justify-content: center!important;
|
justify-content: center !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.vline {
|
.vline {
|
||||||
border-right: none!important;
|
border-right: none !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,10 +196,12 @@ export default {
|
|||||||
|
|
||||||
.undergraduate {
|
.undergraduate {
|
||||||
border-radius: 36px 0 0 0;
|
border-radius: 36px 0 0 0;
|
||||||
&_img{
|
|
||||||
|
&_img {
|
||||||
width: 3.1rem;
|
width: 3.1rem;
|
||||||
height: 3.3rem;
|
height: 3.3rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
&_content {
|
&_content {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-bottom: 1.5rem;
|
margin-bottom: 1.5rem;
|
||||||
@@ -259,7 +264,8 @@ export default {
|
|||||||
|
|
||||||
.graduate {
|
.graduate {
|
||||||
border-radius: 0 36px 0 0;
|
border-radius: 0 36px 0 0;
|
||||||
&_img{
|
|
||||||
|
&_img {
|
||||||
width: 4.3rem;
|
width: 4.3rem;
|
||||||
height: 3.3rem;
|
height: 3.3rem;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user