| | |
| | | queryBlogArticleList |
| | | } from '../../api/blogArticle.js' |
| | | |
| | | var obj1 = { |
| | | "source": babyActicle, |
| | | "title": "陈奕迅-Body Song 歌词", |
| | | "read": 1101, |
| | | "like": 233, |
| | | "folder": "歌词", |
| | | "publishTime": "2021-05-26", |
| | | } |
| | | var obj2 = { |
| | | "source": shijie, |
| | | "title": "这世界那么多人-吉他谱", |
| | | "read": 3101, |
| | | "like": 113, |
| | | "folder": "吉他谱", |
| | | "publishTime": "2020-05-26", |
| | | } |
| | | var obj3 = { |
| | | "source": shijie, |
| | | "title": "遥远的它-吉他谱", |
| | | "read": 201, |
| | | "like": 13, |
| | | "folder": "吉他谱", |
| | | "publishTime": "2022-07-26", |
| | | } |
| | | |
| | | export default { |
| | | components: { |
| | | box5, |
| | |
| | | defaultPageSize:10 |
| | | }; |
| | | }, |
| | | created() { |
| | | this.typeId = this.$route.query.typeId; |
| | | }, |
| | | watch: { |
| | | '$route'(to, from) { |
| | | if ("articleList" === to.name) { |
| | | if ("articleList" === to.name || "home" === to.name) { |
| | | this.typeId = this.$route.query.typeId; |
| | | } |
| | | }, |
| | |
| | | }, |
| | | deactivated() { |
| | | window.removeEventListener('scroll', this); |
| | | }, |
| | | beforeMount() { |
| | | queryBlogArticleList({ |
| | | pageNo: this.current, |
| | | pageSize:this.pageSize, |
| | | typeId: this.typeId |
| | | }).then((res) => { |
| | | this.total = Number(res.data.total) |
| | | this.pageSize = Number(res.data.size); |
| | | this.data = res.data.records; |
| | | return res |
| | | }) |
| | | }, |
| | | methods: { |
| | | onChange(current) { |
| | |
| | | }; |
| | | </script> |
| | | <style> |
| | | /* .test { |
| | | overflow: hidden; |
| | | height: 700px; |
| | | } |
| | | |
| | | .infinite-container { |
| | | overflow: auto; |
| | | } |
| | | |
| | | .infinite-container::-webkit-scrollbar { |
| | | display: none; |
| | | } */ |
| | | |
| | | .demo-loading-container { |
| | | position: absolute; |
| | | bottom: 40px; |