|
@@ -74,16 +74,21 @@ export default {
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
updateInfo () {
|
|
updateInfo () {
|
|
|
- teacherGetCourses({ size: 100, sort: 'createAt' }).then(res => {
|
|
|
|
|
- this.courses = res.data
|
|
|
|
|
- }).catch(err => {
|
|
|
|
|
- this.$setErrorMessage('获取课件时:' + err.response.data.msg)
|
|
|
|
|
- })
|
|
|
|
|
teacherGetSlides({ size: 1, sort: 'updateAt,desc' }).then(res => {
|
|
teacherGetSlides({ size: 1, sort: 'updateAt,desc' }).then(res => {
|
|
|
this.slides = res.data
|
|
this.slides = res.data
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
this.$setErrorMessage(err.response.data.msg)
|
|
this.$setErrorMessage(err.response.data.msg)
|
|
|
})
|
|
})
|
|
|
|
|
+ this.getCourses(20).then(() => {
|
|
|
|
|
+ this.getCourses(10000)
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ getCourses (size) {
|
|
|
|
|
+ return teacherGetCourses({ size, sort: 'createAt' }).then(res => {
|
|
|
|
|
+ this.courses = res.data
|
|
|
|
|
+ }).catch(err => {
|
|
|
|
|
+ this.$setErrorMessage('获取课件时:' + err.response.data.msg)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
handleToCreateCourse () {
|
|
handleToCreateCourse () {
|
|
|
this.$router.push({ name: 'create-new-course' })
|
|
this.$router.push({ name: 'create-new-course' })
|