|
|
@@ -2,17 +2,10 @@
|
|
|
<div>
|
|
|
<!--<img class="home-banner" src="/image/SEEC_banner3.png"/>-->
|
|
|
<h1 class="title">热门测试</h1>
|
|
|
- <div class="course-list">
|
|
|
- <course-card
|
|
|
- v-for="(item,index) in courses"
|
|
|
- v-bind:key="index"
|
|
|
- :picture="item.picture"
|
|
|
- :title="item.title"
|
|
|
- :description="item.description"
|
|
|
- :url="item.url"
|
|
|
- :origin="item.origin"
|
|
|
- >
|
|
|
- </course-card>
|
|
|
+ <div class="test-list">
|
|
|
+ <test-card :start-time="examList.startTime" :end-time="examList.endTime"
|
|
|
+ :exam-name="examList.examName" :anti-cheating="examList.antiCheating===false? '无':'有'"
|
|
|
+ :status="examList.status"></test-card>
|
|
|
</div>
|
|
|
<h1 class="title">热门课程</h1>
|
|
|
<div class="course-list">
|
|
|
@@ -28,32 +21,35 @@
|
|
|
</course-card>
|
|
|
</div>
|
|
|
|
|
|
- <h1 class="title">推荐专栏</h1>
|
|
|
- <div class="course-list">
|
|
|
- <column-card
|
|
|
- v-for="(item,index) in columns"
|
|
|
- v-bind:key="index"
|
|
|
- :picture="item.picture"
|
|
|
- :title="item.title"
|
|
|
- :description="item.description"
|
|
|
- :url="item.url"
|
|
|
- >
|
|
|
- </column-card>
|
|
|
- </div>
|
|
|
+ <!-- <h1 class="title">推荐专栏</h1>-->
|
|
|
+ <!-- <div class="course-list">-->
|
|
|
+ <!-- <column-card-->
|
|
|
+ <!-- v-for="(item,index) in columns"-->
|
|
|
+ <!-- v-bind:key="index"-->
|
|
|
+ <!-- :picture="item.picture"-->
|
|
|
+ <!-- :title="item.title"-->
|
|
|
+ <!-- :description="item.description"-->
|
|
|
+ <!-- :url="item.url"-->
|
|
|
+ <!-- >-->
|
|
|
+ <!-- </column-card>-->
|
|
|
+ <!-- </div>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import CourseCard from '~/components/CourseCard'
|
|
|
-import ColumnCard from '~/components/ColumnCard'
|
|
|
+import TestCard from '~/components/TestCard'
|
|
|
+import { computeExamStatusText } from '~/plugins/util'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
CourseCard,
|
|
|
- ColumnCard
|
|
|
+ TestCard
|
|
|
},
|
|
|
data () {
|
|
|
return {
|
|
|
+ token: '',
|
|
|
+ examList: [],
|
|
|
courses: [
|
|
|
{
|
|
|
title: '基于Java的面向对象编程范式',
|
|
|
@@ -76,33 +72,23 @@ export default {
|
|
|
url: 'http://developer.seecoder.cn',
|
|
|
description: '基于DevOps培养团队开发中小规模软件系统的能力'
|
|
|
}
|
|
|
- ],
|
|
|
- columns: [
|
|
|
- {
|
|
|
- title: '深度学习入门',
|
|
|
- picture: '/image/deep_learning.png',
|
|
|
- url: 'http://developer.seecoder.cn',
|
|
|
- description: '掌握深度学习基础数学知识,理解深度学习有关算法和原理,了解和使用深度学习工具'
|
|
|
- },
|
|
|
- {
|
|
|
- title: 'JVM简要入门',
|
|
|
- picture: '/image/JVM.jpg',
|
|
|
- url: 'http://developer.seecoder.cn',
|
|
|
- description: '了解Java字节码,理解字节码在JVM的执行过程和面向对象编程语言的实现机制'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '区块链底层开发入门',
|
|
|
- picture: '/image/block_chain.jpg',
|
|
|
- url: 'http://developer.seecoder.cn',
|
|
|
- description: '介绍区块链专业术语和工作原理,结合模拟器带你步步实现区块链交易、加密、共识等算法。'
|
|
|
- }
|
|
|
-
|
|
|
]
|
|
|
}
|
|
|
+ },
|
|
|
+ mounted () {
|
|
|
+ this.$api.$get('https://eval-test.seec.seecoder.cn/api/exam/list?pageSize=5&pageNum=1').then(res => {
|
|
|
+ this.examList = res.result.examVOList[0]
|
|
|
+ const startTime = this.examList.startTime
|
|
|
+ const endTime = this.examList.endTime
|
|
|
+ this.examList.status = computeExamStatusText({
|
|
|
+ startTime: startTime,
|
|
|
+ endTime: endTime
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
- @import '~/assets/css/home.scss';
|
|
|
+@import '~/assets/css/home.scss';
|
|
|
</style>
|