|
|
@@ -139,11 +139,11 @@
|
|
|
|
|
|
const fetchData = () => {
|
|
|
if (role === 'student') {
|
|
|
- apis.getCourseByStudentId(store.user.id)
|
|
|
+ apis.getCourseByStudentId()
|
|
|
.then((res: any) => {
|
|
|
// 获取课程总数
|
|
|
let total = res.data.data.total;
|
|
|
- apis.getCourseByStudentId(store.user.id,1,total)
|
|
|
+ apis.getCourseByStudentId(1, total)
|
|
|
.then((res: any) => {
|
|
|
let data:CourseVO[] = res.data.data.records
|
|
|
for(let i = 0; i < data.length; i++){
|
|
|
@@ -152,11 +152,11 @@
|
|
|
})
|
|
|
})
|
|
|
} else if (role === "teachers") {
|
|
|
- apis.getCourseByTeacherId(store.user.id)
|
|
|
+ apis.getCourseByTeacherId()
|
|
|
.then((res: any) => {
|
|
|
// 获取课程总数
|
|
|
let total = res.data.data.total;
|
|
|
- apis.getCourseByTeacherId(store.user.id,1,total)
|
|
|
+ apis.getCourseByTeacherId(1, total)
|
|
|
.then((res: any) => {
|
|
|
let data:CourseVO[] = res.data.data.records
|
|
|
for(let i = 0; i < data.length; i++){
|