dayStudy.vue 2.71 KB
<template>
    <div class="box">
        <div class="card" v-for="(v, i) in dataList" :key="i" @click="toPath(v)">
            <div class="card_pic">
                <img :src="v.url" />
            </div>
            <div class="card_context">
                <div class="title">{{v.title}}</div>
                <div class="group_font">{{v.greyTitle}}</div>
            </div>
        </div>

        <tabbar4 active="yanxue"></tabbar4>
    </div>
</template>

<script>
import Tabbar4 from "@/component/Tabbar4";
import videoList from '@/views/dayStudy/data.json'
import main1 from '@/assets/main1.png'
import main2 from '@/assets/main2.png'
import main3 from '@/assets/main3.png'
import main4 from '@/assets/main4.png'
export default {
    components: { Tabbar4 },
    data() {
        return {
            dataList: [
                {
                    url: main4,
                    title: "热爱生命 珍惜生命",
                    greyTitle: "暑期生命成长实践活动成果",
                    path: 'summerVacation'
                },
                {
                    url: main2,
                    title: "研学红色历史 守好红色根脉",
                    greyTitle: "红色研学实践成果",
                    path: 'studyList'
                },
                {
                    url: main1,
                    title: "重温总书记寄语 重走光辉百年路",
                    greyTitle: "主题教育成果展示",
                    path: 'YanxuePage'
                },
                {
                    url: main3,
                    title: "每日一题",
                    greyTitle: "红色网上游知识竞赛",
                    path: 'stars'
                },
            ],
        };
    },
    methods: {
        toPath(val) {
            console.log(val)
            this.$router.push(val.path)
        }
    }
};
</script>

<style lang="scss" scoped>
.box {
    padding-bottom: 150px;
    box-sizing: border-box;

    .card {
        width: 100vw;
        height: 535px;
        background-color: #fff;
        margin-bottom: 35px;
    
        .card_pic {
            height: 400px;
    
            img {
                width: 100%;
                height: 100%;
            }
        }
        .card_context {
            height: calc(535px - 400px);
            padding: 25px 50px 10px;
            box-sizing: border-box;
            display: flex;
            align-content: space-between;
            flex-wrap: wrap;
    
            .title {
                width: 100%;
                font-weight: bold;
                font-size: 32px;
            }
            .group_font {
                font-size: 28px;
                color: #999;
            }
        }
    }
}
</style>