@ -62,77 +62,70 @@
< div class = "cover" @click ="toSet(4)" > 点击更换标题与描述 < / div >
< / div >
< div class = "c-wrap" >
< div class = "news-banner" >
< img style = "width: 50%;height: 410px;overflow: hidden;" width = "100%" height = "480"
src = "https://huorantech.com/images/about/5.png" alt = "" >
< div v-if ="articles.length" class="news-banner" >
< img class = "pic" width = "100%" height = "100%" :src ="articles[0].titleImg" alt = "" >
< div class = "right" >
< h6 > IASF is driven to serve the Science and industry , and solve grand challenges through research and
innovation . We are open and creative < / h6 >
< div class = "des" > Innovation centers are distributed in the bay areas , such as the San Francisco Bay
area , the
New York Bay area , and the Tokyo Bay area in Japan . And the Guangdong - Hong Kong - Macao Greater Bay
< / div >
< p class = "meta" > 2022 - 07 - 24 | Research < / p >
< h6 > { { articles [ 0 ] . title } } < / h6 >
< div class = "des" v-html ="articles[0].mainBody" > < / div >
< p class = "meta" > { { articles [ 0 ] . releaseTime } } { { articles [ 0 ] . classificationName && ' | ' +
articles [ 0 ] . classificationName } } < / p >
< / div >
< / div >
< ul class = "news" >
< li >
< img class = "pic" src = "https://huorantech.com/images/about/5.png" alt = "" >
< div class = "texts" >
< p class = "meta" > 2022 - 07 - 24 | 综合新闻 < / p >
< div class = "des" > X射线自由电子激光已经成为了化学 、 生物 、 物理等领域不可或缺的研究手段 < / div >
< img class = "arrow" src = "@/assets/images/arrow.png" alt = "" >
< template v-for ="(item, i) in articles" >
< li v-if ="i" :key ="i" >
< div class = "pic-wrap" >
< img class = "pic" :src ="item.titleImg" alt = "" >
< div class = "pic-cover" > < / div >
< / div >
< / li >
< li >
< img class = "pic" src = "https://huorantech.com/images/about/5.png" alt = "" >
< div class = "texts" >
< p class = "meta" > 2022 - 07 - 24 | 建设进展 < / p >
< div class = "des" > 自由电子激光装置调试及运行过程中提供稳定可靠的单发辐射脉冲纵向信息 < / div >
< img class = "arrow" src = "@/assets/images/arrow.png" alt = "" >
< / div >
< / li >
< li >
< img class = "pic" src = "https://huorantech.com/images/about/5.png" alt = "" >
< div class = "texts" >
< p class = "meta" > 2022 - 07 - 24 | 学术动态 < / p >
< div class = "des" > 基于上海软X射线自由电子激光试验装置 , 科研人员对这一方法进行了实验验证 < / div >
< img class = "arrow" src = "@/assets/images/arrow.png" alt = "" >
< h6 > { { item . title } } < / h6 >
< div class = "des" v-html ="item.mainBody" > < / div >
< p class = "meta" > { { item . releaseTime } } { { item . classificationName && ' | ' +
item . classificationName
} } < / p >
< / div >
< / li >
< / template >
< / ul >
< div class = "cover" @click ="toSet(5)" > 关联栏目 < / div >
< / div >
< ul class = "news-carousel" >
< li >
< img class = "pic" src = "https://huorantech.com/images/about/5 .png" alt = "" >
< li v-if ="articles1.length" >
< img class = "pic" src = "https://huorantech.com/images/iasf/8 .png" alt = "" >
< div class = "texts" >
< h6 > 媒体关注 < / h6 >
< p class = "meta" > 来源人民日报 < / p >
< div class = "des" > 进深圳规划中的深圳中能高重复频率X射线自由电子激光项目和大连极紫外自由电子 < / div >
< p class = "date" > 2022 - 07 - 24 < / p >
< h6 > { { getColumnTitle ( modules [ 6 ] . form ) } } < / h6 >
< div class = "des-wrap" >
< p class = "meta" > { { articles1 [ 0 ] . source } } < / p >
< div class = "des" > { { articles1 [ 0 ] . title } } < / div >
< / div >
< p class = "date" > { { articles1 [ 0 ] . releaseTime } } < / p >
< / div >
< div class = "cover" @click ="toSet(6)" > 关联栏目 < / div >
< / li >
< li >
< img class = "pic" src = "https://huorantech.com/images/about/5 .png" alt = "" >
< li v-if ="articles2.length" >
< img class = "pic" src = "https://huorantech.com/images/iasf/9 .png" alt = "" >
< div class = "texts" >
< h6 > 媒体关注 < / h6 >
< p class = "meta" > 来源人民日报 < / p >
< div class = "des" > 进深圳规划中的深圳中能高重复频率X射线自由电子激光项目和大连极紫外自由电子 < / div >
< p class = "date" > 2022 - 07 - 24 < / p >
< h6 > { { getColumnTitle ( modules [ 7 ] . form ) } } < / h6 >
< div class = "des-wrap" >
< p class = "meta" > { { articles2 [ 0 ] . source } } < / p >
< div class = "des" > { { articles2 [ 0 ] . title } } < / div >
< / div >
< p class = "date" > { { articles2 [ 0 ] . releaseTime } } < / p >
< / div >
< div class = "cover" @click ="toSet(7)" > 关联栏目 < / div >
< / li >
< li >
< img class = "pic" src = "https://huorantech.com/images/about/5 .png" alt = "" >
< li v-if ="articles3.length" >
< img class = "pic" src = "https://huorantech.com/images/iasf/10 .png" alt = "" >
< div class = "texts" >
< h6 > 媒体关注 < / h6 >
< p class = "meta" > 来源人民日报 < / p >
< div class = "des" > 进深圳规划中的深圳中能高重复频率X射线自由电子激光项目和大连极紫外自由电子 < / div >
< p class = "date" > 2022 - 07 - 24 < / p >
< h6 > { { getColumnTitle ( modules [ 8 ] . form ) } } < / h6 >
< div class = "des-wrap" >
< p class = "meta" > { { articles3 [ 0 ] . source } } < / p >
< div class = "des" > { { articles3 [ 0 ] . title } } < / div >
< / div >
< p class = "date" > { { articles3 [ 0 ] . releaseTime } } < / p >
< / div >
< div class = "cover" @click ="toSet(8)" > 关联栏目 < / div >
< / li >
@ -257,18 +250,58 @@
< / template >
< script >
import Util from '@/libs/util'
import mixins from '@/mixins/page'
import Modules from '@/const/modules'
export default {
mixins : [ mixins ] ,
data ( ) {
return {
modules : Modules . iasf
modules : Modules . iasf ,
articles : [ ] ,
articles1 : [ ] ,
articles2 : [ ] ,
articles3 : [ ] ,
articles4 : [ ] ,
}
} ,
mounted ( ) { } ,
methods : {
/ / 获 取 文 章 列 表
async getArticles ( ) {
const json = this . modules
if ( json [ 5 ] . form . column . length ) {
const { column , articleNum } = json [ 5 ] . form
const { data } = await this . $post ( ` ${ this . api . queryArticlesByColumnType } ?columnId= ${ column [ column . length - 1 ] } ` )
this . articles = Util . removeTag ( data . slice ( 0 , articleNum || 4 ) )
}
if ( json [ 6 ] . form . column . length ) {
const { column , articleNum } = json [ 6 ] . form
const { data } = await this . $post ( ` ${ this . api . queryArticlesByColumnType } ?columnId= ${ column [ column . length - 1 ] } ` )
this . articles1 = Util . removeTag ( data . slice ( 0 , articleNum || 4 ) )
}
if ( json [ 7 ] . form . column . length ) {
const { column , articleNum } = json [ 7 ] . form
const { data } = await this . $post ( ` ${ this . api . queryArticlesByColumnType } ?columnId= ${ column [ column . length - 1 ] } ` )
this . articles2 = Util . removeTag ( data . slice ( 0 , articleNum || 4 ) )
}
if ( json [ 8 ] . form . column . length ) {
const { column , articleNum } = json [ 8 ] . form
const { data } = await this . $post ( ` ${ this . api . queryArticlesByColumnType } ?columnId= ${ column [ column . length - 1 ] } ` )
this . articles3 = Util . removeTag ( data . slice ( 0 , articleNum || 4 ) )
}
if ( json [ 10 ] . form . column . length ) {
const { column , articleNum } = json [ 10 ] . form
const { data } = await this . $post ( ` ${ this . api . queryArticlesByColumnType } ?columnId= ${ column [ column . length - 1 ] } ` )
this . articles4 = Util . removeTag ( data . slice ( 0 , articleNum || 3 ) )
}
} ,
moduleSubmit ( ) {
console . log ( 33 , this . modules )
this . getArticles ( )
}
}
} ;
< / script >
@ -393,6 +426,7 @@ export default {
cursor : pointer ;
. pic {
width : 50 % ;
transition : 0.5 s ;
& : hover {
@ -412,7 +446,8 @@ export default {
}
. des {
font - size : 1.02 rem ;
font - size : 18 px ;
line - height : 32 px ;
}
. meta {
@ -457,6 +492,7 @@ export default {
li {
width : calc ( ( 100 % - 18 px ) / 3 ) ;
margin - right : 9 px ;
background - color : # fff ;
& : nth - child ( 3 n ) {
margin - right : 0 ;
@ -492,9 +528,11 @@ export default {
li {
position : relative ;
width : calc ( ( 100 % - 18 px ) / 3 ) ;
height : 320 px ;
margin - right : 9 px ;
width : calc ( ( 100 % - 40 px ) / 3 ) ;
height : 284 px ;
margin - right : 20 px ;
overflow : hidden ;
box - shadow : 0 px 4 px 16 px 0 px rgba ( 0 , 0 , 0 , 0.06 ) ;
& : nth - child ( 3 n ) {
margin - right : 0 ;
@ -504,36 +542,46 @@ export default {
. pic {
width : 100 % ;
height : 100 % ;
transition : 0.5 s ;
object - fit : cover ;
}
. texts {
position : absolute ;
top : 0 ;
left : 0 ;
width : 100 % ;
height : 100 % ;
padding : 50 px 30 px ;
color : # fff ;
background - color : rgba ( 0 , 0 , 0 , 0.3 ) ;
}
h6 {
font - size : 1.2 rem ;
font - family : PingFangSC - Medium , PingFang SC ;
font - size : 24 px ;
cursor : pointer ;
}
. des - wrap {
height : 101 px ;
margin : 11 px 0 25 px ;
}
. meta {
margin : 8 px 0 ;
font - size : 0.9 rem ;
margin - bottom : 16 px ;
font - size : 18 px ;
color : rgba ( 255 , 255 , 255 , 0.86 ) ;
}
. des {
margin - bottom : 8 px ;
font - size : 1 rem ;
font - family : PingFangSC - Medium , PingFang SC ;
font - size : 20 px ;
- webkit - line - clamp : 2 ;
line - height : 30 px ;
cursor : pointer ;
}
. date {
font - size : 0.8 rem ;
font - size : 16 px ;
}
}