|
@@ -1,10 +1,15 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div>
|
|
<div>
|
|
|
- <head-bar @back="back">
|
|
|
|
|
|
|
+ <head-bar @back="back" v-if="routeType == 0">
|
|
|
<template #title>
|
|
<template #title>
|
|
|
<div class="navTitle">课程详情</div>
|
|
<div class="navTitle">课程详情</div>
|
|
|
</template>
|
|
</template>
|
|
|
</head-bar>
|
|
</head-bar>
|
|
|
|
|
+ <div class="head-container" v-if="routeType == 1">
|
|
|
|
|
+ <div class="head-box">
|
|
|
|
|
+ <div class="navTitle">课程详情</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
<div class="courseBoxMes">
|
|
<div class="courseBoxMes">
|
|
|
<course-message
|
|
<course-message
|
|
|
:cDetail="courseDetail"
|
|
:cDetail="courseDetail"
|
|
@@ -36,6 +41,7 @@ export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
courseid: this.$route.query.courseid,
|
|
courseid: this.$route.query.courseid,
|
|
|
|
|
+ routeType: '',
|
|
|
courseDetail: {},
|
|
courseDetail: {},
|
|
|
courseTypeJson: {},
|
|
courseTypeJson: {},
|
|
|
chapInfo: [],
|
|
chapInfo: [],
|
|
@@ -50,7 +56,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
goToStudy() {
|
|
goToStudy() {
|
|
|
// eslint-disable-next-line object-curly-spacing
|
|
// eslint-disable-next-line object-curly-spacing
|
|
|
- this.$router.push({ path: '/course', query: { courseid: this.courseid } })
|
|
|
|
|
|
|
+ this.$router.push({ path: '/course', query: { courseid: this.courseid, routeType: this.routeType } })
|
|
|
},
|
|
},
|
|
|
getCourse() {
|
|
getCourse() {
|
|
|
const params = {
|
|
const params = {
|
|
@@ -87,7 +93,21 @@ export default {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
+ created() {
|
|
|
|
|
+ const routeType = this.$route.query.routeType
|
|
|
|
|
+ // console.log('routeType', routeType)
|
|
|
|
|
+ if (!!routeType) {
|
|
|
|
|
+ localStorage.setItem('routeType', routeType)
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
mounted() {
|
|
mounted() {
|
|
|
|
|
+ // if (!this.$route.query.routeType) {
|
|
|
|
|
+ // this.$router.push('/courseDetail', { replace: true })
|
|
|
|
|
+ // }
|
|
|
|
|
+ this.routeType = localStorage.getItem('routeType')
|
|
|
|
|
+ // console.log('this.routeType', this.routeType==false)
|
|
|
|
|
+
|
|
|
|
|
+ // console.log(this.$route.query.routeType, 'luo', this.routeType)
|
|
|
this.getCourse()
|
|
this.getCourse()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -100,6 +120,33 @@ export default {
|
|
|
padding: 0 0 60px;
|
|
padding: 0 0 60px;
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
+.head-container {
|
|
|
|
|
+ height: 55px;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ background-image: url(../../assets/images/course/head-back.png);
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ top: 0;
|
|
|
|
|
+ .back {
|
|
|
|
|
+ width: 0.3rem;
|
|
|
|
|
+ height: 0.3rem;
|
|
|
|
|
+ border-top: 2px solid #fff;
|
|
|
|
|
+ border-left: 2px solid #fff;
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ transform: rotate(-45deg) translateY(-50%);
|
|
|
|
|
+ top: 47%;
|
|
|
|
|
+ left: 0.8rem;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ }
|
|
|
|
|
+ .head-box {
|
|
|
|
|
+ padding: 0 1.5rem;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ height: 100%;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
.navTitle {
|
|
.navTitle {
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
color: #fff;
|
|
color: #fff;
|