New file |
| | |
| | | import service from "@/api"; |
| | | |
| | | export const getFileList = () => { |
| | | return service.get('/api/student/education/resource/page'); |
| | | }; |
| | |
| | | import { ref } from 'vue'; |
| | | import NormalHeader from '@/components/NormalHeader/index.vue'; |
| | | import { Search } from '@element-plus/icons-vue'; |
| | | |
| | | import { getFileList } from '@/api/modules/file.js'; |
| | | |
| | | const fileType = { |
| | | 'img': { |
| | |
| | | iconPath: '/static/icons/file_type_video.png', |
| | | handle: (item) => { |
| | | console.log(item); |
| | | |
| | | } |
| | | }, |
| | | 'pdf': { |
| | | iconPath: '/static/icons/file_type_image.png', |
| | | handle: (item) => { |
| | | console.log(item); |
| | | |
| | | } |
| | | }, |
| | | }; |
| | |
| | | fileType[item.type] && fileType[item.type].handle(item); |
| | | }; |
| | | |
| | | const getData = () => { |
| | | getFileList().then(res => { |
| | | |
| | | }); |
| | | }; |
| | | getData(); |
| | | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |