提交 2dc09731 authored 作者: lihuihui's avatar lihuihui
......@@ -51,6 +51,7 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
}
.course-item-pic {
width: 2.4rem;
......
......@@ -46,6 +46,7 @@ export default {
display: flex;
flex-direction: column;
justify-content: space-between;
overflow: hidden;
}
.course-item-pic {
width: 2.4rem;
......
......@@ -11,7 +11,7 @@ import './assets/rem/rem.js'
import MetaInfo from 'vue-meta-info'
import modules from './modules'
import createBefore from './components/beforeEnter'
// import createBefore from './components/beforeEnter'
// vant
import Vant from 'vant'
......@@ -45,10 +45,11 @@ Vue.prototype.VueEvent = new Vue()
Vue.prototype.wx = window.wx.miniProgram
/* 创建实例之前,通过导航守卫,处理部分逻辑,如:是否直接进入系统 */
const before = createBefore()
// const before = createBefore()
/* 导航守卫 */
router.beforeEach((to, from, next) => {
before.update(to, from, next)
// before.update(to, from, next)
next()
})
window.G.$instance_vue = new Vue({
store,
......
......@@ -59,7 +59,16 @@ export default {
this.showMore = !this.showMore
},
viewMore() {
this.$router.push({ name: 'courseTagItem', params: { id: this.data.id } })
if (this.isWeapp) {
wx.miniProgram.navigateTo({
url: `/pages/web/index?src=${window.location.origin}/course/tag/${this.data.id}`
})
} else {
this.$router.push({
name: 'courseTagItem',
params: { id: this.data.id }
})
}
},
// 去知识点考试页面
toExamPage() {
......
......@@ -105,6 +105,9 @@ export default {
this.$router.replace({ query: { tab: name, keywords: this.searchValue } })
},
onSearch() {
if (!this.searchValue.trim()) {
return
}
this.$router.replace({
query: { tab: this.tabActive, keywords: this.searchValue }
})
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论