123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- <template>
- <div class="title">
- <h4>
- 热点精选
- </h4>
- </div>
- <!-- 列表 -->
- <ul class="rightList">
- <li v-for="item in hotNewsList">
- <NuxtLink :to="item.linkurl" v-show="item.islink == 1" :title="item.title">
- <!-- <img class="left hotNewsImg" :src="item.imgurl"> -->
- <p class="left">{{ item.title }}</p>
- </NuxtLink>
- <NuxtLink :to="`/newsDetail/${item.id}`" v-if="item.islink == 0" :title="item.title">
- <!-- <img class="left hotNewsImg" :src="item.imgurl"> -->
- <p class="left">{{ item.title }}</p>
- </NuxtLink>
- </li>
- </ul>
- </template>
- <script setup>
- const hotNewsList = ref([])
- async function getPageData() {
- const mkdata = await requestDataPromise('/web/getWebsiteArticlett', {
- method: 'GET',
- query: {
- 'pageSize': 8,
- 'level': 4,
- 'placeid': 15
- },
- });
- hotNewsList.value = mkdata.data;
- }
- getPageData();
- </script>
- <style lang="less" scoped>
- .title {
- width: 380px;
- height: 40px;
- line-height: 40px;
- border-top: 1px solid #139602;
- border-bottom: 1px solid #e7e7e7;
- background-color: #fbfbfb;
- >h4 {
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- margin-left: 20px;
- font-size: 20px;
- color: #000000;
- text-align: left;
- font-style: normal;
- text-transform: none;
- >span {
- float: right;
- font-family: Microsoft YaHei, Microsoft YaHei;
- font-weight: 400;
- font-size: 14px;
- margin-right: 10px;
- color: #999999;
- text-align: left;
- font-style: normal;
- text-transform: none;
- }
- }
- }
- .rightList {
- height: 654px;
- padding-top: 20px;
- background-color: #fbfbfb;
- >li {
- height: 40px;
- margin-bottom: 10px;
- margin-left: 15px;
- a {
- display: block;
- }
- >img {
- width: 150px;
- height: 100px;
- border-radius: 4px;
- }
- p {
- width: 347px;
- height: 80px;
- box-sizing: border-box;
- padding-left: 12px;
- padding-right: 10px;
- box-sizing: border-box;
- font-family: PingFang SC, PingFang SC;
- font-weight: 400;
- font-size: 16px;
- color: #333333;
- line-height: 22px;
- text-align: left;
- font-style: normal;
- text-transform: none;
- border-bottom: 1px solid #e7e7e7;
- padding-bottom: 20px;
- padding-top: 20px;
- }
- }
- >li:hover {
- p {
- //box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
- color: #139602;
- }
- }
- }
- .hotNewsImg {
- width: 150px;
- height: 100px;
- border-radius: 4px;
- }
- </style>
|