dev_202412
yujialong 8 months ago
parent 896fc92195
commit a79f9ce3cc
  1. 13
      src/pages/station/list/index.vue
  2. 62
      src/pages/station/preview/index.vue
  3. 15
      src/pages/station/product/index.vue

@ -110,9 +110,11 @@ export default {
}
},
toProduct (item) {
//
if (item.isInEffect) {
const links = item.nonAssociatedLinks
const links = item.nonAssociatedLinks
// / cid
if (!item.isInEffect || (!item.cid && !links)) {
this.$router.push(`product?id=${item.mallId}`)
} else {
//
if (links && links.length) {
if (links.length === 1) {
@ -122,11 +124,8 @@ export default {
this.links = item.nonAssociatedLinks
}
} else {
this.$router.push(`/station/preview?courseId=${item.cid}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`)
this.$router.push(`/station/preview?courseId=${item.cid || ''}&curriculumName=${item.goodsName}&mallId=${item.mallId || ''}&keyword=${this.keyword}&active=${this.active}`)
}
} else {
//
this.$router.push(`product?id=${item.mallId}`)
}
},
// tab

@ -413,7 +413,7 @@ export default {
},
destroyed () {
//
Util.local.get(Setting.tokenKey) && this.$post(this.api.playRecordSave, {
Util.local.get(Setting.tokenKey) && this.courseId && this.$post(this.api.playRecordSave, {
courseId: this.courseId,
courseType: 0,
playTime: Math.ceil((Date.now() - this.startTime) / 1000 / 60)
@ -429,23 +429,25 @@ export default {
this.addRecord()
},
async getData () {
const { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
this.routes = [
{
name: '实验台',
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || 0}`
},
{
name: data.curriculumName
}
]
this.courseName = data.curriculumName;
this.briefIntroduction = data.briefIntroduction;
this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds
this.queryProject()
if (this.courseId) {
const { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
this.routes = [
{
name: '实验台',
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || 0}`
},
{
name: data.curriculumName
}
]
this.courseName = data.curriculumName;
this.briefIntroduction = data.briefIntroduction;
this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig;
this.systemIds = data.systemIds
this.queryProject()
}
this.getStatus()
},
// 使
@ -465,20 +467,24 @@ export default {
},
//
async getChapter () {
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`);
this.chapterList = res.chapterList;
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length && !this.commentId) {
this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 1);
if (this.courseId) {
let res = await this.$get(`${this.api.curriculumChapter}/${this.courseId}`);
this.chapterList = res.chapterList;
if (this.chapterList.length && this.chapterList[0].subsectionList && this.chapterList[0].subsectionList.length && !this.commentId) {
this.preview(this.chapterList[0].subsectionList[0], this.chapterList[0].name, 1);
}
}
},
//
async getProgress () {
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`);
this.progressList = res.list
if (res.list.length) this.archProject = res.list[0].projectId
this.maximumScores.length || this.getMaximumScore()
this.plan = res.plan
this.schedule = +(res.schedule.replace('%', ''))
if (this.courseId) {
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`);
this.progressList = res.list
if (res.list.length) this.archProject = res.list[0].projectId
this.maximumScores.length || this.getMaximumScore()
this.plan = res.plan
this.schedule = +(res.schedule.replace('%', ''))
}
},
//
async getMaximumScore () {

@ -48,7 +48,8 @@
<div class="text">{{ form.goodsRes.typeName }}</div>
</div>
</div>
<button class="btn" @click="toRenew">续期</button>
<button v-if="!overdue" class="btn" @click="toRenew">续期</button>
<button v-else-if="withLink" class="btn entry" @click="toStation">进入实验</button>
</div>
</div>
<div class="course" id="part0">
@ -145,7 +146,8 @@ export default {
chapterList: [],
hots: [],
linkVisible: false,
height: ''
height: '',
overdue: 0, //
};
},
computed: {
@ -193,6 +195,7 @@ export default {
next()
},
mounted () {
this.getStatus()
this.getData()
this.getHot()
},
@ -233,6 +236,14 @@ export default {
this.chapterList = res.chapterList
}
},
//
async getStatus () {
const { isRenew } = await this.$get(this.api.whetherToRenewTheFee, {
mallId: this.id
})
// 10
this.overdue = isRenew
},
// tab
tabChange ({ id }) {
this.curTab = id

Loading…
Cancel
Save