Commit ad358bde authored by ZhangKai's avatar ZhangKai

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

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