123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <template>
- <div class="listNewsBox">
- <div class="listNewsTitle" v-if="skinId==1">
- <NuxtLink
- v-if="titleLink.cid"
- :href="getLinkPath(titleLink)"
- :title="titleLink.alias"
- >
- {{titleLink.alias}}
- </NuxtLink>
- </div>
- <div class="listNewsTitle_skin2" v-if="skinId==2">
- <span>
- <NuxtLink
- v-if="titleLink.cid"
- :href="getLinkPath(titleLink)"
- :title="titleLink.alias"
- >
- {{titleLink.alias}}
- </NuxtLink>
- </span>
- </div>
- <div class="listNewsContent">
- <div class="listNewsContentLeft">
- <div class="listNewsImgNewsBox">
- <div v-for="item in component_style1_News1Array" class="listNewsImgNewsItem">
- <NuxtLink
- :href="getLinkPathDetail(item)"
- :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'"
- >
- <img :src="item.imgurl" />
- <div class="listNewsImgNewsItemContent">
- <div class="listNewsImgNewsItemTitle">
- {{ item.title }}
- </div>
- </div>
- </NuxtLink>
- </div>
- </div>
- <div class="listNewsImgNewsUl">
- <div class="listNewsImgNewsLi" v-for="item in component_style1_News3">
- <NuxtLink
- :href="getLinkPathDetail(item)"
- :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'"
- >
- <div class="listNewsImgNewsMark" v-if="skinId==1">
- <div>重 点</div>
- <div>关 注</div>
- </div>
- <div class="listNewsImgNewsMark_skin2" v-if="skinId==2">
- <div>重 点</div>
- <div>关 注</div>
- </div>
- <div class="listNewsImgNewsTitle">{{ item.title }}</div>
- </NuxtLink>
- </div>
- </div>
- </div>
- <div class="listNewsContentRight">
- <div class="listNewsImgNewsBox">
- <div v-for="item in component_style1_News1Array_2" class="listNewsImgNewsItem">
- <NuxtLink
- :href="getLinkPathDetail(item)"
- :title="item.title"
- :target="item.islink == 1 ? '_blank' : '_self'"
- >
- <img :src="item.imgurl" />
- <div class="listNewsImgNewsItemContent">
- <div class="listNewsImgNewsItemTitle">
- {{ item.title }}
- </div>
- </div>
- </NuxtLink>
- </div>
- </div>
- <div class="adBox">
- <!-- 广告模块 -->
- <a href="http://nzgxw.org.cn/" v-if="templateAdData.image_url==null" target="_blank" :title="templateAdData.introduce">
- <img :src="templateAdData.thumb" :alt="templateAdData.introduce" :id="templateAdData.ad_tag" data-tag="templateAdData.ad_tag">
- </a>
- <a :href="templateAdData.image_url" v-else :title="templateAdData.introduce">
- <img :src="templateAdData.image_src" :alt="templateAdData.introduce" :id="templateAdData.ad_tag" data-tag="templateAdData.ad_tag">
- </a>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script setup>
- //引入vue
- import {ref} from 'vue';
- //获得新闻数据
- const props = defineProps({
- titleLink:Object,//板块名称
- templateData:Array,//新闻数据
- skinId:String,//皮肤id
- templateAdData:Object,//广告
- });
- //样式1与样式2共用 start ---------------------------------------->
- const component_style1_News1Array = ref({});
- component_style1_News1Array.value = props.templateData.img.slice(0,2);
- const component_style1_News1Array_2 = ref({});
- component_style1_News1Array_2.value = props.templateData.img.slice(2,3);
- const component_style1_News3 = ref({});
- component_style1_News3.value = props.templateData.text.slice(0,4);
- //样式1与样式2共用 end ---------------------------------------->
- </script>
- <style lang="less" scoped>
- .listNewsBox {
- width: 1200px;
- height: 480px;
- position: relative;
- .listNewsTitle {
- font-size:22px;
- font-weight:bold;
- height: 40px;
- line-height: 40px;
- border-bottom: 2px solid #004564;
- color:#004564;
- margin-bottom: 20px;
- box-sizing: border-box;
- a {
- color:#004564;
- display: block;
- height: 25px;
- line-height: 25px;
- }
- }
- .listNewsTitle_skin2 {
- font-size:22px;
- font-weight:bold;
- height: 40px;
- line-height: 40px;
- border-bottom: 2px solid #A91B33;
- color:#A91B33;
- margin-bottom: 20px;
- box-sizing: border-box;
- a {
- color:#A91B33;
- display: block;
- height: 25px;
- line-height: 25px;
- }
- span {
- color:#A91B33;
- height: 25px;
- line-height: 25px;
- border-left: 3px solid #A91B33;
- padding-left: 12px;
- display: block;
- }
- }
- .listNewsContent {
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- .listNewsContentLeft {
- width: 720px;
- height: 420px;
- .listNewsImgNewsBox {
- width: 720px;
- height: 110px;
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- margin-bottom: 20px;
- .listNewsImgNewsItem {
- a {
- display: flex;
- height: 110px;
- width: 350px;
- background: #F9FAFB;
- align-items: flex-start;
- justify-content: space-between;
- }
- .listNewsImgNewsItemContent {
- padding: 15px 8px;
- }
- .listNewsImgNewsItemTitle {
- color: #333333;
- font-size: 18px;
- box-sizing: border-box;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- line-clamp: 2;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- img {
- display: block;
- width: 170px;
- height: 110px;
- }
- }
- }
- .listNewsImgNewsUl {
- .listNewsImgNewsLi {
- width: 720px;
- height: 62px;
- background: #F9FAFB;
- display: flex;
- margin-bottom: 14px;
- a {
- display: flex;
- align-items: center;
- justify-content: center;
- }
- .listNewsImgNewsMark {
- background: #004564;
- color: #fff;
- width: 50px;
- height: 62px;
- box-sizing: border-box;
- padding: 12px 10px;
- font-size: 12px;
- font-weight: bold;
- margin-right: 10px;
- div {
- margin-bottom: 5px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- .listNewsImgNewsMark_skin2 {
- background: #A91B33;
- color: #fff;
- width: 50px;
- height: 62px;
- box-sizing: border-box;
- padding: 15px 10px;
- font-size: 12px;
- font-weight: bold;
- margin-right: 10px;
- div {
- margin-bottom: 5px;
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- .listNewsImgNewsTitle {
- flex:1;
- color:#333;
- font-size: 18px;
- height: 62px;
- line-height: 62px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- &:first-child {
- .listNewsImgNewsTitle {
- font-weight: bold;
- }
- }
- &:last-child {
- margin-bottom: 0;
- }
- }
- }
- }
- .listNewsContentRight {
- width: 450px;
- height: 420px;
- .listNewsImgNewsBox {
- margin-bottom: 20px;
- .listNewsImgNewsItem {
- a {
- display: flex;
- height: 110px;
- width: 450px;
- background: #F9FAFB;
- align-items: flex-start;
- justify-content: space-between;
- }
- .listNewsImgNewsItemContent {
- padding: 15px 8px;
- }
- .listNewsImgNewsItemTitle {
- color: #333333;
- font-size: 18px;
- box-sizing: border-box;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- line-clamp: 2;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- img {
- display: block;
- width: 170px;
- height: 110px;
- }
- }
- }
- .adBox {
- box-sizing: border-box;
- position: relative;
- img {
- display: block;
- width: 450px;
- height: 290px;
- }
- .templateEditBtnBox {
- right: 0;
- }
- }
- }
- }
- }
- </style>
|