提交 3c6666a1 authored 作者: 王鹏飞's avatar 王鹏飞

bug fixes

上级 87db0f30
......@@ -19,14 +19,22 @@ export default {
computed: {
curriculum() {
return this.data.curriculum
},
isWeapp() {
return this.$store.state.isWeapp
}
},
methods: {
onClick(data) {
this.$router.push({
name: 'courseLearnItem',
params: { id: data.course_id }
})
if (this.isWeapp) {
const url = `/pages/web/index?src=${window.location.origin}/course/learn/${data.course_id}`
wx.miniProgram.navigateTo({ url })
} else {
this.$router.push({
name: 'courseLearnItem',
params: { id: data.course_id }
})
}
}
}
}
......
......@@ -7,7 +7,7 @@
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Expires" content="0" />
<title>道路运输安全知识线上课</title>
<title></title>
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, shrink-to-fit=no">
</head>
<body>
......
......@@ -48,6 +48,9 @@ export default {
return {
'has-more': this.hasMore && !this.showMore
}
},
isWeapp() {
return this.$store.state.isWeapp
}
},
methods: {
......
......@@ -38,6 +38,9 @@ import * as api from '@/api/course.js'
export default {
name: 'Index',
components: { SearchBar, Card, FreeCourseItem },
metaInfo: {
title: '道路运输安全知识线上课'
},
data() {
return {
courseList: [] // 免费课程列表
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论