|
@@ -47,11 +47,7 @@ import expert from './index/expert.vue';
|
|
import technology from './index/technology.vue';
|
|
import technology from './index/technology.vue';
|
|
import roadshow from './index/roadshow.vue';
|
|
import roadshow from './index/roadshow.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
-const { mapActions: product } = createNamespacedHelpers('product');
|
|
|
|
-const { mapActions: mapPatent } = createNamespacedHelpers('patent');
|
|
|
|
-const { mapActions: mapExpert } = createNamespacedHelpers('expert');
|
|
|
|
-const { mapActions: mapRoadShow } = createNamespacedHelpers('roadShow');
|
|
|
|
-
|
|
|
|
|
|
+const { mapActions: productIndex } = createNamespacedHelpers('productIndex');
|
|
export default {
|
|
export default {
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
@@ -87,29 +83,17 @@ export default {
|
|
await this.search();
|
|
await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...product({ productQuery: 'query' }),
|
|
|
|
- ...mapPatent({ patentQuery: 'query' }),
|
|
|
|
- ...mapExpert({ expertQuery: 'query' }),
|
|
|
|
- ...mapRoadShow({ roadShowQuery: 'query' }),
|
|
|
|
|
|
+ ...productIndex(['query']),
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
- // 技术成果
|
|
|
|
- let res = await this.productQuery({ skip, limit: 6, status: '2', type: '1', ...info });
|
|
|
|
- if (this.$checkRes(res)) this.$set(this, `achieveList`, res.data);
|
|
|
|
- // 科技需求
|
|
|
|
- res = await this.productQuery({ skip, limit: 6, status: '2', type: '0', ...info });
|
|
|
|
- if (this.$checkRes(res)) this.$set(this, `technologyList`, res.data);
|
|
|
|
- // 商务服务
|
|
|
|
- res = await this.productQuery({ skip, limit: 5, status: '2', type: '2', ...info });
|
|
|
|
- if (this.$checkRes(res)) this.$set(this, `businessList`, res.data);
|
|
|
|
- // e专利
|
|
|
|
- res = await this.patentQuery({ skip, limit: 6, ...info });
|
|
|
|
- if (this.$checkRes(res)) this.$set(this, `patentList`, res.data);
|
|
|
|
- // 专家智库
|
|
|
|
- res = await this.expertQuery({ skip, limit: 8, ...info });
|
|
|
|
- if (this.$checkRes(res)) this.$set(this, `expertList`, res.data);
|
|
|
|
- // 项目路演
|
|
|
|
- res = await this.roadShowQuery({ skip, limit: 5, ...info });
|
|
|
|
- if (this.$checkRes(res)) this.$set(this, `roadshowList`, res.data);
|
|
|
|
|
|
+ let res = await this.query({ ...info });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `achieveList`, res.data.achieve);
|
|
|
|
+ this.$set(this, `technologyList`, res.data.require);
|
|
|
|
+ this.$set(this, `businessList`, res.data.serve);
|
|
|
|
+ this.$set(this, `patentList`, res.data.patent);
|
|
|
|
+ this.$set(this, `expertList`, res.data.expert);
|
|
|
|
+ this.$set(this, `roadshowList`, res.data.roadShow);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|