|
@@ -36,6 +36,9 @@ import foot from '@/components/common/foot.vue';
|
|
|
import videos from '@/layout/kjpx/videos.vue';
|
|
|
import right from '@/layout/kjpx/right.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: videomeet } = createNamespacedHelpers('videomeet');
|
|
|
+const { mapActions: traincolumn } = createNamespacedHelpers('traincolumn');
|
|
|
+const { mapActions: trainnews } = createNamespacedHelpers('trainnews');
|
|
|
export default {
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -111,8 +114,43 @@ export default {
|
|
|
],
|
|
|
};
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
+ async created() {
|
|
|
+ await this.search();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...videomeet({ videomeetquery: 'query' }),
|
|
|
+ ...traincolumn({ columnquery: 'query', columnfetch: 'fetch' }),
|
|
|
+ ...trainnews({ connewsquery: 'query', connewsfetch: 'fetch' }),
|
|
|
+ async search() {
|
|
|
+ let res = await this.videomeetquery({ limit: 7 });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `videoList`, res.data);
|
|
|
+ }
|
|
|
+ res = await this.columnquery();
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ let ztyt = res.data.find(i => i.site == 'ztyt');
|
|
|
+ if (ztyt) {
|
|
|
+ let res = await this.connewsquery({ limit: 16, column_id: ztyt.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${ztyt.site}List`, res.data);
|
|
|
+ }
|
|
|
+ let jswd = res.data.find(i => i.site == 'jswd');
|
|
|
+ if (jswd) {
|
|
|
+ let res = await this.connewsquery({ limit: 16, column_id: jswd.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${jswd.site}List`, res.data);
|
|
|
+ }
|
|
|
+ let hyyj = res.data.find(i => i.site == 'hyyj');
|
|
|
+ if (hyyj) {
|
|
|
+ let res = await this.connewsquery({ limit: 16, column_id: hyyj.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${hyyj.site}List`, res.data);
|
|
|
+ }
|
|
|
+ let jypx = res.data.find(i => i.site == 'jypx');
|
|
|
+ if (jypx) {
|
|
|
+ let res = await this.connewsquery({ limit: 16, column_id: jypx.id });
|
|
|
+ if (this.$checkRes(res)) this.$set(this, `${jypx.site}List`, res.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ },
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
},
|