Commit ad358bde authored by ZhangKai's avatar ZhangKai

1.add: 课程商城代码添加

2.add:课程详情页内容初步添加
parent c241aa62
......@@ -117,6 +117,12 @@ const USER_VISITOR_ROUTES = [
meta: { title: '课程商城', USER_LEVEL: USER_LEVEL.USER_VISITOR, showHeader: false, animation: false },
component: () => import('@/views/courseResources/courseMall/index')
},
{
path: '/courseResources/courseDetails/index',
name: 'courseDetails',
meta: { title: '课程详情', USER_LEVEL: USER_LEVEL.USER_VISITOR, showHeader: false, animation: false },
component: () => import('@/views/courseResources/courseDetails/index')
},
{
path: '/assessmentRating/index',
name: 'assessmentRating',
......
This diff is collapsed.
......@@ -12,21 +12,21 @@
@tab-click="changeQueryTabs">
<el-tab-pane label="行业前沿适配" name="first">
<screen
v-model="queryParams.type1"
v-model="queryParams.type"
title="技术分类"
:items="industryTechnologyOptions"
></screen>
</el-tab-pane>
<el-tab-pane label="岗位能力准入" name="second">
<screen
v-model="queryParams.type2"
v-model="queryParams.type"
title="岗位分类"
:items="postAbilityOptions"
></screen>
</el-tab-pane>
<el-tab-pane label="通用能力培养" name="third">
<screen
v-model="queryParams.type3"
v-model="queryParams.type"
title="技术分类"
:items="abilityTechnologyOptions"
></screen>
......@@ -34,7 +34,7 @@
</el-tabs>
<screen
v-else
v-model="queryParams.type1"
v-model="queryParams.type"
title="技术分类"
:items="industryTechnologyOptions"
></screen>
......@@ -75,7 +75,11 @@
</div>
</div>
<div class="box-bottom">
<div v-for="course in coursesDataList" :key="course.id" class="course-card">
<div
v-for="course in coursesDataList"
:key="course.id"
class="course-card"
@click="toCourseDetails(course)">
<div class="card-top">
<div class="picture">
<el-image
......@@ -358,13 +362,25 @@ export default {
mounted() {
this.mallIdentityType = this.$route.query.mallIdentityType || ''
},
beforeRouteUpdate(to, from, next) {
this.mallIdentityType = to.query.mallIdentityType || ''
this.queryParams.type = undefined
next()
},
methods: {
// 查询条件页签改变
changeQueryTabs(tab, event) {
// TODO: please clear this log
console.log(`tab`, tab)
// TODO: please clear this log
console.log(`event`, event)
// 重置全部页签查询条件
this.queryParams.type = undefined
},
// 跳转到课程详情
toCourseDetails(param) {
this.$router.push({
path: '/courseResources/courseDetails/index',
query: {
courseId: param.id
}
})
},
// 测试方法
test() {
......@@ -404,7 +420,7 @@ export default {
}
}
.screen-box:first-child {
::v-deep .el-tabs__content .screen-box {
margin: 0;
padding-top: 56px;
padding-bottom: 24px;
......@@ -414,6 +430,12 @@ export default {
margin: 0;
}
.screen-box:first-child {
margin: 0;
padding-top: 56px;
padding-bottom: 24px;
}
.screen-box:last-child {
margin: 0;
padding-top: 26px;
......
......@@ -143,7 +143,11 @@
<div class="toMore">更多 》</div>
</div>
<div class="box-bottom">
<div v-for="course in enterpriseCourseList" :key="course.id" class="course-card">
<div
v-for="course in enterpriseCourseList"
:key="course.id"
class="course-card"
@click="toCourseDetails(course)">
<div class="card-top">
<div class="picture">
<el-image
......@@ -183,7 +187,11 @@
<div class="toMore">更多 》</div>
</div>
<div class="box-bottom">
<div v-for="course in collegeCoursesList" :key="course.id" class="course-card">
<div
v-for="course in collegeCoursesList"
:key="course.id"
class="course-card"
@click="toCourseDetails(course)">
<div class="card-top">
<div class="picture">
<el-image
......@@ -474,6 +482,15 @@ export default {
// 点击导航栏中 课程商城二级导航栏
clickSelectIDDialog() {
this.$refs.navList.openSelectID()
},
// 跳转到课程详情
toCourseDetails(param) {
this.$router.push({
path: '/courseResources/courseDetails/index',
query: {
courseId: param.id
}
})
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment