|
@@ -56,6 +56,9 @@ import zxfw from '@/layout/index/zxfw.vue';
|
|
|
// 基本配置
|
|
|
import { kjfw } from '@/util/Basics';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: concolumn } = createNamespacedHelpers('concolumn');
|
|
|
+const { mapActions: connews } = createNamespacedHelpers('connews');
|
|
|
+
|
|
|
export default {
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -127,8 +130,33 @@ export default {
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...concolumn({ columnquery: 'query', columnfetch: 'fetch' }),
|
|
|
+ ...connews({ connewsquery: 'query', connewsfetch: 'fetch' }),
|
|
|
+ async search() {
|
|
|
+ let res = await this.columnquery();
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ let zxzx = res.data.find(i => i.site == 'zxzx');
|
|
|
+ if (zxzx) {
|
|
|
+ let res = await this.connewsquery({ limit: 9, column_id: zxzx.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${zxzx.site}List`, res.data);
|
|
|
+ }
|
|
|
+ let tztg = res.data.find(i => i.site == 'tztg');
|
|
|
+ if (tztg) {
|
|
|
+ let res = await this.connewsquery({ limit: 5, column_id: tztg.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${tztg.site}List`, res.data);
|
|
|
+ }
|
|
|
+ let zcfg = res.data.find(i => i.site == 'zcfg');
|
|
|
+ if (zcfg) {
|
|
|
+ let res = await this.connewsquery({ limit: 5, column_id: zcfg.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${zcfg.site}List`, res.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|