Commit 1efc2a4e authored by Damon's avatar Damon

refactor: toast

parent 5e587c42
......@@ -292,25 +292,15 @@ export default {
this.currentIndex = current
if (current == NO_PREV_PAGE || current == NO_NEXT_PAGE) {
if (this.requesting) {
uni.showToast({
title: '数据加载中',
icon: 'none',
})
return
return this.$u.toast('数据加载中')
}
if (current == NO_PREV_PAGE) {
return uni.showToast({
title: '已经是第一道试题',
icon: 'none',
})
return this.$u.toast('已经是第一道试题')
}
if (current == NO_NEXT_PAGE) {
return uni.showToast({
title: '已经是最后一道试题',
icon: 'none',
})
return this.$u.toast('已经是最后一道试题')
}
}
......@@ -424,10 +414,7 @@ export default {
}, 0)
if (count === this.total) {
return uni.showToast({
title: '您已经答完全部试题',
icon: 'none',
})
return this.$u.toast('您已经答完全部试题')
}
}
......@@ -617,10 +604,7 @@ export default {
this.list = list
if (this.list.length === 0) {
uni.showToast({
title: '暂无数据',
icon: 'none',
})
this.$u.toast('暂无数据')
setTimeout(() => {
this.$u.route({
delta: 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment