|
|
@@ -0,0 +1,298 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <nav-bar right-icon="share" @click-left="$router.go(-1)" :title="title"></nav-bar>
|
|
|
+ <van-swipe v-if="pics.length" class="swiper" :autoplay="3000" indicator-color="white">
|
|
|
+ <van-swipe-item
|
|
|
+ class="swiper-item"
|
|
|
+ v-for="(item, index) in pics"
|
|
|
+ :key="index"
|
|
|
+ :style="{ backgroundImage: `url(${item})` }"
|
|
|
+ >
|
|
|
+ </van-swipe-item>
|
|
|
+ </van-swipe>
|
|
|
+
|
|
|
+ <div class="article-title">{{ detail.name }}</div>
|
|
|
+ <div class="form">
|
|
|
+ <div class="row" v-for="(item, index) in properties" :key="index">
|
|
|
+ <div class="label">{{ item.label }}</div>
|
|
|
+ <div class="value">{{ item.value }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="label">联系人</div>
|
|
|
+ <div class="value">{{ detail.contactName }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="label">联系人</div>
|
|
|
+ <div class="value">{{ detail.contactName }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="row">
|
|
|
+ <div class="label">联系方式</div>
|
|
|
+ <div class="value">{{ detail.contactPhone }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="desc" v-if="detail.needInfo || detail.description">{{ detail.needInfo || detail.description }}</div>
|
|
|
+ <div class="org" v-if="detail.orgInfo">
|
|
|
+ <div class="logo" :style="{ backgroundImage: `url(${detail.orgInfo.logo || detail.orgInfo.loge})` }"></div>
|
|
|
+ <div class="info">
|
|
|
+ <div class="org-name">
|
|
|
+ {{ detail.orgInfo.orgName }}<img src="../../assets/icon_org.png" class="icon-org" />
|
|
|
+ </div>
|
|
|
+ <div class="btn-sm btn-org">查看企业</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="divider"></div>
|
|
|
+ <div class="article-content" v-html="detail.details"></div>
|
|
|
+ <div class="bottom-holder">
|
|
|
+ <div class="bottom-body">
|
|
|
+ <div class="like">
|
|
|
+ <img src="../../assets/icon_like.png" class="icon" />
|
|
|
+ <div class="txt">收藏</div>
|
|
|
+ </div>
|
|
|
+ <div class="btn-msg">
|
|
|
+ <img src="../../assets/icon_msg.png" class="icon" />
|
|
|
+ 联系对接
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+export default {
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ detail: {},
|
|
|
+ type: ''
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.type = this.$route.query.type;
|
|
|
+ this.$http.get(`${this.url}/${this.$route.query.id}`).then(res => {
|
|
|
+ this.detail = res;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ pics() {
|
|
|
+ if (this.detail.pic) {
|
|
|
+ return [this.detail.pic];
|
|
|
+ } else if (this.detail.picList) {
|
|
|
+ return this.detail.picList.map(i => i.url);
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+ },
|
|
|
+ title() {
|
|
|
+ switch (this.type) {
|
|
|
+ case 'dFinancial':
|
|
|
+ case 'dProduct':
|
|
|
+ case 'dTech':
|
|
|
+ return '需求详情';
|
|
|
+ case 'sProduct':
|
|
|
+ return '产品详情';
|
|
|
+ case 'sTech':
|
|
|
+ return '技术详情';
|
|
|
+ case 'sResource':
|
|
|
+ return '资源详情';
|
|
|
+ default:
|
|
|
+ return '详情';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ url() {
|
|
|
+ switch (this.type) {
|
|
|
+ case 'dFinancial':
|
|
|
+ return '/financingNeeds/get';
|
|
|
+ case 'dProduct':
|
|
|
+ return '/productNeed/get';
|
|
|
+ case 'dTech':
|
|
|
+ return '/artNeed/get';
|
|
|
+ case 'sProduct':
|
|
|
+ return '/product/get';
|
|
|
+ case 'sTech':
|
|
|
+ return '/artProduct/get';
|
|
|
+ case 'sResource':
|
|
|
+ return '/tresource/get';
|
|
|
+ default:
|
|
|
+ return '';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ properties() {
|
|
|
+ const nameMap = {
|
|
|
+ yyly: '应用领域',
|
|
|
+ jslx: '技术类型',
|
|
|
+ sblx: '设备类型',
|
|
|
+ rzjd: '融资阶段',
|
|
|
+ rzhy: '融资行业'
|
|
|
+ };
|
|
|
+ let properties = [];
|
|
|
+ if (this.detail.applicationField) {
|
|
|
+ properties.push(this.detail.applicationField);
|
|
|
+ }
|
|
|
+ if (this.detail.dataType) {
|
|
|
+ properties.push(this.detail.dataType);
|
|
|
+ }
|
|
|
+ if (this.detail.stageType) {
|
|
|
+ properties.push(this.detail.stageType);
|
|
|
+ }
|
|
|
+ properties = properties.map(i => {
|
|
|
+ return {
|
|
|
+ label: nameMap[i.keyType],
|
|
|
+ value: i.name
|
|
|
+ };
|
|
|
+ });
|
|
|
+ if (this.detail.planMoney) {
|
|
|
+ properties.push({
|
|
|
+ label: '计划融资',
|
|
|
+ value: this.detail.planMoney
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return properties;
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="less" scoped>
|
|
|
+.article-title {
|
|
|
+ margin: 16px 16px 0 16px;
|
|
|
+ font-size: 20px;
|
|
|
+ color: black;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+.article-desc {
|
|
|
+ margin: 10px 16px 0 16px;
|
|
|
+ font-size: 13px;
|
|
|
+ color: @text3;
|
|
|
+}
|
|
|
+.article-content {
|
|
|
+ margin: 10px 16px 0 16px;
|
|
|
+ line-height: 1.5;
|
|
|
+ font-size: 14px;
|
|
|
+ line-height: 24px;
|
|
|
+ /deep/ img {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ border-radius: 8px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.swiper {
|
|
|
+ height: 100vw;
|
|
|
+ .swiper-item {
|
|
|
+ height: 100vw;
|
|
|
+ background-position: center;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+}
|
|
|
+.form {
|
|
|
+ background: @bg;
|
|
|
+ margin: 16px 16px 0 16px;
|
|
|
+ border-radius: 8px;
|
|
|
+ padding: 14px;
|
|
|
+ .flex-col();
|
|
|
+ .row {
|
|
|
+ height: 24px;
|
|
|
+ .flex();
|
|
|
+ margin-top: 12px;
|
|
|
+ font-size: 14px;
|
|
|
+ &:first-child {
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+ .label {
|
|
|
+ width: 72px;
|
|
|
+ min-width: 72px;
|
|
|
+ color: @text3;
|
|
|
+ }
|
|
|
+ .value {
|
|
|
+ color: black;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.desc {
|
|
|
+ font-size: 14px;
|
|
|
+ margin: 16px 16px 0 16px;
|
|
|
+ color: black;
|
|
|
+ line-height: 24px;
|
|
|
+}
|
|
|
+.org {
|
|
|
+ margin: 20px 16px 0 16px;
|
|
|
+ .flex();
|
|
|
+ .logo {
|
|
|
+ width: 70px;
|
|
|
+ height: 70px;
|
|
|
+ background-position: center;
|
|
|
+ background-size: cover;
|
|
|
+ }
|
|
|
+ .info {
|
|
|
+ .flex-col();
|
|
|
+ margin-left: 8px;
|
|
|
+ .org-name {
|
|
|
+ .flex();
|
|
|
+ font-size: 14px;
|
|
|
+ color: black;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-top: 2px;
|
|
|
+ .icon-org {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn-org {
|
|
|
+ margin-top: 8px;
|
|
|
+ align-self: flex-start;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.divider {
|
|
|
+ margin: 20px 16px 0 16px;
|
|
|
+ height: 1px;
|
|
|
+ background: @bg;
|
|
|
+}
|
|
|
+.bottom-holder {
|
|
|
+ height: calc(56px + var(--safe-bottom));
|
|
|
+ .bottom-body {
|
|
|
+ height: calc(56px + var(--safe-bottom));
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding-bottom: var(--safe-bottom);
|
|
|
+ position: fixed;
|
|
|
+ bottom: 0;
|
|
|
+ left: 0;
|
|
|
+ width: 100%;
|
|
|
+ background: white;
|
|
|
+ .flex();
|
|
|
+ .like {
|
|
|
+ .flex-col();
|
|
|
+ width: 92px;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ .icon {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ }
|
|
|
+ .txt {
|
|
|
+ font-size: 10px;
|
|
|
+ color: @text1;
|
|
|
+ line-height: 16px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .btn-msg {
|
|
|
+ .flex();
|
|
|
+ background: @prim;
|
|
|
+ height: 40px;
|
|
|
+ border-radius: 4px;
|
|
|
+ .flex();
|
|
|
+ justify-content: center;
|
|
|
+ font-size: 14px;
|
|
|
+ color: white;
|
|
|
+ flex-grow: 1;
|
|
|
+ margin-right: 20px;
|
|
|
+ .icon {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ margin-right: 8px;
|
|
|
+ }
|
|
|
+ &:active {
|
|
|
+ background: shade(@prim, 10%);
|
|
|
+ }
|
|
|
+ &.disabled {
|
|
|
+ background-color: #8f9294;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|