|
@@ -6,14 +6,14 @@
|
|
|
<el-col :span="16" class="one_1">
|
|
|
<el-carousel height="500px">
|
|
|
<el-carousel-item v-for="(item, index) in bannerList" :key="index">
|
|
|
- <el-image class="image" :src="item.url"></el-image>
|
|
|
+ <el-image class="image" :src="item.img_url && item.img_url.length > 0 ? item.img_url[0].url : ''"></el-image>
|
|
|
</el-carousel-item>
|
|
|
</el-carousel>
|
|
|
</el-col>
|
|
|
<el-col :span="8" class="one_2">
|
|
|
<el-col :span="24" class="newsList" v-for="(item, index) in newsList" :key="index">
|
|
|
<el-col :span="24" class="title textOver">{{ item.title }}</el-col>
|
|
|
- <el-col :span="24" class="date">{{ item.date }}</el-col>
|
|
|
+ <el-col :span="24" class="date">{{ item.create_time }}</el-col>
|
|
|
<el-col :span="24" class="brief">{{ item.brief }}</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -46,7 +46,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="thr_2">
|
|
|
<el-col :span="8" class="thrList" v-for="(item, index) in thrList" :key="index">
|
|
|
- <el-image class="image" :src="item.url"></el-image>
|
|
|
+ <el-image class="image" :src="item.img_url && item.img_url.length > 0 ? item.img_url[0].url : ''"></el-image>
|
|
|
<el-col :span="24" class="title textOver">{{ item.title }}</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -58,6 +58,10 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+const { mapActions: banner } = createNamespacedHelpers('banner');
|
|
|
+const { mapActions: news } = createNamespacedHelpers('news');
|
|
|
+const { mapActions: cases } = createNamespacedHelpers('cases');
|
|
|
+
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -67,66 +71,39 @@ export default {
|
|
|
// 基本信息
|
|
|
siteInfo: {},
|
|
|
// 轮播图
|
|
|
- bannerList: [{ url: require('@a/photo_2.jpg') }],
|
|
|
+ bannerList: [],
|
|
|
// 新闻
|
|
|
- newsList: [
|
|
|
- {
|
|
|
- title: '物联网应用开发实时操作系统Zephyr',
|
|
|
- date: '2023-02-02',
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '物联网应用开发实时操作系统Zephyr',
|
|
|
- date: '2023-02-02',
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '物联网应用开发实时操作系统Zephyr',
|
|
|
- date: '2023-02-02',
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '物联网应用开发实时操作系统Zephyr',
|
|
|
- date: '2023-02-02',
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
- },
|
|
|
- ],
|
|
|
- // 第三部分
|
|
|
- thrList: [
|
|
|
- {
|
|
|
- url: require('@a/solve_4.jpg'),
|
|
|
- title: '软件开发品牌Modulor 视觉识别系统',
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/solve_5.jpg'),
|
|
|
- title: '软件开发品牌Modulor 视觉识别系统',
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/solve_6.jpg'),
|
|
|
- title: '软件开发品牌Modulor 视觉识别系统',
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/solve_7.jpg'),
|
|
|
- title: '软件开发品牌Modulor 视觉识别系统',
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/solve_8.jpg'),
|
|
|
- title: '软件开发品牌Modulor 视觉识别系统',
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/solve_9.jpg'),
|
|
|
- title: '软件开发品牌Modulor 视觉识别系统',
|
|
|
- },
|
|
|
- ],
|
|
|
+ newsList: [],
|
|
|
+ // 案例
|
|
|
+ thrList: [],
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- search() {
|
|
|
+ ...banner({ bQuery: 'query' }),
|
|
|
+ ...news({ nQuery: 'query' }),
|
|
|
+ ...cases({ cQuery: 'query' }),
|
|
|
+ async search() {
|
|
|
+ let res;
|
|
|
let companyInfo = sessionStorage.getItem('companyInfo');
|
|
|
this.$set(this, `siteInfo`, JSON.parse(companyInfo));
|
|
|
+ // 轮播图
|
|
|
+ res = await this.bQuery({ skip: 0, limit: 6, is_use: '0', place: this.$route.meta.place });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `bannerList`, res.data);
|
|
|
+ }
|
|
|
+ // 新闻
|
|
|
+ res = await this.nQuery({ skip: 0, limit: 6, is_use: '0', place: this.$route.meta.place });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `newsList`, res.data);
|
|
|
+ }
|
|
|
+ // 案例
|
|
|
+ res = await this.cQuery({ skip: 0, limit: 6, is_use: '0' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `thrList`, res.data);
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
computed: {
|