提交 4415b413 authored 作者: lihuihui's avatar lihuihui

updata

上级 45a1b1f9
...@@ -180,7 +180,7 @@ export default { ...@@ -180,7 +180,7 @@ export default {
}) })
}, },
goAbilityExam(n) { goAbilityExam(n) {
const path = `/exam/answer?type=1&is_create=${n}&tag_id=${this.detail.id}&papersUrl=zy/v2/examination/examination-papers` const path = `/exam/answer?type=1&is_create=${n}&papersUrl=zy/v2/examination/examination-papers`
if (this.isWeapp) { if (this.isWeapp) {
const src = encodeURIComponent(`${window.location.origin}${path}`) const src = encodeURIComponent(`${window.location.origin}${path}`)
wx.miniProgram.navigateTo({ wx.miniProgram.navigateTo({
...@@ -199,34 +199,49 @@ export default { ...@@ -199,34 +199,49 @@ export default {
// }) // })
}, },
startExam(event, id, cId, isCreate) { startExam(event, id, cId, isCreate) {
this.$router.push({ const path = `/exam/answer?type=1&is_create=${isCreate}&course_id=${cId}&chapter_id=${id}&papersUrl=zy/v2/examination/course-papers`
path: '/exam/answer', if (this.isWeapp) {
query: { const src = encodeURIComponent(`${window.location.origin}${path}`)
course_id: cId, wx.miniProgram.navigateTo({
chapter_id: id, url: `/pages/web/index?src=${src}`
type: 1,
is_create: isCreate,
papersUrl: 'zy/v2/examination/course-papers'
}
}) })
} else {
this.$router.push({ path })
}
// this.$router.push({
// path: '/exam/answer',
// query: {
// course_id: cId,
// chapter_id: id,
// type: 1,
// is_create: isCreate,
// papersUrl: 'zy/v2/examination/course-papers'
// }
// })
event.stopPropagation() event.stopPropagation()
}, },
viewReport(event, id, cId, isCreate) { viewReport(event, id, cId, isCreate) {
this.$router.push({ const path = `/exam/result?type=1&is_create=${isCreate}&course_id=${cId}&chapter_id=${id}&papersUrl=zy/v2/examination/course-papers`
path: '/exam/result', if (this.isWeapp) {
query: { const src = encodeURIComponent(`${window.location.origin}${path}`)
course_id: cId, wx.miniProgram.navigateTo({
chapter_id: id, url: `/pages/web/index?src=${src}`
type: 1,
is_create: isCreate,
papersUrl: 'zy/v2/examination/course-papers'
}
}) })
} else {
this.$router.push({ path })
}
// this.$router.push({
// path: '/exam/result',
// query: {
// course_id: cId,
// chapter_id: id,
// type: 1,
// is_create: isCreate,
// papersUrl: 'zy/v2/examination/course-papers'
// }
// })
event.stopPropagation() event.stopPropagation()
}, },
go() {
this.$router.push('/exam/answer')
},
async tab(e) { async tab(e) {
const isLogin = await this.$store.dispatch('checkLogin') const isLogin = await this.$store.dispatch('checkLogin')
if (e === 1 || e === 2) { if (e === 1 || e === 2) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论