1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <script lang='ts' setup>
- import img01 from '@/assets/images/home_blog_img01.png'
- import img02 from '@/assets/images/home_blog_img02.png'
- import img03 from '@/assets/images/home_blog_img03.png'
- import {
- getBlogsListApi,
- } from '~/api/model/blogs'
- const list = ref<any>([])
- async function getVideoOrBlogsList(pageNo = 1, pageSize = 3) {
- const params = {
- pageNo,
- pageSize,
- categoryId: '',
- orderBy: 'createTime',
- orderType: 'desc',
- }
- const res: any = await getBlogsListApi(params)
- list.value = res.records
- }
- getVideoOrBlogsList()
- </script>
- <template>
- <div class="mt-160px mb-150px text-center">
- <h2 class="fw-600 text-40px text-#363C40 custom-title-font">
- Latest Blogs
- </h2>
- <div class="mt-20px w-500px mx-auto text-#999 text-16px lh-24px">
- Stay informed with industry trends, product highlights, and expert tips to
- help you grow your business.
- </div>
- <div class="mt-60px px-75px grid grid-cols-3 gap-106px text-left">
- <div v-for="item, index in list" :key="index">
- <NuxtLink to="/register">
-
- {{ item.contentType === '1' ? 'Blog' : 'Video' }}
- {{ item.contentTitle }}
- {{ item.contentSubhead }}
- <common-blog-item :item="item" />
- </NuxtLink>
- </div>
- </div>
- </div>
- </template>
- <style lang='less' scoped>
- .read-more {
- &:after{
- position: absolute;
- content: "";
- bottom: -4px;
- left: 0;
- width: 18%;
- height: 2px;
- background: #CDA274 ;
- transition: height 0.3s, background 0.3s; /* 明确过渡效果 */
- }
- }
- </style>
|