|
|
@@ -4,7 +4,9 @@
|
|
|
<template #renderItem="{ item }">
|
|
|
<a-list-item>
|
|
|
<a-list-item-meta :description="item.chapterName">
|
|
|
- <template #title>{{ item.courseName }}</template>
|
|
|
+ <template #title>
|
|
|
+ <div @click="jumpDetail(item)" style="cursor: pointer">{{ item.courseName }}</div>
|
|
|
+ </template>
|
|
|
</a-list-item-meta>
|
|
|
{{ item.fileName }}
|
|
|
</a-list-item>
|
|
|
@@ -14,31 +16,39 @@
|
|
|
</template>
|
|
|
<script setup>
|
|
|
import classCentre from '@/api/student/classCentre'
|
|
|
+ import { useRouter, useRoute } from 'vue-router'
|
|
|
+ const router = useRouter()
|
|
|
const listData = ref([])
|
|
|
const pagination = ref({
|
|
|
current: 1,
|
|
|
onChange: (page) => {
|
|
|
- getList(page)
|
|
|
+ pagination.value.current = page
|
|
|
+ getList()
|
|
|
},
|
|
|
pageSize: 10
|
|
|
})
|
|
|
- const getList = (current) => {
|
|
|
- // classCentre.footprintList({
|
|
|
- // current: current ? current : pagination.value.current,
|
|
|
- // size: pagination.value.pageSize
|
|
|
- // })
|
|
|
- // .then((data) => {
|
|
|
- // listData.value = data.records
|
|
|
- // })
|
|
|
- classCentre.footprintClassList({
|
|
|
- current: current ? current : pagination.value.current,
|
|
|
+ const getList = () => {
|
|
|
+ classCentre
|
|
|
+ .footprintClassList({
|
|
|
+ current:pagination.value.current,
|
|
|
size: pagination.value.pageSize
|
|
|
})
|
|
|
.then((data) => {
|
|
|
listData.value = data.records
|
|
|
+ pagination.value.total = data.total
|
|
|
})
|
|
|
}
|
|
|
- getList()
|
|
|
+ onMounted(() => {
|
|
|
+ getList()
|
|
|
+ })
|
|
|
+ const jumpDetail = (item) => {
|
|
|
+ router.push({
|
|
|
+ path: '/student/classCentre',
|
|
|
+ query: {
|
|
|
+ id: item.courseId
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
</script>
|
|
|
<style scoped>
|
|
|
.index-message-list {
|