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

bug fixes

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