|
@@ -6,14 +6,14 @@
|
|
<el-col :span="16" class="one_1">
|
|
<el-col :span="16" class="one_1">
|
|
<el-carousel height="500px">
|
|
<el-carousel height="500px">
|
|
<el-carousel-item v-for="(item, index) in bannerList" :key="index">
|
|
<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-item>
|
|
</el-carousel>
|
|
</el-carousel>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="8" class="one_2">
|
|
<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="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="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 :span="24" class="brief">{{ item.brief }}</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
@@ -38,14 +38,14 @@
|
|
v-for="(item, index) in typeList"
|
|
v-for="(item, index) in typeList"
|
|
:key="index"
|
|
:key="index"
|
|
@mouseenter="typeEnter(item, index)"
|
|
@mouseenter="typeEnter(item, index)"
|
|
- >{{ item.title }}</span
|
|
|
|
|
|
+ >{{ item.label }}</span
|
|
>
|
|
>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="four_1_2">
|
|
<el-col :span="24" class="four_1_2">
|
|
<el-col :span="24" class="four1List" v-for="(item, index) in four1List" :key="index">
|
|
<el-col :span="24" class="four1List" v-for="(item, index) in four1List" :key="index">
|
|
<el-col :span="4" class="date">
|
|
<el-col :span="4" class="date">
|
|
- <el-col :span="24" class="date_1">{{ getDate(item.date, 'day') }}</el-col>
|
|
|
|
- <el-col :span="24" class="date_2">{{ getDate(item.date, 'year') }}</el-col>
|
|
|
|
|
|
+ <el-col :span="24" class="date_1">{{ getDate(item.create_time, 'day') }}</el-col>
|
|
|
|
+ <el-col :span="24" class="date_2">{{ getDate(item.create_time, 'year') }}</el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="20" class="info">
|
|
<el-col :span="20" class="info">
|
|
<el-col :span="24" class="title">{{ item.title }}</el-col>
|
|
<el-col :span="24" class="title">{{ item.title }}</el-col>
|
|
@@ -69,6 +69,10 @@
|
|
<script>
|
|
<script>
|
|
import { mapState, mapGetters, mapMutations, createNamespacedHelpers } from 'vuex';
|
|
import { mapState, mapGetters, mapMutations, createNamespacedHelpers } from 'vuex';
|
|
const { mapActions } = createNamespacedHelpers('company');
|
|
const { mapActions } = createNamespacedHelpers('company');
|
|
|
|
+const { mapActions: banner } = createNamespacedHelpers('banner');
|
|
|
|
+const { mapActions: news } = createNamespacedHelpers('news');
|
|
|
|
+const { mapActions: dictdata } = createNamespacedHelpers('dictdata');
|
|
|
|
+
|
|
const moment = require('moment');
|
|
const moment = require('moment');
|
|
export default {
|
|
export default {
|
|
name: 'homeIndex',
|
|
name: 'homeIndex',
|
|
@@ -79,61 +83,15 @@ export default {
|
|
// 基本信息
|
|
// 基本信息
|
|
siteInfo: {},
|
|
siteInfo: {},
|
|
// 轮播图
|
|
// 轮播图
|
|
- bannerList: [{ url: require('@a/photo_1.jpg') }],
|
|
|
|
|
|
+ bannerList: [],
|
|
// 新闻
|
|
// 新闻
|
|
- newsList: [
|
|
|
|
- {
|
|
|
|
- title: '继北京事件之后 圆通西安站点也爆仓了',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '继北京事件之后 圆通西安站点也爆仓了',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '继北京事件之后 圆通西安站点也爆仓了',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '继北京事件之后 圆通西安站点也爆仓了',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief: '作为网购整个流程中的重要一环,快递的作用可想而知,作为网购整个流程中的重要一环,快递的作用可想而知,',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ newsList: [],
|
|
// 第三部分
|
|
// 第三部分
|
|
thr_url: require('@a/thr_1.jpg'),
|
|
thr_url: require('@a/thr_1.jpg'),
|
|
// 第四部分
|
|
// 第四部分
|
|
- typeList: [{ title: '新闻资讯' }, { title: '数据中心' }, { title: '行业动态' }],
|
|
|
|
|
|
+ typeList: [],
|
|
type_active: '0',
|
|
type_active: '0',
|
|
- four1List: [
|
|
|
|
- {
|
|
|
|
- title: '远程医疗软件系统平台开发解决方案分析!',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief:
|
|
|
|
- '随着生活水平的提高,人们越来越关注自己的健康,都希望得到便捷和高质量的医疗保健服务。但由于医疗资源分布不均,不少地方医疗条件落后,医疗资源共享也不到位,致使病人难以获得完善的医疗服务。',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '远程医疗软件系统平台开发解决方案分析!',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief:
|
|
|
|
- '随着生活水平的提高,人们越来越关注自己的健康,都希望得到便捷和高质量的医疗保健服务。但由于医疗资源分布不均,不少地方医疗条件落后,医疗资源共享也不到位,致使病人难以获得完善的医疗服务。',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '远程医疗软件系统平台开发解决方案分析!',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief:
|
|
|
|
- '随着生活水平的提高,人们越来越关注自己的健康,都希望得到便捷和高质量的医疗保健服务。但由于医疗资源分布不均,不少地方医疗条件落后,医疗资源共享也不到位,致使病人难以获得完善的医疗服务。',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- title: '远程医疗软件系统平台开发解决方案分析!',
|
|
|
|
- date: '2023-02-02',
|
|
|
|
- brief:
|
|
|
|
- '随着生活水平的提高,人们越来越关注自己的健康,都希望得到便捷和高质量的医疗保健服务。但由于医疗资源分布不均,不少地方医疗条件落后,医疗资源共享也不到位,致使病人难以获得完善的医疗服务。',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
|
|
+ four1List: [],
|
|
four2List: [
|
|
four2List: [
|
|
{
|
|
{
|
|
url: require('@a/four_1.jpg'),
|
|
url: require('@a/four_1.jpg'),
|
|
@@ -146,25 +104,42 @@ export default {
|
|
],
|
|
],
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
- this.search();
|
|
|
|
|
|
+ async created() {
|
|
|
|
+ await this.searchOther();
|
|
|
|
+ await this.search();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapMutations(['deleteUser']),
|
|
...mapMutations(['deleteUser']),
|
|
...mapActions(['query']),
|
|
...mapActions(['query']),
|
|
|
|
+ ...banner({ bQuery: 'query' }),
|
|
|
|
+ ...news({ nQuery: 'query' }),
|
|
|
|
+ ...dictdata({ dQuery: 'query' }),
|
|
async search() {
|
|
async search() {
|
|
// 公司信息
|
|
// 公司信息
|
|
let res;
|
|
let res;
|
|
res = await this.query();
|
|
res = await this.query();
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
- console.log(res.data);
|
|
|
|
this.$set(this, `siteInfo`, res.data);
|
|
this.$set(this, `siteInfo`, res.data);
|
|
sessionStorage.setItem('companyInfo', JSON.stringify(res.data));
|
|
sessionStorage.setItem('companyInfo', JSON.stringify(res.data));
|
|
}
|
|
}
|
|
|
|
+ // 轮播图
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
- typeEnter(e, index) {
|
|
|
|
|
|
+ // 新闻类型选择
|
|
|
|
+ async typeEnter(e, index) {
|
|
this.$set(this, `type_active`, index);
|
|
this.$set(this, `type_active`, index);
|
|
- console.log(index);
|
|
|
|
|
|
+ let res = await this.nQuery({ skip: 0, limit: 4, is_use: '0', type: e.value });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `four1List`, res.data);
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 整理时间
|
|
// 整理时间
|
|
getDate(e, type) {
|
|
getDate(e, type) {
|
|
@@ -178,6 +153,16 @@ export default {
|
|
else '暂无';
|
|
else '暂无';
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 查询其他信息
|
|
|
|
+ async searchOther() {
|
|
|
|
+ let res;
|
|
|
|
+ // 新闻类型
|
|
|
|
+ res = await this.dQuery({ type: 'news_type' });
|
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
|
+ this.$set(this, `typeList`, res.data);
|
|
|
|
+ if (res.total > 0) this.typeEnter(res.data[0], this.type_active);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapState(['user', 'test']),
|
|
...mapState(['user', 'test']),
|