|
@ -5,14 +5,14 @@ |
|
|
--> |
|
|
--> |
|
|
|
|
|
|
|
|
<template> |
|
|
<template> |
|
|
<div class="enterprise-bg" v-if="newPartners && newPartners.length > 0"> |
|
|
<div class="enterprise-bg" v-if="partners && partners.length > 0"> |
|
|
<div class="d-flex flex-wrap px-5"> |
|
|
<div class="d-flex flex-wrap px-5"> |
|
|
<div |
|
|
<div |
|
|
:class="(index + 1) % 3 === 0 ? 'enterprise-box1' : ''" |
|
|
:class="(index + 1) % 3 === 0 ? 'enterprise-box1' : ''" |
|
|
:key="index" |
|
|
:key="index" |
|
|
@click="openProfile(item.name, item.description)" |
|
|
@click="openProfile(item.name, item.description)" |
|
|
class="enterprise-box d-flex flex-column align-center justify-center white mb-8" |
|
|
class="enterprise-box d-flex flex-column align-center justify-center white mb-8" |
|
|
v-for="(item, index) in newPartners" |
|
|
v-for="(item, index) in partners" |
|
|
> |
|
|
> |
|
|
<img :src="item.logoUrl" class="enterprise-pic my-2" v-if="item.logoUrl" /> |
|
|
<img :src="item.logoUrl" class="enterprise-pic my-2" v-if="item.logoUrl" /> |
|
|
<div class="font-bold-24 title-color my-2">{{ item.name }}</div> |
|
|
<div class="font-bold-24 title-color my-2">{{ item.name }}</div> |
|
@ -32,11 +32,11 @@ |
|
|
<div class="d-flex flex-row-reverse pb-10 enterprise-page"> |
|
|
<div class="d-flex flex-row-reverse pb-10 enterprise-page"> |
|
|
<a-pagination |
|
|
<a-pagination |
|
|
:default-page-size="6" |
|
|
:default-page-size="6" |
|
|
:total="newPartners.length" |
|
|
:total="partners.length" |
|
|
@change="onChange" |
|
|
@change="onChange" |
|
|
show-less-items |
|
|
show-less-items |
|
|
v-model="current" |
|
|
v-model="current" |
|
|
v-show="newPartners.length > 6" |
|
|
v-show="partners.length > 6" |
|
|
/> |
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -63,67 +63,26 @@ export default { |
|
|
return { |
|
|
return { |
|
|
current: 1, |
|
|
current: 1, |
|
|
showProfile: false, // 显示公司介绍 |
|
|
showProfile: false, // 显示公司介绍 |
|
|
newPartners: [ |
|
|
|
|
|
{ |
|
|
|
|
|
description: '132', |
|
|
|
|
|
name: '测试公司1', |
|
|
|
|
|
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
description: '132', |
|
|
|
|
|
name: '测试公司1', |
|
|
|
|
|
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
description: '132', |
|
|
|
|
|
name: '测试公司1', |
|
|
|
|
|
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
description: '132', |
|
|
|
|
|
name: '测试公司1', |
|
|
|
|
|
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
description: '132', |
|
|
|
|
|
name: '测试公司1', |
|
|
|
|
|
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2816433753,267880517&fm=26&gp=0.jpg', |
|
|
|
|
|
}, |
|
|
|
|
|
], |
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
...mapState('home', ['partners', 'profile']), |
|
|
...mapState('home', ['partners', 'profile']), |
|
|
|
|
|
|
|
|
// newPartners() { |
|
|
|
|
|
// let { partners } = this; |
|
|
|
|
|
// let arr = []; |
|
|
|
|
|
// if (partners && partners.length > 0) { |
|
|
|
|
|
// for (let i = 0; i < partners.length; i++) { |
|
|
|
|
|
// const element = partners[i]; |
|
|
|
|
|
// for (let j = 0; j < element.backendSearchList.length; j++) { |
|
|
|
|
|
// const item = element.backendSearchList[j]; |
|
|
|
|
|
// arr.push(item); |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// return arr; |
|
|
|
|
|
// } |
|
|
|
|
|
// return arr; |
|
|
|
|
|
// }, |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
async created() { |
|
|
async created() { |
|
|
this.setPartners([]); |
|
|
this.setPartners([]); |
|
|
const { title, typeOfPlatform } = this; |
|
|
const { title, typeOfPlatform } = this; |
|
|
|
|
|
console.log('title, typeOfPlatform : ', title, typeOfPlatform); |
|
|
const params = { |
|
|
const params = { |
|
|
param: { |
|
|
param: { |
|
|
pageNum: this.current, |
|
|
pageNum: 1, |
|
|
pageSize: 6, |
|
|
// pageSize: -1, |
|
|
type: title === '合作伙伴' ? 1 : 2, |
|
|
type: title === '中心介绍' ? 0 : title === '合作伙伴' ? 1 : 2, |
|
|
typeOfPlatform: typeOfPlatform === '关于我们' ? 2 : 1, |
|
|
typeOfPlatform: typeOfPlatform === '研究院' ? 0 : typeOfPlatform === '孵化平台' ? 1 : 2, |
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
|
|
|
console.log('params: ', params); |
|
|
await this.getFrontSearchCompany(params); |
|
|
await this.getFrontSearchCompany(params); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|