indexMid.vue 2.2 KB
<template>
    <div class="index_wrap">
        <!-- 主体 -->
        <div class="main">
            <!-- 标题 -->
            <div class="title">
                <!-- The measurement instructions -->
                测评说明
            </div>
            <!-- 开始测评 -->
            <div class="start_test_wrap">
                <div class="start_test">
                    <div class="start_title">测评说明</div>
                    <div class="start_content" v-html="content"></div>
                    <div class="start_btn" @click="toEvalute()">开始测评</div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import { post } from "../../../api/http";
export default {
    data(){
        return{
            content:"",
        }
    },
    methods:{
        // 去测评
        toEvalute(){
            this.$router.push({path:"/evaluteOne"})
        },
        // 获取测评说明
        getEvalute(){
            let url = "/api/sundry/get_explain";
            post(url)
            .then(res=>{
                this.content = res.content;
                console.log(this.content)
            })
        },
    },
    mounted(){
        this.getEvalute()
    },
}
</script>
<style scoped>
.main{
    width: 1200px;
    margin: 28px auto;
    /* height: 750px; */
    padding-bottom: 100px;
    box-shadow: #ccc 0px 0px 5px;
}
/* 标题 */
.title{
    color: #526AA6;
    font-size: 30px;
    width: 100%;
    height:94px;
    border-bottom: 2px solid #526AA6;
    text-align: center;
    font-weight: bold;
    line-height: 94px;
}
/* 开始测评 */
.start_test_wrap{
    width: 100%;
}
.start_test{
    margin: 80px 90px 0 86px
}
.start_title{
    font-size: 26px;
    color: #333;
    text-align: left;
    margin-bottom: 26px;
}
.start_content{
    font-size: 18px;
    color: #666;
    text-align: left;
    line-height: 20px;
}
.start_content>>> img{
    width: auto;
    margin: 0 auto
}
.start_btn{
    width: 200px;
    height: 38px;
    text-align: center;
    line-height: 38px;
    background-color: #526AA6;
    color: #fff;
    font-size: 20px;
    border-radius: 3px;
    margin: 120px auto 0;
}
.start_btn:hover{
    opacity: 0.8
}
</style>