You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
3.1 KiB

5 years ago
<template>
<div>
<banner :show-page="showPage" />
<h-nav />
<div class="inner">
<bread-crumb :arr="arr" />
</div>
<div class="flow-path">
<div class="flow-title">服务流程</div>
<div class="flow-content">
5 years ago
<img src="~assets/image.png" style="width:100%" />
5 years ago
</div>
</div>
<div class="inner d-flex flex-wrap">
5 years ago
<div
:class="(index + 1) % 4 === 0 ? 'margin-0' : ''"
:key="index"
5 years ago
class="item-box mb-8"
5 years ago
v-for="(item, index) in list"
>
5 years ago
<img :src="item.picUrl" style="height: 220px; width: 100%; border: 1px solid #ccc" />
5 years ago
<p class="font-24 my-4">{{ item.name }}</p>
5 years ago
<p class="font-16 my-4 textColor line-height-30 item-content">{{ item.intro }}</p>
5 years ago
<p
@click="jump(item.id)"
class="font-16 baseColor"
style="text-align: right; cursor: pointer"
>了解更多</p>
5 years ago
</div>
</div>
<div class="inner">
<a-pagination
:current="current"
:page-size="pageSize"
:total="total"
@change="onShowSizeChange"
class="pagination"
show-less-items
show-quick-jumper
5 years ago
v-show="total > 8"
5 years ago
/>
</div>
</div>
</template>
<script>
5 years ago
import { mapMutations } from 'vuex';
import { selService } from 'config/api';
5 years ago
import Banner from 'components/Banner/Banner.vue';
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
export default {
name: 'Services',
components: { Banner, HNav, BreadCrumb },
data() {
return {
title: '创业服务',
showPage: 46,
arr: [
{ name: '孵化平台', url: '/IncubationPlatform/MakerSpace' },
5 years ago
{ name: '创业服务', url: '/IncubationPlatform/Services' },
5 years ago
],
list: [],
current: 1,
pageSize: 8,
total: 0,
};
},
5 years ago
created() {
this.getService();
},
5 years ago
methods: {
5 years ago
...mapMutations('home', ['setServiceArr']),
5 years ago
// 改变单当前页数
onShowSizeChange(current, size) {
this.current = current;
},
5 years ago
// 获取服务列表
async getService() {
try {
const params = { param: { serviceType: 2 } };
const res = await selService(params);
const { code, data, msg } = res.data;
if (code === 200) {
this.list = data;
}
} catch (error) {
console.log(data);
}
},
5 years ago
// 查看 服务 详情
jump(id) {
console.log(id);
5 years ago
this.setServiceArr([]);
this.setServiceArr(this.arr);
5 years ago
this.$router.push({
path: '/NewPlatform/ServiceDet',
name: 'ServiceDet',
params: { id },
});
},
},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 40px auto;
}
.pagination {
text-align: right;
}
.item-box {
width: 20.5%;
margin-right: 6%;
border-radius: 4px;
}
5 years ago
.item-content {
display: -webkit-box;
overflow: hidden;
white-space: normal !important;
text-overflow: ellipsis;
word-wrap: break-word;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
height: 60px;
}
5 years ago
.margin-0 {
margin-right: 0 !important;
}
</style>