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

bug fixes

上级 1b6e1a98
......@@ -20,6 +20,7 @@
left-icon
show-action
background="#f7f7f7"
:maxlength="40"
placeholder="全国道路运输安全生产管理培训"
@search="onSearch"
>
......
......@@ -11,6 +11,10 @@
<ul>
<li @click="toExamPage">知识点考试</li>
</ul>
<ul>
<li @click="getCourseTag(detail.last)" v-if="detail.last">上一点</li>
<li @click="getCourseTag(detail.next)" v-if="detail.next">下一点</li>
</ul>
</div>
</div>
</div>
......@@ -46,7 +50,7 @@ export default {
},
methods: {
// 获取知识点详情
getCourseTag() {
getCourseTag(tagId) {
this.$toast.loading({
duration: 0,
message: '加载中...',
......@@ -54,7 +58,7 @@ export default {
})
this.loaded = false
api
.getCourseTag(this.tagId)
.getCourseTag(tagId || this.tagId)
.then(response => {
this.loaded = true
this.detail = response
......@@ -115,11 +119,13 @@ export default {
line-height: 24px;
}
.tools {
display: flex;
justify-content: space-between;
margin-top: 5px;
li {
display: inline-block;
height: 24px;
margin: 0 10px 10px 0;
margin: 0 0 10px 10px;
padding: 0 15px;
font-size: 13px;
color: #fff;
......@@ -130,6 +136,9 @@ export default {
text-overflow: ellipsis;
overflow: hidden;
cursor: pointer;
&:first-child {
margin-left: 0;
}
}
}
</style>
......@@ -151,23 +151,24 @@ export default {
},
// 显示登录提示框
showLoginDialog() {
this.$dialog
.confirm({
title: '您还未登录',
message: '请先登录再进行操作',
cancelButtonText: '暂不登录',
confirmButtonText: '立即登录'
})
.then(() => {
this.wechatLogin()
})
.catch(() => {
if (this.isWeapp) {
wx.miniProgram.navigateBack()
this.$dialog.confirm({
title: '您还未登录',
message: '请先登录再进行操作',
cancelButtonText: '暂不登录',
confirmButtonText: '立即登录',
beforeClose: (action, done) => {
if (action === 'confirm') {
this.wechatLogin()
} else {
this.$router.replace('/')
if (this.isWeapp) {
wx.miniProgram.navigateBack()
} else {
this.$router.replace('/')
}
}
})
done(false)
}
})
}
},
beforeMount() {
......
......@@ -133,9 +133,13 @@ export default {
}
.search-tips__list li {
display: inline-block;
max-width: 100%;
font-size: 0.26rem;
color: #999;
margin-right: 0.4rem;
margin-bottom: 0.4rem;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论