|
@@ -159,7 +159,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
|
|
|
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
props: {},
|
|
props: {},
|
|
@@ -272,10 +272,33 @@ export default {
|
|
content: '办公地址:长春市经济技术开发区金川街151号,吉林省高等学校毕业生就业指导中心2楼一站式办公大厅,邮编:130033。',
|
|
content: '办公地址:长春市经济技术开发区金川街151号,吉林省高等学校毕业生就业指导中心2楼一站式办公大厅,邮编:130033。',
|
|
sydw: require('@a/sydw.png'),
|
|
sydw: require('@a/sydw.png'),
|
|
},
|
|
},
|
|
|
|
+ modules: [],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {},
|
|
|
|
- methods: {},
|
|
|
|
|
|
+ created() {
|
|
|
|
+ this.searchinfo();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ ...mapActions(['getAllNews', 'getAllColumn', 'getModule']),
|
|
|
|
+ async searchinfo() {
|
|
|
|
+ let arr = await this.getModule({ type: `list` });
|
|
|
|
+ sessionStorage.setItem('modules', JSON.stringify(arr.data));
|
|
|
|
+ this.$set(this, `modules`, arr.data);
|
|
|
|
+ let ids = this.modules.map(item => item.id);
|
|
|
|
+ let result = await this.getAllColumn(ids);
|
|
|
|
+ console.log(result);
|
|
|
|
+ if (result.length > 0) {
|
|
|
|
+ //整理栏目
|
|
|
|
+ result = result.map(item => {
|
|
|
|
+ if (item.type === 'column') item.path = `/newsList/module/${item.id}`;
|
|
|
|
+ else item.path = `/newsList/module/${item.content_id}`;
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
|
|
+ let val = await this.getAllNews(result);
|
|
|
|
+ console.log(val);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ },
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user']),
|
|
...mapState(['user']),
|
|
pageTitle() {
|
|
pageTitle() {
|