clay commit : 小修改
This commit is contained in:
@@ -57,7 +57,7 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="11">
|
||||
<div class="academy_content" @click="getArticle(sciencesData[1])">
|
||||
<div class="academy_content" @click="getArticle(sciencesData[2])">
|
||||
<div class="academy_content_icontime">
|
||||
<div class="img"></div>
|
||||
<span>{{getDateTime(sciencesData[2].publishTime)}}</span>
|
||||
@@ -74,7 +74,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="11">
|
||||
<div class="academy_content" @click="getArticle(sciencesData[1])">
|
||||
<div class="academy_content" @click="getArticle(sciencesData[3])">
|
||||
<div class="academy_content_icontime">
|
||||
<!-- <img :src="src" alt="">-->
|
||||
<div class="img"></div>
|
||||
@@ -121,7 +121,7 @@ export default {
|
||||
methods: {
|
||||
clickTo(link) {
|
||||
//console.log(link)
|
||||
window.location.href = link;//当前标签页
|
||||
window.location.href = window.location.origin + link; //当前标签页
|
||||
},
|
||||
getArticle(news) {
|
||||
toArticle(news, this.width);
|
||||
@@ -150,6 +150,9 @@ export default {
|
||||
},
|
||||
|
||||
getDateTime(date) {
|
||||
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||
date = date.replace(/-/g,'/');
|
||||
}
|
||||
let time = new Date(date);
|
||||
let year = time.getFullYear();
|
||||
let month = time.getMonth() + 1
|
||||
@@ -164,6 +167,9 @@ export default {
|
||||
},
|
||||
|
||||
getMonthTime(date) {
|
||||
if(typeof(date) == "string" && date.indexOf('-') != -1){
|
||||
date = date.replace(/-/g,'/');
|
||||
}
|
||||
let time = new Date(date);
|
||||
let month = time.getMonth() + 1
|
||||
if (month < 10){
|
||||
|
||||
Reference in New Issue
Block a user