Browse Source

关于我们 联系我们

master
lucky 5 years ago
parent
commit
036cb5a0aa
  1. 44
      src/common/portrait.styl
  2. 45
      src/components/Banner/Banner.vue
  3. 32
      src/components/BreadCrumb/BreadCrumb.vue
  4. 17
      src/components/HeadNav/HeadNav.vue
  5. 40
      src/components/Introduce/CompanyProfile.vue
  6. 113
      src/components/Introduce/ContactUs.vue
  7. 157
      src/components/Introduce/DeriveEnterprise.vue
  8. 382
      src/components/Introduce/Model.vue
  9. 33
      src/components/Introduce/PartnerShip.styl
  10. 97
      src/components/Introduce/PartnerShip.vue
  11. 44
      src/components/Introduce/RichText.vue
  12. 22
      src/config/api.js
  13. 2
      src/plugins/ant-design-vue.js
  14. 118
      src/router/index.js
  15. 78
      src/store/modules/home/actions.js
  16. 36
      src/store/modules/home/mutations.js
  17. 5
      src/store/modules/home/state.js
  18. 1
      src/store/modules/user/state.js
  19. 7
      src/views/About/About.vue
  20. 42
      src/views/About/Children/Introduce.vue
  21. 42
      src/views/About/Children/Organ.vue
  22. 39
      src/views/About/Children/Partner.vue
  23. 39
      src/views/About/Children/SpinOffs.vue
  24. 62
      src/views/About/components/HNav.vue
  25. 19
      src/views/About/components/Introduce.vue
  26. 19
      src/views/About/components/Organ.vue
  27. 19
      src/views/About/components/Partner.vue
  28. 47
      src/views/ContactUs/ContactUs.vue
  29. 6
      src/views/FirstPage/FirstPage.vue

44
src/common/portrait.styl

@ -42,6 +42,11 @@
padding-right: 12px; padding-right: 12px;
} }
.py-5{
padding-top: 20px;
padding-bottom: 20px;
}
// margin // margin
.ma-3 { .ma-3 {
margin: 12px; margin: 12px;
@ -67,6 +72,11 @@
margin-bottom: 16px; margin-bottom: 16px;
} }
.my-5{
margin-top: 20px;
margin-bottom: 20px;
}
.mt-1{ .mt-1{
margin-top: 4px; margin-top: 4px;
} }
@ -119,6 +129,14 @@
margin-bottom: 32px; margin-bottom: 32px;
} }
.mb-9{
margin-bottom: 36px;
}
.mb-10{
margin-bottom: 40px;
}
.ml-2{ .ml-2{
margin-left: 8px; margin-left: 8px;
} }
@ -225,6 +243,10 @@
align-items: center align-items: center
} }
.align-left{
align-items: flex-start
}
.align-end{ .align-end{
align-items: flex-end align-items: flex-end
} }
@ -331,9 +353,7 @@ h2{
color: rgba(0,0,0,.85) color: rgba(0,0,0,.85)
} }
.textColor{
color: rgba(0,0,0,.65)
}
.baseColor{ .baseColor{
color: #13ACC4 color: #13ACC4
@ -360,6 +380,24 @@ h2{
background: #AACD06 background: #AACD06
} }
//
.white--text{ .white--text{
color: #fff color: #fff
} }
.title-color{
color: rgba(0,0,0,.85)
}
.textColor{
color: rgba(0,0,0,.65)
}
.secondary{
color: rgba(0,0,0,.45)
}
// line-height
.line-height-30{
line-height: 30px
}

45
src/components/Banner/Banner.vue

@ -0,0 +1,45 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<a-carousel :autoplay="false">
<div :key="item.id" v-for="item in bannerLists">
<img :src="item.url" alt />
</div>
</a-carousel>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'RichText',
props: {
showPage: {
type: Number,
default: 11,
},
},
data() {
return {};
},
computed: mapState('home', ['bannerLists']),
async created() {
this.setBannerLists([]);
await this.getQueryRotation(this.showPage);
},
methods: {
...mapMutations('home', ['setBannerLists']),
...mapActions('home', ['getQueryRotation']),
},
};
</script>
<style lang="stylus" scoped></style>

32
src/components/BreadCrumb/BreadCrumb.vue

@ -0,0 +1,32 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<a-breadcrumb>
<a-breadcrumb-item>绿谷生物</a-breadcrumb-item>
<a-breadcrumb-item :key="index" v-for="(item,index) in arr">
<router-link :to="item.url">{{ item.name }}</router-link>
</a-breadcrumb-item>
</a-breadcrumb>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'RichText',
props: {
arr: {
type: Array,
default: () => [],
},
},
data() {
return {};
},
};
</script>
<style lang="stylus" scoped></style>

17
src/components/HeadNav/HeadNav.vue

@ -2,7 +2,12 @@
<div class="head"> <div class="head">
<img @click="jumUrl('/')" alt class="logo-img" src="@/assets/logo.png" style="cursor: pointer" /> <img @click="jumUrl('/')" alt class="logo-img" src="@/assets/logo.png" style="cursor: pointer" />
<div class="li-box"> <div class="li-box">
<a-dropdown :disabled="item.children.length > 0 ? false : true" :key="a" class="list-down" v-for="(item, a) in list"> <a-dropdown
:disabled="item.children.length > 0 ? false : true"
:key="a"
class="list-down"
v-for="(item, a) in list"
>
<a @click="jumUrl(item.url)" class="ant-dropdown-link"> <a @click="jumUrl(item.url)" class="ant-dropdown-link">
{{ item.name }}&nbsp;&nbsp; {{ item.name }}&nbsp;&nbsp;
<a-icon type="down" v-show="item.children.length > 0" /> <a-icon type="down" v-show="item.children.length > 0" />
@ -31,22 +36,23 @@ export default {
list: [ list: [
{ {
name: '关于我们', name: '关于我们',
url: '/About/Introduce',
children: [ children: [
{ {
title: '公司介绍', title: '公司介绍',
url: '', url: '/About/Introduce',
}, },
{ {
title: '组织机构', title: '组织机构',
url: '', url: '/About/Organ',
}, },
{ {
title: '合作伙伴', title: '合作伙伴',
url: '', url: '/About/Partner',
}, },
{ {
title: '衍生企业', title: '衍生企业',
url: '', url: '/About/SpinOffs',
}, },
], ],
}, },
@ -149,6 +155,7 @@ export default {
{ {
name: '联系我们', name: '联系我们',
children: [], children: [],
url: '/ContactUs',
}, },
], ],
}; };

40
src/components/Introduce/CompanyProfile.vue

@ -0,0 +1,40 @@
<template>
<div>
<a-modal
:footer="null"
:title="profile.title"
:visible="showProfile"
@cancel="handleCancel"
@ok="handleCancel"
>
<p>{{ profile.description }}</p>
</a-modal>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
props: {
showProfile: {
type: Boolean,
default: false,
},
},
data() {
return {
ModalText: 'Content of the modal',
};
},
computed: mapState('home', ['profile']),
methods: {
handleCancel(e) {
this.$emit('closeProfile');
},
},
};
</script>

113
src/components/Introduce/ContactUs.vue

@ -0,0 +1,113 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<div class="contact d-flex flex-nowrap">
<img :src="img" alt class="contact-img flex-1" />
<div class="contact-right">
<div>
<a-icon class="baseColor icon-size" type="user" />
<p>
高璨
<span class="ml-6">19935658782</span>
</p>
</div>
<div>
<a-icon class="baseColor icon-size" type="phone" />
<p>
0351 5223175
<span class="ml-6">0351 5223179</span>
</p>
</div>
<div>
<a-icon class="baseColor icon-size" type="mail" />
<p>lgzc2020@163.com</p>
</div>
<div>
<i class="iconfont icon-local baseColor"></i>
<p>山西省太原市晋阳街202号英语周报大厦八层</p>
</div>
<div class="code-box">
<a-icon class="baseColor icon-size" type="wechat" />
<img
alt
src="https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2059927486,2456161292&fm=26&gp=0.jpg"
/>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'RichText',
components: {},
data() {
return {
sort: [
{ id: 1, component: 'title' },
{ id: 2, component: 'content' },
{ id: 3, component: 'picture' },
],
str: '联系我们组件',
img: 'https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1641353646,126669045&fm=26&gp=0.jpg',
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.contact {
height: 444px;
position: relative;
border: 1px solid rgba(112, 112, 112, 0.14901960784313725);
background: #fff;
}
.contact-img {
width: 790px;
height: 100%;
}
.contact-right {
height: 100%;
width: 360px;
padding: 0 24px;
div {
margin-top: 24px;
height: 24px;
line-height: 24px;
position: relative;
p {
position: absolute;
left: 40px;
top: 0;
font-size: 16px;
font-family: Microsoft YaHei;
font-weight: 400;
line-height: 24px;
color: rgba(0, 0, 0, 0.65);
opacity: 1;
}
}
}
.code-box {
margin-top: 44px !important;
img {
position: absolute;
width: 120px;
height: 120px;
left: 40px;
}
}
</style>

157
src/components/Introduce/DeriveEnterprise.vue

@ -0,0 +1,157 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div class="d-flex flex-wrap" v-if="newPartners && newPartners.length > 0">
<div
:class="(index+1)%3===0? 'enterprise-box1' : ''"
:key="index"
@click="openProfile(item.name,item.description)"
class="enterprise-box d-flex flex-column align-center white mb-8"
v-for="(item,index) in newPartners"
>
<img :src="item.logoUrl" class="enterprise-pic my-2" />
<div class="font-bold-24 title-color my-2">{{ item.name }}</div>
<div
class="font-16 textColor d-flex flex-wrap align-left fill-width px-3"
>{{ item.description }}</div>
<div class="d-flex flex-nowrap fill-width mr-3">
<div class="flex-1"></div>
<span class="baseColor">
了解更多
<a-icon type="arrow-right" />
</span>
</div>
</div>
<company-profile :showProfile="showProfile" @closeProfile="closeProfile" v-if="showProfile" />
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import CompanyProfile from './CompanyProfile.vue';
export default {
components: { CompanyProfile },
name: 'DeriveEnterprise',
props: {
title: {
type: String,
default: '',
},
typeOfPlatform: {
type: String,
default: '',
},
},
data() {
return {
showProfile: false, //
partners: [
{
typeOfTech: 2,
backendSearchList: [
{
description: '我是好人,谁是好人',
logo: 300,
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2059927486,2456161292&fm=26&gp=0.jpg',
name: '传控电子科技',
type: 1,
typeOfPlatform: 2,
typeOfTech: 2,
},
{
description: '我是好人,谁是好人',
logo: 300,
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2059927486,2456161292&fm=26&gp=0.jpg',
name: '传控电子科技',
type: 1,
typeOfPlatform: 2,
typeOfTech: 2,
},
{
description: '我是好人,谁是好人',
logo: 300,
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2059927486,2456161292&fm=26&gp=0.jpg',
name: '传控电子科技',
type: 1,
typeOfPlatform: 2,
typeOfTech: 2,
},
{
description: '我是好人,谁是好人',
logo: 300,
logoUrl: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2059927486,2456161292&fm=26&gp=0.jpg',
name: '传控电子科技',
type: 1,
typeOfPlatform: 2,
typeOfTech: 2,
},
],
},
],
};
},
computed: {
...mapState('home', ['profile']), //'partners',
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;
}
},
},
async created() {
this.setPartners([]);
const { title, typeOfPlatform } = this;
const params = {
param: {
pageNum: 1,
pageSize: 1,
type: title === '合作伙伴' ? 1 : 2,
typeOfPlatform: typeOfPlatform === '关于我们' ? 2 : 1,
},
};
await this.getFrontSearchCompany(params);
console.log(this.newPartners);
},
methods: {
...mapMutations('home', ['setPartners', 'setProfile']),
...mapActions('home', ['getFrontSearchCompany']),
//
openProfile(title, description) {
this.setProfile(null);
const profile = {
title,
description,
};
this.setProfile(profile);
console.log(this.profile);
this.showProfile = true;
},
closeProfile() {
this.showProfile = false;
},
},
};
</script>
<style lang="stylus" scoped>
@import './PartnerShip.styl';
</style>

382
src/components/Introduce/Model.vue

@ -0,0 +1,382 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<a-button @click="showModal" type="primary">立即加入</a-button>
<a-modal
:confirm-loading="confirmLoading"
:visible="visible"
@cancel="handleCancel"
@ok="handleOk(type)"
title="招聘信息"
width="50%"
>
<a-form :form="form">
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="姓名"
required
>
<a-input placeholder="请输入姓名" v-model.trim="recruit.name" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="性别"
>
<!-- 单选 -->
<a-radio-group v-model="recruit.sex">
<a-radio :value="1"></a-radio>
<a-radio :value="2"></a-radio>
</a-radio-group>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="出生年月"
>
<!-- 时间选择器时间点 -->
<a-date-picker @change="changeBirthday" class="fill-width" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="参加工作时间"
>
<!-- 时间选择器时间点 -->
<a-date-picker @change="changeStartJob" class="fill-width" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="电话"
required
>
<a-input
@change="changePhone"
placeholder="请输入联系电话"
type="tel"
v-decorator="['tel', { rules: phoneRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="图片验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="图片验证码" type="number" v-model="codeNum" />
<img
:src="picCode.imageBase64"
@click="changePicCode"
class="code_img ml-2"
v-if="picCode && picCode.imageBase64"
/>
<a-button @click="changePicCode" class="code_img ml-2" size="small" v-else>获取验证码</a-button>
<!-- <a-input v-decorator="['account', { rules: rules.account }]" /> -->
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="短信验证码"
required
>
<div class="d-flex flex-nowrap">
<a-input placeholder="请输入验证码" type="number" v-model="recruit.code" />
<a-button
class="code_img ml-2"
disabled
type="primary"
v-if="showInterval"
>重新发送 {{ interval }}</a-button>
<a-button
:disabled="recruit.isTel === false"
@click="getCode"
class="code_img ml-2"
type="primary"
v-else
>获取验证码</a-button>
</div>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="电子邮箱"
>
<!-- 电子邮箱 -->
<a-input
@change="changeEamil"
placeholder="请输入电子邮箱..."
type="email"
v-decorator="['email', { rules: emailRules }]"
/>
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="求职意向"
>
<a-textarea placeholder="请输入求职意向..." v-model.trim="recruit.jobWilling" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="工作经历"
>
<a-textarea placeholder="请输入工作经历..." v-model.trim="recruit.jobExpirence" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="教育经历"
>
<a-textarea placeholder="请输入教育经历..." v-model.trim="recruit.educationExpirence" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="自我评价"
>
<a-textarea placeholder="请输入自我评价..." v-model.trim="recruit.personalDescription" />
</a-form-item>
<a-form-item
:label-col="formItemLayout.labelCol"
:wrapper-col="formItemLayout.wrapperCol"
label="上传附件"
>
<a-upload
:action="action"
:default-file-list="fileList"
@change="fileChange"
list-type="picture"
name="files"
>
<a-button>
<a-icon type="upload" />点击上传附件
</a-button>
</a-upload>
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script>
import { mapState, mapActions } from 'vuex';
import { JoinPlatform, upload, joinUs } from 'config/api';
const formItemLayout = {
labelCol: { span: 6 },
wrapperCol: { span: 16 },
};
const formTailLayout = { wrapperCol: { span: 16, offset: 6 } };
export default {
name: 'Model',
components: {},
data() {
return {
visible: false,
confirmLoading: false,
type: '',
formItemLayout,
formTailLayout,
form: this.$form.createForm(this, { name: 'submit' }),
value: 1,
recruit: {
name: '', //
sex: 1, //
birthday: '', //
startJob: '', //
tel: '', //
code: '',
isTel: false, //
email: '', //
isEmail: false, //
jobWilling: '', //
jobExpirence: '', //
educationExpirence: '', //
personalDescription: '', //
files: [], // Id
},
action: upload,
fileList: [],
phoneRules: [
{ required: true, pattern: new RegExp(/^[1][3,4,5,6,7,8,9][0-9]{9}$/), whitespace: true, message: '请输入正确的手机号' },
],
emailRules: [
{
pattern: new RegExp(/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/),
whitespace: true,
message: '请输入正确的邮箱格式',
},
],
codeRules: [
{ required: true, message: '请输入验证码' },
{ min: 4, max: 4, message: '请输入4位短信验证码' },
],
codeNum: '',
showInterval: false,
codeTimer: null,
interval: 120, //
};
},
computed: mapState('user', ['picCode']),
created() {
this.sendPicCode();
},
methods: {
...mapActions('user', ['sendCode', 'sendPicCode']),
showModal() {
this.visible = true;
},
//
changePhone(e) {
this.recruit.tel = e.target.value;
this.recruit.isTel = /^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.recruit.tel);
},
//
changeEamil(e) {
this.recruit.email = e.target.value;
this.recruit.isEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/.test(this.recruit.email);
},
handleOk(type) {
if (!this.recruit.name) {
this.$message.error('姓名为必填项');
} else if (!this.recruit.tel) {
this.$message.error('电话为必填项');
} else if (!this.recruit.jobWilling) {
this.$message.error('求职意向为必填项');
} else if (this.recruit.email && this.recruit.isEmail === false) {
this.$message.error('请输入正确的邮箱格式');
} else {
if (this.recruit.isTel) {
for (var i = 0; i < this.fileList.length; i++) {
this.recruit.files = this.recruit.files.concat(this.fileList[i].response.data[0].id);
}
this.subMitAdd();
} else {
this.$message.error('请输入正确的联系电话');
}
}
},
//
async subMitAdd() {
this.confirmLoading = true;
try {
var params = {};
var res = {};
params = {
param: {
name: this.recruit.name, //
gender: this.recruit.sex, //
birthday: this.recruit.birthday, //
startJob: this.recruit.startJob, //
phone: this.recruit.tel, //
code: this.recruit.code, //
email: this.recruit.email, //
jobWilling: this.recruit.jobWilling, //
jobExpirence: this.recruit.jobExpirence, //
educationExpirence: this.recruit.educationExpirence, //
personalDescription: this.recruit.personalDescription, //
files: this.recruit.files, // Id
},
};
res = await joinUs(params);
const { data, msg, code } = res.data;
if (code === 200) {
this.$message.success('申请成功');
this.visible = false;
this.confirmLoading = false;
for (let key in this.recruit) {
this.recruit[key] = '';
}
} else {
throw msg;
this.confirmLoading = false;
}
} catch (error) {
this.$message.error(error);
this.confirmLoading = false;
}
},
handleCancel(e) {
this.visible = false;
},
fileChange(info) {
this.fileList = info.fileList;
},
changeBirthday(date, dateString) {
this.recruit.birthday = this.$moment(date).unix();
// console.log(this.$moment(date).unix(), dateString);
},
changeStartJob(date, dateString) {
this.recruit.startJob = this.$moment(date).unix();
// console.log(this.$moment(date).unix(), dateString);
},
//
async getCode() {
try {
const params = {
phone: this.recruit.tel,
verificationCodeId: this.picCode.verificationCodeId,
verificationCodeValue: this.codeNum,
};
await this.sendCode(params);
this.getCodeInterval();
} catch (error) {
throw new Error(`SignIn.vue method getCode: ${error}`);
}
},
//
getCodeInterval() {
this.showInterval = true;
this.codeTimer = setInterval(() => {
if (this.interval === 0) {
clearInterval(this.codeTimer);
this.codeTimer = null;
this.showInterval = false;
this.interval = 120;
return;
}
this.interval = this.interval - 1;
}, 1000);
},
//
changePicCode() {
this.sendPicCode();
},
},
};
</script>
<style lang="stylus" scoped>
.must-color {
color: red;
}
.code_img {
height: 32px;
width: 120px;
}
</style>

33
src/components/Introduce/PartnerShip.styl

@ -0,0 +1,33 @@
//
.logo-box{
width: 20.5%;
height: 113px;
margin-right: 6%;
border-radius: 4px;
box-shadow: 6px 6px 6px #eee;
.logo-pic{
height: 70px
}
}
.logo-box1{
margin-right: 0!important;
}
//
.enterprise-box{
width: 22%;
// height: 113px;
margin-right: 17%;
border-radius: 4px;
box-shadow: 6px 6px 6px #eee;
.enterprise-pic{
height: 166px
}
}
.enterprise-box1{
margin-right: 0!important;
}

97
src/components/Introduce/PartnerShip.vue

@ -0,0 +1,97 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div v-if="partners && partners.length > 0">
<div :key="index" class="mb-4" v-for="(item,index) in partners">
<p
class="font-bold-24 title-color"
>{{ item.typeOfTech===0 ? '高校' : item.typeOfTech===1 ? '院所' : '企业'}}</p>
<div
class="d-flex flex-wrap"
v-if="item.backendSearchList && item.backendSearchList.length > 0"
>
<div
:class="(i+1)%4===0? 'logo-box1' : ''"
:key="i"
@click="openProfile(list.name,list.description)"
class="logo-box d-flex flex-column align-center white mb-8"
v-for="(list,i) in item.backendSearchList"
>
<img :src="list.logoUrl" class="logo-pic my-2" />
<div class="font-16 title-color">{{ list.name }}</div>
</div>
</div>
</div>
<company-profile :showProfile="showProfile" @closeProfile="closeProfile" v-if="showProfile" />
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import CompanyProfile from './CompanyProfile.vue';
export default {
components: { CompanyProfile },
name: 'PartnerShip',
props: {
title: {
type: String,
default: '',
},
typeOfPlatform: {
type: String,
default: '',
},
},
data() {
return {
showProfile: false, //
};
},
computed: mapState('home', ['partners', 'profile']),
async created() {
this.setPartners([]);
const { title, typeOfPlatform } = this;
const params = {
param: {
pageNum: 1,
pageSize: 1,
type: title === '合作伙伴' ? 1 : 2,
typeOfPlatform: typeOfPlatform === '关于我们' ? 2 : 1,
},
};
await this.getFrontSearchCompany(params);
},
methods: {
...mapMutations('home', ['setPartners', 'setProfile']),
...mapActions('home', ['getFrontSearchCompany']),
//
openProfile(title, description) {
this.setProfile(null);
const profile = {
title,
description,
};
this.setProfile(profile);
console.log(this.profile);
this.showProfile = true;
},
closeProfile() {
this.showProfile = false;
},
},
};
</script>
<style lang="stylus" scoped>
@import './PartnerShip.styl';
</style>

44
src/components/Introduce/RichText.vue

@ -0,0 +1,44 @@
<!--
Copyright (c) 2020.
author: song
email: 15235360226@163.com
-->
<template>
<div>
<div class="words-content">
<span class="font-16 textColor line-height-30" v-dompurify-html="content"></span>
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
export default {
name: 'RichText',
props: {
title: {
type: String,
default: '',
},
},
data() {
return {};
},
computed: mapState('home', ['content']),
async created() {
this.setContent('');
await this.getPageDetail(this.title);
},
methods: {
...mapMutations('home', ['setContent']),
...mapActions('home', ['getPageDetail']),
},
};
</script>
<style lang="stylus" scoped></style>

22
src/config/api.js

@ -10,31 +10,45 @@ const greenvalley = `${proxyUrl}/greenvalley`;
// const page = `${greenvalley}/page`; // 创新平台相关操作 // const page = `${greenvalley}/page`; // 创新平台相关操作
const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口 const policy = `${proxyUrl}/policy/policy`; // 创新政策相关接口
const activity = `${greenvalley}/activity`; // 创新政策相关接口 const activity = `${greenvalley}/activity`; // 创新政策相关接口
const Business = `${greenvalley}//Business`; // 衍生企业和合作伙伴查询 const Business = `${greenvalley}/Business`; // 衍生企业和合作伙伴查询
const carousel = `${greenvalley}//carousel`; // 轮播图相关接口 const carousel = `${greenvalley}/carousel`; // 轮播图相关接口
const page = `${greenvalley}/page`; // 页面详情相关接口
// websocket基础地址 // websocket基础地址
export const WS_BASE_URL = msgUrl; export const WS_BASE_URL = msgUrl;
// 查询政策列表 // 查询政策列表
export const selLikePolicy = params => axios.post(`${policy}/selLikePolicy`, params); export const selLikePolicy = params => axios.post(`${policy}/selLikePolicy`, params);
// 查询政策详情 // 查询政策详情
export const selPolicy = params => axios.post(`${policy}/selPolicy`, params); export const selPolicy = params => axios.post(`${policy}/selPolicy`, params);
// 申请加入三大平台 // 申请加入三大平台
export const JoinPlatform = params => axios.post(`${greenvalley}/platform/JoinPlatform`, params); export const JoinPlatform = params => axios.post(`${greenvalley}/platform/JoinPlatform`, params);
// 上传附件 // 上传附件
export const upload = `${greenvalley}/file/upload`; export const upload = `${greenvalley}/file/upload`;
// 加入我们 // 加入我们
export const joinUs = params => axios.post(`${greenvalley}/PersonApply/joinUs`, params); export const joinUs = params => axios.post(`${greenvalley}/PersonApply/joinUs`, params);
// 查询轮播图 // 查询轮播图
export const queryRotation = params => axios.post(`${greenvalley}/carousel/query`, params); export const queryRotation = params => axios.post(`${greenvalley}/carousel/query`, params);
// 查询行业政策列表 // 查询行业政策列表
export const industryInfo = params => axios.post(`${greenvalley}/industryInfo/beforeSearch`, params); export const industryInfo = params => axios.post(`${greenvalley}/industryInfo/beforeSearch`, params);
// 查询活动公告列表 // 查询活动公告列表
export const front = params => axios.post(`${activity}/query/front`, params); export const front = params => axios.post(`${activity}/query/front`, params);
// 申请加入活动 // 申请加入活动
export const apply = params => axios.post(`${activity}/apply`, params); export const apply = params => axios.post(`${activity}/apply`, params);
// 查询衍生企业 // 查询衍生企业
export const FrontSearchFriend = params => axios.post(`${Business}/FrontSearchFriend`, params); export const frontSearchFriend = params => axios.post(`${Business}/FrontSearchFriend`, params);
// 查询合作伙伴 // 查询合作伙伴
export const FrontSearchCompany = params => axios.post(`${Business}/FrontSearchCompany`, params); export const frontSearchCompany = params => axios.post(`${Business}/FrontSearchCompany`, params);
// 介绍页面详情查询
export const getPageDetail = params => axios.post(`${page}/detail`, params);

2
src/plugins/ant-design-vue.js

@ -29,6 +29,7 @@ import {
Carousel, Carousel,
Avatar, Avatar,
Layout, Layout,
Breadcrumb,
} from 'ant-design-vue'; } from 'ant-design-vue';
import { ConfigProvider } from 'ant-design-vue'; import { ConfigProvider } from 'ant-design-vue';
Vue.component(ConfigProvider.name, ConfigProvider); Vue.component(ConfigProvider.name, ConfigProvider);
@ -59,6 +60,7 @@ Vue.use(BackTop);
Vue.use(Carousel); Vue.use(Carousel);
Vue.use(Avatar); Vue.use(Avatar);
Vue.use(Layout); Vue.use(Layout);
Vue.use(Breadcrumb);
Vue.prototype.$message = message; Vue.prototype.$message = message;
Vue.prototype.$notification = notification; Vue.prototype.$notification = notification;

118
src/router/index.js

@ -29,59 +29,33 @@ const routes = [
name: 'ForgetPassword', name: 'ForgetPassword',
component: () => import(/* webpackChunkName: "forget-password" */ 'views/User/ForgetPassword.vue'), component: () => import(/* webpackChunkName: "forget-password" */ 'views/User/ForgetPassword.vue'),
}, },
// 政策界面 // 关于我们界面
{
path: '/Policy',
name: 'Policy',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Policy/Policy.vue'),
},
// 政策详情界面
{
path: '/Policy/PolicyDetails',
name: 'PolicyDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Policy/PolicyDetails.vue'),
},
// 交流社区界面
{
path: '/Community',
name: 'Community',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/Community.vue'),
},
// 交流社区发帖界面
{ {
path: '/Posting', path: '/About/Introduce',
name: 'Posting', name: 'About',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/Posting.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/About.vue'),
}, children: [
// 交流帖子详情页
{ {
path: '/ComDetails', path: '/About/Introduce',
name: 'ComDetails', name: 'Introduce',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/ComDetails.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/Introduce.vue'),
}, },
// 行业资讯界面
{ {
path: '/ItInformation', path: '/About/Organ',
name: 'ItInformation', name: 'Organ',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/ItInformation/ItInformation.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/Organ.vue'),
}, },
// 活动公告界面
{ {
path: '/Activity', path: '/About/Partner',
name: 'Activity', name: 'Partner',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/Activity.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/Partner.vue'),
}, },
// 活动公告详情界面
{ {
path: '/ActDetails', path: '/About/SpinOffs',
name: 'ActDetails', name: 'SpinOffs',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/ActDetails.vue'), component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/Children/SpinOffs.vue'),
}, },
// 关于我们界面 ],
{
path: '/About',
name: 'About',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/About/About.vue'),
}, },
// 创新平台界面 // 创新平台界面
{ {
@ -124,7 +98,61 @@ const routes = [
}, },
], ],
}, },
, // 政策界面
{
path: '/Policy',
name: 'Policy',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Policy/Policy.vue'),
},
// 政策详情界面
{
path: '/Policy/PolicyDetails',
name: 'PolicyDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Policy/PolicyDetails.vue'),
},
// 交流社区界面
{
path: '/Community',
name: 'Community',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/Community.vue'),
},
// 交流社区发帖界面
{
path: '/Posting',
name: 'Posting',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/Posting.vue'),
},
// 交流帖子详情页
{
path: '/ComDetails',
name: 'ComDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Community/ComDetails.vue'),
},
// 行业资讯界面
{
path: '/ItInformation',
name: 'ItInformation',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/ItInformation/ItInformation.vue'),
},
// 活动公告界面
{
path: '/Activity',
name: 'Activity',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/Activity.vue'),
},
// 活动公告详情界面
{
path: '/ActDetails',
name: 'ActDetails',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/Activity/ActDetails.vue'),
},
// 联系我们界面
{
path: '/ContactUs',
name: 'ContactUs',
component: () => import(/* webpackChunkName: "cooperative-enterprise" */ 'views/ContactUs/ContactUs.vue'),
},
]; ];
const router = new VueRouter({ const router = new VueRouter({

78
src/store/modules/home/actions.js

@ -1,6 +1,6 @@
import axios from 'axios'; import axios from 'axios';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { industryInfo, front } from '@/config/api'; import { industryInfo, front, getPageDetail, queryRotation, frontSearchCompany } from '@/config/api';
const actions = { const actions = {
/** /**
@ -42,6 +42,82 @@ const actions = {
throw error || '获取失败'; throw error || '获取失败';
} }
}, },
/**
* 介绍页面详情查询
* @param {any} commit
* @param {object} titleCode 提交的数据
*/
async getPageDetail({ commit }, titleCode) {
try {
const params = { param: { titleCode } };
const res = await getPageDetail(params);
const { code, msg, data } = res.data;
if (code === 200) {
if (data && data.length > 0 && data[0] && data[0].length > 0 && data[0][0].detail) {
commit('setContent', data[0][0].detail.content);
}
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
/**
* 介绍页面详情查询
* @param {any} commit
* @param {object} showPage 页面显示位置
* 0 首页
* 11 关于我们-公司介绍
* 12 关于我们-组织机构
* 32 创新平台-创新资源平台
* 33 创新平台-科技创新服务
* 41 孵化平台-众创空间
* 42 孵化平台-公共实验室
* 43 孵化平台-中试基地
* 44 孵化平台-创业导师
* 46 孵化平台-创业服务
* 52 产业平台-产业服务
* 100 XX服务详情
*/
async getQueryRotation({ commit }, showPage) {
try {
const params = { param: { showPage } };
const res = await queryRotation(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('setBannerLists', data);
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
/**
* 合作伙伴查询
* @param {any} commit
* @param {object} params 提交的数据
*/
async getFrontSearchCompany({ commit }, params) {
try {
const res = await frontSearchCompany(params);
const { code, msg, data } = res.data;
if (code === 200) {
commit('setPartners', data);
} else {
message.error(msg || '查询失败');
throw msg;
}
} catch (error) {
throw error || '查询失败';
}
},
}; };
export default actions; export default actions;

36
src/store/modules/home/mutations.js

@ -98,6 +98,42 @@ const mutations = {
setActDetail(state, data) { setActDetail(state, data) {
state.actDetail = { ...data }; state.actDetail = { ...data };
}, },
/**
* 存储介绍页图文详情
* @param {object} state
* @param {object} data
*/
setContent(state, data) {
state.content = data;
},
/**
* 改变子页面banner图
* @param {object} state
* @param {List} list
*/
setBannerLists(state, list) {
state.bannerLists = list;
},
/**
* 设置合作伙伴 衍生企业
* @param {object} state
* @param {List} list
*/
setPartners(state, list) {
state.partners = list;
},
/**
* 改变公司介绍内容
* @param {object} state
* @param {object} data
*/
setProfile(state, data) {
state.profile = data;
},
}; };
export default mutations; export default mutations;

5
src/store/modules/home/state.js

@ -18,6 +18,11 @@ const state = {
actIpCon: '', // 活动公告搜索框内容 actIpCon: '', // 活动公告搜索框内容
actCurrent: 1, // 活动公告当前处于第几页 actCurrent: 1, // 活动公告当前处于第几页
actDetail: {}, // 当前活动公告详情 actDetail: {}, // 当前活动公告详情
content: '', // 介绍页图文
bannerLists: [], // 子页面banner图
partners: [], // 合作伙伴 衍生企业
// 公司介绍
profile: {},
}; };
export default state; export default state;

1
src/store/modules/user/state.js

@ -1,6 +1,7 @@
const state = { const state = {
anyringToken: '', anyringToken: '',
user: { id: '', phone: '', account: '' }, user: { id: '', phone: '', account: '' },
picCode: null,
}; };
export default state; export default state;

7
src/views/About/About.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
{{ str }} <router-view></router-view>
</div> </div>
</template> </template>
@ -8,10 +8,7 @@
export default { export default {
name: 'About', name: 'About',
data() { data() {
return { return {};
str: '这是关于我们界面',
list: [],
};
}, },
}; };
</script> </script>

42
src/views/About/Children/Introduce.vue

@ -0,0 +1,42 @@
<template>
<div>
<banner :showPage="showPage" />
<h-nav />
<div class="inner">
<bread-crumb :arr="arr" />
<div class="white pa-5 my-5">
<rich-text :title="title" />
</div>
</div>
</div>
</template>
<script>
import Banner from 'components/Banner/Banner.vue';
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import RichText from 'components/Introduce/RichText.vue';
export default {
name: 'Introduce',
components: { Banner, HNav, BreadCrumb, RichText },
data() {
return {
title: '公司介绍',
showPage: 11,
arr: [
{ name: '关于我们', url: '/About/Introduce' },
{ name: '公司介绍', url: '' },
],
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 40px auto;
}
</style>

42
src/views/About/Children/Organ.vue

@ -0,0 +1,42 @@
<template>
<div>
<banner :showPage="showPage" />
<h-nav />
<div class="inner">
<bread-crumb :arr="arr" />
<div class="white pa-5 my-5">
<rich-text :title="title" />
</div>
</div>
</div>
</template>
<script>
import Banner from 'components/Banner/Banner.vue';
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import RichText from 'components/Introduce/RichText.vue';
export default {
name: 'Introduce',
components: { Banner, HNav, BreadCrumb, RichText },
data() {
return {
title: '组织机构',
showPage: 12,
arr: [
{ name: '关于我们', url: '/About/Introduce' },
{ name: '组织机构', url: '' },
],
};
},
methods: {},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 40px auto;
}
</style>

39
src/views/About/Children/Partner.vue

@ -0,0 +1,39 @@
<template>
<div>
<h-nav />
<div class="inner">
<bread-crumb :arr="arr" />
<div class="py-5 my-5">
<partner-ship :title="title" :typeOfPlatform="typeOfPlatform" />
</div>
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import PartnerShip from 'components/Introduce/PartnerShip.vue';
export default {
name: 'Partner',
components: { HNav, BreadCrumb, PartnerShip },
data() {
return {
title: '合作伙伴',
typeOfPlatform: '关于我们',
arr: [
{ name: '关于我们', url: '/About/Introduce' },
{ name: '合作伙伴', url: '' },
],
};
},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 40px auto;
}
</style>

39
src/views/About/Children/SpinOffs.vue

@ -0,0 +1,39 @@
<template>
<div>
<h-nav />
<div class="inner">
<bread-crumb :arr="arr" />
<div class="py-5">
<derive-enterprise :title="title" :typeOfPlatform="typeOfPlatform" />
</div>
</div>
</div>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import HNav from './../components/HNav.vue';
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import DeriveEnterprise from 'components/Introduce/DeriveEnterprise.vue';
export default {
name: 'Partner',
components: { HNav, BreadCrumb, DeriveEnterprise },
data() {
return {
title: '衍生企业',
typeOfPlatform: '关于我们',
arr: [
{ name: '关于我们', url: '/About/Introduce' },
{ name: '衍生企业', url: '' },
],
};
},
};
</script>
<style lang="stylus" scoped>
.inner {
margin: 40px auto;
}
</style>

62
src/views/About/components/HNav.vue

@ -0,0 +1,62 @@
<template>
<div class="nav-box d-flex">
<div
:class="activeNum === index ? 'nav-box-active' : ''"
:key="index"
@click="jump(item.url)"
v-for="(item, index) in list"
>{{ item.title }}</div>
</div>
</template>
<script>
export default {
name: 'HNav',
data() {
return {
str: '导航条',
activeNum: 0,
list: [
{
title: '公司介绍',
url: '/About/Introduce',
},
{
title: '组织机构',
url: '/About/Organ',
},
{
title: '合作伙伴',
url: '/About/Partner',
},
{
title: '衍生企业',
url: '/About/SpinOffs',
},
],
};
},
created() {
if (this.$route.fullPath === '/About/Organ') {
this.activeNum = 1;
} else if (this.$route.fullPath === '/About/Partner') {
this.activeNum = 2;
} else if (this.$route.fullPath === '/About/SpinOffs') {
this.activeNum = 3;
} else {
this.activeNum = 0;
}
},
methods: {
jump(url) {
if (this.$route.fullPath === url) {
this.$message.success('已在当前界面');
} else {
this.$router.push(url);
}
},
},
};
</script>
<style lang="stylus" scoped></style>

19
src/views/About/components/Introduce.vue

@ -1,19 +0,0 @@
<template>
<div>
{{ str }}
</div>
</template>
<script>
export default {
name: 'Introduce',
data() {
return {
str: '这是公司介绍界面',
list: [],
};
},
};
</script>
<style lang="stylus" scoped></style>

19
src/views/About/components/Organ.vue

@ -1,19 +0,0 @@
<template>
<div>
{{ str }}
</div>
</template>
<script>
export default {
name: 'Organ',
data() {
return {
str: '这是组织机构界面',
list: [],
};
},
};
</script>
<style lang="stylus" scoped></style>

19
src/views/About/components/Partner.vue

@ -1,19 +0,0 @@
<template>
<div>
{{ str }}
</div>
</template>
<script>
export default {
name: 'Partner',
data() {
return {
str: '这是合作伙伴界面',
list: [],
};
},
};
</script>
<style lang="stylus" scoped></style>

47
src/views/ContactUs/ContactUs.vue

@ -0,0 +1,47 @@
<template>
<div class="inner">
<bread-crumb :arr="arr" />
<!-- 联系我们 -->
<div>
<p class="font-bold-24 title-color">联系我们</p>
<contact />
</div>
<!-- 加入我们 -->
<div>
<p class="font-bold-24 title-color">加入我们</p>
<rich-text :title="title" />
<model class="mt-8" />
</div>
</div>
</template>
<script>
import BreadCrumb from 'components/BreadCrumb/BreadCrumb.vue';
import Contact from 'components/Introduce/ContactUs.vue';
import RichText from 'components/Introduce/RichText.vue';
import Model from 'components/Introduce/Model.vue';
export default {
name: 'ContactUs',
components: { BreadCrumb, Contact, RichText, Model },
data() {
return {
title: '联系我们',
arr: [
{ name: '关于我们', url: '/About/Introduce' },
{ name: '联系我们', url: '' },
],
};
},
};
</script>
<style scoped lang="stylus">
.inner {
margin: 40px auto;
}
p {
margin-top: 2rem;
}
</style>

6
src/views/FirstPage/FirstPage.vue

@ -56,7 +56,7 @@
import { mapState, mapActions } from 'vuex'; import { mapState, mapActions } from 'vuex';
import Rotation from 'components/Rotation/Rotation.vue'; import Rotation from 'components/Rotation/Rotation.vue';
import IndexNewList from 'components/Index/IndexNewList.vue'; import IndexNewList from 'components/Index/IndexNewList.vue';
import { FrontSearchFriend, FrontSearchCompany } from 'config/api'; import { frontSearchFriend, frontSearchCompany } from 'config/api';
export default { export default {
components: { Rotation, IndexNewList }, components: { Rotation, IndexNewList },
@ -128,7 +128,7 @@ export default {
typeOfPlatform: 1, typeOfPlatform: 1,
}, },
}; };
const res = await FrontSearchFriend(params); const res = await frontSearchFriend(params);
const { data, code, msg } = res.data; const { data, code, msg } = res.data;
if (code === 200) { if (code === 200) {
console.log(data); console.log(data);
@ -147,7 +147,7 @@ export default {
typeOfPlatform: 2, typeOfPlatform: 2,
}, },
}; };
const res = await FrontSearchCompany(params); const res = await frontSearchCompany(params);
const { data, code, msg } = res.data; const { data, code, msg } = res.data;
if (code === 200) { if (code === 200) {
console.log(data); console.log(data);

Loading…
Cancel
Save