|
|
@@ -0,0 +1,234 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <banner :banners="banners" :height="180" :autoplay="false"></banner>
|
|
|
+
|
|
|
+ <div class="auto-content">
|
|
|
+ <div class="box" style="order:0">
|
|
|
+ <div class="introduce">
|
|
|
+ {{ vendorInfo.introduction }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div
|
|
|
+ style="background: #f5f7fa;"
|
|
|
+ v-if="productList.length > 0"
|
|
|
+ :style="{ order: decorationInfo.popularOrder }"
|
|
|
+ >
|
|
|
+ <scroll-view :scroll-x="true">
|
|
|
+ <div class="product-list">
|
|
|
+ <div class="product-item" v-for="item in productList" :key="item.id">
|
|
|
+ <product-grid :info="item"></product-grid>
|
|
|
+ </div>
|
|
|
+ <div style="min-width:16px"></div>
|
|
|
+ </div>
|
|
|
+ </scroll-view>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="box" v-if="categories.length > 0">
|
|
|
+ <div class="box-title">主要服务</div>
|
|
|
+
|
|
|
+ <div class="serviceList">
|
|
|
+ <div
|
|
|
+ class="service"
|
|
|
+ v-for="(item, index) in categories"
|
|
|
+ :key="item.id"
|
|
|
+ :style="{ backgroundColor: colors[index % colors.length] }"
|
|
|
+ @click="$router.push(`/brandProductList?vendorInfoId=${vendorInfo.id}&categoryIds=${item.id}`)"
|
|
|
+ >
|
|
|
+ {{ getName(item) }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="box" v-if="applications.length > 0" :style="{ order: decorationInfo.applicationOrder }">
|
|
|
+ <div class="box-title">应用领域</div>
|
|
|
+ <scroll-view :scroll-x="true">
|
|
|
+ <div class="applications">
|
|
|
+ <block v-for="(item, index) in applications" :key="item.id">
|
|
|
+ <application
|
|
|
+ :index="index"
|
|
|
+ :name="getName(item)"
|
|
|
+ :id="item.id"
|
|
|
+ :storeId="vendorInfo.id"
|
|
|
+ ></application>
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <!-- <div style="min-width:16px"></div> -->
|
|
|
+ </div>
|
|
|
+ </scroll-view>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <div class="box" v-if="cases.length > 0" :style="{ order: decorationInfo.caseOrder }">
|
|
|
+ <div class="box-title">成功案例</div>
|
|
|
+ <scroll-view :scroll-x="true">
|
|
|
+ <div class="applications">
|
|
|
+ <block v-for="(item, index) in cases" :key="index">
|
|
|
+ <case :info="item"></case>
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <!-- <div style="min-width:16px"></div> -->
|
|
|
+ </div>
|
|
|
+ </scroll-view>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <block v-for="(item, index) in customAreaImgs" :key="index">
|
|
|
+ <van-image :src="item" fit="widthFix" />
|
|
|
+ </block>
|
|
|
+
|
|
|
+ <fixed-button v-if="showConnect">
|
|
|
+ <van-button :color="$colors.warn" block>咨询展商</van-button>
|
|
|
+ </fixed-button>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import Banner from '../components/Banner.vue';
|
|
|
+import Application from '../components/vendor/Application.vue';
|
|
|
+import ProductGrid from '../components/product/Grid.vue';
|
|
|
+import Case from '../components/vendor/Case.vue';
|
|
|
+import FixedButton from '../components/FixedButton.vue';
|
|
|
+export default {
|
|
|
+ components: { Banner, ProductGrid, Application, Case, FixedButton },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ productList: [],
|
|
|
+ colors: ['#6060B3', '#607CB3', '#A2B360', '#B3A260', '#60B397', '#6097B3'],
|
|
|
+ decorationInfo: {}
|
|
|
+ };
|
|
|
+ },
|
|
|
+ props: {
|
|
|
+ vendorInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {
|
|
|
+ return {};
|
|
|
+ }
|
|
|
+ },
|
|
|
+ showConnect: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ banners() {
|
|
|
+ if (this.vendorInfo.img) {
|
|
|
+ return this.vendorInfo.img.split(',').map(item => {
|
|
|
+ return {
|
|
|
+ img: item
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return [];
|
|
|
+ },
|
|
|
+ applications() {
|
|
|
+ return this.vendorInfo.applications || [];
|
|
|
+ },
|
|
|
+ cases() {
|
|
|
+ return this.vendorInfo.cases || [];
|
|
|
+ },
|
|
|
+ categories() {
|
|
|
+ return this.vendorInfo.categories || [];
|
|
|
+ },
|
|
|
+ customAreaImgs() {
|
|
|
+ if (this.decorationInfo.customArea) {
|
|
|
+ return this.decorationInfo.customArea.split(',');
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$http.post('/decoration/hotProduct?vendorId=' + this.$mp.options.id).then(res => {
|
|
|
+ this.productList = res.filter(item => {
|
|
|
+ return item.deviceStatus !== 'NOW_ON_SHELF';
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ this.$http
|
|
|
+ .post(
|
|
|
+ '/decoration/all',
|
|
|
+ {
|
|
|
+ query: {
|
|
|
+ vendorInfoId: this.$mp.options.id
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ header: {
|
|
|
+ 'Content-Type': 'application/json'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ if (res.numberOfElements > 0) {
|
|
|
+ this.decorationInfo = res.content[0];
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="less">
|
|
|
+.product-list {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: no-wrap;
|
|
|
+ padding: 36px 14px;
|
|
|
+ background: #f5f7fa;
|
|
|
+ .product-item {
|
|
|
+ width: 110px;
|
|
|
+ flex-shrink: 0;
|
|
|
+ .van-image {
|
|
|
+ height: 110px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .product-item + .product-item {
|
|
|
+ margin-left: 6px;
|
|
|
+ }
|
|
|
+}
|
|
|
+.box {
|
|
|
+ padding: 30px 16px;
|
|
|
+
|
|
|
+ .box-title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #292c33;
|
|
|
+ line-height: 24px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.introduce {
|
|
|
+ font-size: 14px;
|
|
|
+ color: #292c33;
|
|
|
+ line-height: 24px;
|
|
|
+}
|
|
|
+
|
|
|
+.serviceList {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ margin-right: -12px;
|
|
|
+ padding-bottom: 20px;
|
|
|
+
|
|
|
+ .service {
|
|
|
+ line-height: 36px;
|
|
|
+ margin-right: 10px;
|
|
|
+ padding: 0 12px;
|
|
|
+ background: #6060b3;
|
|
|
+ border-radius: 4px;
|
|
|
+ color: #ffffff;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ font-size: 14px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.applications {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: no-wrap;
|
|
|
+ padding: 20px 0;
|
|
|
+ .application + .application {
|
|
|
+ margin-left: 10px;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+.auto-content {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+}
|
|
|
+</style>
|