Commit 9f48f3b1 authored by Damon's avatar Damon

fix: 【ID1001530】【小程序-首页-各种提示】:绑卡、收藏、取消收藏、答完试题等提示,统一颜色和样式。

parent ad95eb5d
......@@ -123,6 +123,8 @@
>
</dailyPop>
</view>
<u-toast ref="uToast" />
</view>
</template>
......@@ -326,15 +328,24 @@ export default {
this.currentIndex = current
if (current == NO_PREV_PAGE || current == NO_NEXT_PAGE) {
if (this.requesting) {
return this.$u.toast('数据加载中')
return this.$refs.uToast.show({
title: '数据加载中',
type: 'warning',
})
}
if (current == NO_PREV_PAGE) {
return this.$u.toast('已经是第一道试题')
return this.$refs.uToast.show({
title: '已经是第一道试题',
type: 'warning',
})
}
if (current == NO_NEXT_PAGE) {
return this.$u.toast('已经是最后一道试题')
return this.$refs.uToast.show({
title: '已经是最后一道试题',
type: 'warning',
})
}
}
......@@ -498,7 +509,10 @@ export default {
this.$u.vuex(`answerCount.${this.questionWarehouseId}`, 0)
this.$u.vuex(`lastIndex.${this.questionWarehouseId}`, 0)
this.$u.vuex(`questionList.${this.questionWarehouseId}`, [])
return this.$u.toast('您已经答完全部试题')
return this.$refs.uToast.show({
title: '您已经答完全部试题',
type: 'warning',
})
})
}
}
......@@ -612,7 +626,10 @@ export default {
this.$u.api[action]({ questionId: info.id }).then((res) => {
if (res) {
const msg = status ? '取消收藏成功' : '收藏成功'
this.$u.toast(msg)
this.$refs.uToast.show({
title: msg,
type: 'success',
})
if (status && this.source === 4) {
this.current = this.currentIndex + 1
}
......@@ -716,7 +733,10 @@ export default {
this.list = list
if (this.list.length === 0) {
this.$u.toast('暂无数据')
this.$refs.uToast.show({
title: '暂无数据',
type: 'error',
})
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