|
@@ -5,10 +5,10 @@
|
|
<div class="w_1200">
|
|
<div class="w_1200">
|
|
<el-col :span="24" class="one">
|
|
<el-col :span="24" class="one">
|
|
<el-col :span="12" class="left">
|
|
<el-col :span="12" class="left">
|
|
- <venues :list="kydtList"></venues>
|
|
|
|
|
|
+ <venues :list="kpcgList"></venues>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12" class="right">
|
|
<el-col :span="12" class="right">
|
|
- <experience :list="xsjlList"></experience>
|
|
|
|
|
|
+ <experience :list="kptyList"></experience>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="two">
|
|
<el-col :span="24" class="two">
|
|
@@ -16,10 +16,10 @@
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="one">
|
|
<el-col :span="24" class="one">
|
|
<el-col :span="12" class="left">
|
|
<el-col :span="12" class="left">
|
|
- <read :list="ydhzList"></read>
|
|
|
|
|
|
+ <read :list="kxjdList"></read>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12" class="right">
|
|
<el-col :span="12" class="right">
|
|
- <science :list="hyyjList"></science>
|
|
|
|
|
|
+ <science :list="hkjList"></science>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</div>
|
|
</div>
|
|
@@ -34,8 +34,7 @@ import experience from './index/experience.vue';
|
|
import read from './index/read.vue';
|
|
import read from './index/read.vue';
|
|
import science from './index/science.vue';
|
|
import science from './index/science.vue';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
-const { mapActions: column } = createNamespacedHelpers('column');
|
|
|
|
-const { mapActions: news } = createNamespacedHelpers('news');
|
|
|
|
|
|
+const { mapActions: universal } = createNamespacedHelpers('universal');
|
|
export default {
|
|
export default {
|
|
metaInfo() {
|
|
metaInfo() {
|
|
return { title: this.$route.meta.title };
|
|
return { title: this.$route.meta.title };
|
|
@@ -51,31 +50,30 @@ export default {
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
imgUrl: require('@common/src/assets/center/kxpj.png'),
|
|
imgUrl: require('@common/src/assets/center/kxpj.png'),
|
|
- kydtList: [],
|
|
|
|
- xsjlList: [],
|
|
|
|
- ydhzList: [],
|
|
|
|
- hyyjList: [],
|
|
|
|
|
|
+ kpcgList: [],
|
|
|
|
+ kptyList: [],
|
|
|
|
+ kxjdList: [],
|
|
|
|
+ hkjList: [],
|
|
|
|
+ typeList: [
|
|
|
|
+ { name: '科普场馆', type: 'kpcg' },
|
|
|
|
+ { name: '科普体验', type: 'kpty' },
|
|
|
|
+ { name: '科学解读', type: 'kxjd' },
|
|
|
|
+ { name: '黑科技', type: 'hkj' },
|
|
|
|
+ ],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
async created() {
|
|
async created() {
|
|
await this.search();
|
|
await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- ...column({ columnQuery: 'query' }),
|
|
|
|
- ...news(['query']),
|
|
|
|
|
|
+ ...universal(['query']),
|
|
async search({ skip = 0, limit = 11, ...info } = {}) {
|
|
async search({ skip = 0, limit = 11, ...info } = {}) {
|
|
- let res = await this.columnQuery();
|
|
|
|
- if (this.$checkRes(res)) {
|
|
|
|
- for (const val of res.data) {
|
|
|
|
- let arr = await this.query({ skip, limit, column_id: val.id, ...info });
|
|
|
|
- if (this.$checkRes(arr)) {
|
|
|
|
- if (this[`${val.site}List`]) {
|
|
|
|
- this.$set(this, `${val.site}List`, arr.data);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ for (const val of this.typeList) {
|
|
|
|
+ let res = await this.query({ skip, limit, type: val.name, ...info });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `${val.type}List`, res.data);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(res);
|
|
|
|
},
|
|
},
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|