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

chore: 移除toast

上级 c78c9ef6
......@@ -21,19 +21,9 @@ export default {
},
methods: {
getCourseList() {
this.$toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
api
.getCourseList()
.then(response => {
api.getCourseList().then(response => {
this.courseList = response
})
.finally(() => {
this.$toast.clear()
})
}
},
beforeMount() {
......
......@@ -39,15 +39,8 @@ export default {
methods: {
// 课程学习
getCourse() {
this.$toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
this.loaded = false
api
.getCourse(this.courseId)
.then(response => {
api.getCourse(this.courseId).then(response => {
this.loaded = true
response.chapters = response.chapters.filter(item => {
item.children = item.children.filter(
......@@ -60,9 +53,6 @@ export default {
})
this.detail = response
})
.finally(() => {
this.$toast.clear()
})
}
},
beforeMount() {
......
......@@ -61,14 +61,7 @@ export default {
methods: {
// 获取知识点列表
getCourseTagList() {
this.$toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
api
.getCourseTagList(this.courseId)
.then(response => {
api.getCourseTagList(this.courseId).then(response => {
this.$emit('ready', response)
this.detail = response
this.messageList = response.chapters.map((item, index) => {
......@@ -80,9 +73,6 @@ export default {
}
})
})
.finally(() => {
this.$toast.clear()
})
},
// 输入搜索
onSearch() {
......
......@@ -57,21 +57,11 @@ export default {
methods: {
// 获取知识点详情
getCourseTag(tagId) {
this.$toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
this.loaded = false
api
.getCourseTag(tagId || this.tagId)
.then(response => {
api.getCourseTag(tagId || this.tagId).then(response => {
this.loaded = true
this.detail = response
})
.finally(() => {
this.$toast.clear()
})
},
// 去知识点考试页面
toExamPage() {
......
......@@ -57,21 +57,11 @@ export default {
methods: {
// 获取知识点列表
getCourseTagList() {
this.$toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
this.loaded = false
api
.getCourseTagList(this.courseId)
.then(response => {
api.getCourseTagList(this.courseId).then(response => {
this.loaded = true
this.detail = response
})
.finally(() => {
this.$toast.clear()
})
},
onClick({ id }) {
const path = `/exam/answer?type=2&tag_id=${id}&papersUrl=zy/v2/examination/course-papers`
......
......@@ -75,19 +75,9 @@ export default {
methods: {
// 获取课程试听列表
getCourseList() {
this.$toast.loading({
duration: 0,
message: '加载中...',
forbidClick: true
})
api
.getFreeCourseList()
.then(response => {
api.getFreeCourseList().then(response => {
this.courseList = response
})
.finally(() => {
this.$toast.clear()
})
},
// 搜索
toSearch() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论