|
@@ -124,7 +124,6 @@
|
|
|
import { ajaxGetTest } from '../api/modules/user'
|
|
|
import { Button } from 'element-ui'
|
|
|
import SearchInput from '../components/Search'
|
|
|
-import ListItem from '../components/ListItem'
|
|
|
import { getHomeActivity, getHomeHot } from '../api/modules/home'
|
|
|
function recoveryPageData (key, defaultValues = {}) {
|
|
|
return sessionStorage.getItem(key) ? JSON.parse(sessionStorage.getItem(key) || '') : defaultValues
|
|
@@ -147,7 +146,6 @@ function formatData (v) {
|
|
|
export default {
|
|
|
name: 'home',
|
|
|
components: {
|
|
|
- ListItem,
|
|
|
SearchInput,
|
|
|
[Button.name]: Button
|
|
|
},
|
|
@@ -157,7 +155,7 @@ export default {
|
|
|
pageData: {}
|
|
|
}
|
|
|
},
|
|
|
- created() {
|
|
|
+ created () {
|
|
|
this.pageData = recoveryPageData('jy-docs-home-page-pc')
|
|
|
this.getHome()
|
|
|
},
|
|
@@ -170,16 +168,16 @@ export default {
|
|
|
},
|
|
|
computed: {
|
|
|
newList1 () {
|
|
|
- return this.pageData?.new && this.pageData?.new.slice(0,5)
|
|
|
+ return this.pageData?.new && this.pageData?.new.slice(0, 5)
|
|
|
},
|
|
|
newList2 () {
|
|
|
- return this.pageData?.new && this.pageData?.new.slice(0,5)
|
|
|
+ return this.pageData?.new && this.pageData?.new.slice(0, 5)
|
|
|
},
|
|
|
hotList1 () {
|
|
|
- return this.pageData?.hot && this.pageData?.hot.slice(0,5)
|
|
|
+ return this.pageData?.hot && this.pageData?.hot.slice(0, 5)
|
|
|
},
|
|
|
hotList2 () {
|
|
|
- return this.pageData?.hot && this.pageData?.hot.slice(0,5)
|
|
|
+ return this.pageData?.hot && this.pageData?.hot.slice(0, 5)
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -241,10 +239,8 @@ export default {
|
|
|
padding-bottom: 40px;
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
-
|
|
|
@include diy-icon('iconJianYu', 24, 24);
|
|
|
|
|
|
-
|
|
|
@include diy-icon('pdf', 24);
|
|
|
@include diy-icon('word', 24);
|
|
|
@include diy-icon('excel', 24);
|