|
@@ -29,18 +29,28 @@ export default {
|
|
|
components: {IndexCard},
|
|
|
data() {
|
|
|
return {
|
|
|
- morePath: {name: 'NewsAll'},
|
|
|
+ morePaths: {
|
|
|
+ '中考资讯': {name: 'NewsMiddleExam'},
|
|
|
+ '家长学校': {name: 'NewsParentSchool'},
|
|
|
+ '中考学生辅导': {name: 'NewsMiddleAssistant'},
|
|
|
+ '心灵课堂': {name: 'NewsHeartClass'}
|
|
|
+ },
|
|
|
newsTypes: [],
|
|
|
activeName: '',
|
|
|
newsCache: {}
|
|
|
}
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ morePath() {
|
|
|
+ return this.morePaths[this.activeName]
|
|
|
+ }
|
|
|
+ },
|
|
|
mounted() {
|
|
|
this.getTypes()
|
|
|
},
|
|
|
methods: {
|
|
|
getTypes() {
|
|
|
- this.newsTypes = ['中考资讯','家长学校','中考学生辅导','心灵课堂']
|
|
|
+ this.newsTypes = ['中考资讯', '家长学校', '中考学生辅导', '心灵课堂']
|
|
|
this.activeName = this.newsTypes.first()
|
|
|
this.getList(this.activeName)
|
|
|
},
|