panhui %!s(int64=5) %!d(string=hai) anos
pai
achega
8c6b2084b1

+ 11 - 9
src/components/Banner.vue

@@ -89,15 +89,17 @@ export default {
             }
         },
         scale() {
-            if (this.scrollTop < 0) {
-                return {
-                    height: (this.height - this.scrollTop) * 2 + 'rpx'
-                };
-            } else {
-                return {
-                    height: this.height * 2 + 'rpx'
-                };
-            }
+            // if (this.scrollTop < 0) {
+            //     return {
+            //         height: (this.height - this.scrollTop) * 2 + 'rpx'
+            //     };
+            // } else {
+
+            // }
+
+            return {
+                height: this.height * 2 + 'rpx'
+            };
         },
         imgInfo() {
             if (this.banners.length > this.current) {

+ 10 - 2
src/components/ChatInfo.vue

@@ -22,7 +22,15 @@
         </div>
         <div class="chatInfo" :class="{ right: isMine }">
             <van-image class="left-icon" :src="logo + $oss.mini" :width="36" :height="36" :radius="4" fit="cover" />
-            <van-image :src="content" v-if="isImg" :width="100" fit="widthFix" @click="previewImg" />
+            <van-image
+                style="margin:0 10px"
+                :src="content + '?x-oss-process=image/resize,l_100,m_mfit'"
+                v-if="isImg"
+                :width="100"
+                fit="widthFix"
+                @click="previewImg"
+                :radius="4"
+            />
             <div class="chat-content" v-else>{{ content }}</div>
 
             <van-image class="right-icon" :src="logo + $oss.mini" :width="36" :height="36" :radius="4" fit="cover" />
@@ -85,7 +93,7 @@ export default {
                         ? '你好,我对贵方的产品非常感兴趣,希望可以详细聊聊'
                         : '你好,我对贵方发送了一条企业认领请求';
                 } else if (this.isImg) {
-                    return this.info.content + '?x-oss-process=image/resize,l_100,m_mfit';
+                    return this.info.content;
                 } else {
                     return this.info.content;
                 }

+ 3 - 1
src/components/Member.vue

@@ -104,7 +104,9 @@ export default {
                 this.navigateTo('/pagesChat/ChatDetail?type=system');
             } else {
                 this.navigateTo(
-                    `/pagesChat/ChatDetail?toUserId=${this.info.otherUserId}${this.type ? '&type=' + this.type : ''}`
+                    `/pagesChat/ChatDetail?toUserId=${this.info.otherUserId}${
+                        this.type ? '&type=' + this.type : '' + '&name=' + this.name
+                    }`
                 );
             }
         }

+ 12 - 1
src/components/bar/CustomBar.vue

@@ -1,7 +1,15 @@
 <template>
     <div :style="{ height: fixed ? 0 : fixedHieght + 'px' }">
         <div class="navBar" :style="narStyle" id="searchBar">
-            <van-icon name="arrow-left" @click="navigateBack" :size="24" :color="fontColor" />
+            <van-icon
+                name="icon-home"
+                class-prefix="iconfont"
+                v-if="isHome"
+                @click="goHome"
+                :size="24"
+                :color="fontColor"
+            />
+            <van-icon name="arrow-left" v-else @click="navigateBack" :size="24" :color="fontColor" />
 
             <div class="text" v-if="!topHide || ratio" :style="{ fontColor: fontColor }">{{ title }}</div>
         </div>
@@ -79,6 +87,9 @@ export default {
     mounted() {
         this.menuButtonInfo = wx.getMenuButtonBoundingClientRect();
     },
+    onReady() {
+        this.isHome = getCurrentPages().length === 1;
+    },
     onPageScroll(e) {
         if (e.scrollTop <= this.barTop && e.scrollTop > 0) {
             this.ratio = Math.ceil((e.scrollTop * 100) / this.barTop) / 100;

+ 2 - 2
src/components/bar/SearchBar.vue

@@ -1,8 +1,8 @@
 <template>
-    <div :style="{ height: fixedHieght + 'px' }" @click="navigateTo('/pagesHome/Search', false)">
+    <div :style="{ height: fixedHieght + 'px' }">
         <div class="navBar" :style="narStyle">
             <img class="logo" src="../../static/imgs/home_logo.png" alt="" />
-            <div class="search">
+            <div class="search" @click="navigateTo('/pagesHome/Search', false)">
                 <van-icon name="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/search.png" />
                 <!-- <span>搜索展商/产品/资讯</span> -->
                 <span>搜索...</span>

+ 9 - 2
src/components/bar/SearchBarWithValue.vue

@@ -2,8 +2,15 @@
     <div :class="{ fixed: fixed, dark: dark }">
         <van-sticky :z-index="200">
             <div class="navBar" :style="narStyle" id="searchBar">
-                <!-- <img v-if="!isHome" class="logo" src="../../static/imgs/home_logo.png" alt="" /> -->
-                <van-icon name="arrow-left" :size="24" @click="navigateBack" :color="fontColor" />
+                <van-icon
+                    name="icon-home"
+                    class-prefix="iconfont"
+                    v-if="isHome"
+                    @click="goHome"
+                    :size="24"
+                    :color="fontColor"
+                />
+                <van-icon v-else name="arrow-left" :size="24" @click="navigateBack" :color="fontColor" />
                 <van-search
                     :style="searchStyle"
                     :value="search"

+ 8 - 5
src/components/filter/ProductCategory.vue

@@ -27,14 +27,14 @@
                     @click="backChoose(headerInfo.id)"
                     v-if="headerInfo"
                     :border="false"
-                    :custom-class="value === headerInfo.id ? 'active' : ''"
+                    :custom-class="valueId === headerInfo.id ? 'active' : ''"
                 >
                     <h3 class="fontNormal" slot="title">全部{{ getName(headerInfo) }}类别</h3>
                     <van-icon
                         slot="right-icon"
                         :size="18"
                         :color="$colors.warn"
-                        v-if="value === headerInfo.id"
+                        v-if="valueId === headerInfo.id"
                         name="success"
                     />
                 </van-cell>
@@ -42,14 +42,14 @@
                     <van-cell
                         @click="chooseList(item)"
                         :border="false"
-                        :custom-class="value === item.id ? 'active' : ''"
+                        :custom-class="valueId === item.id ? 'active' : ''"
                     >
                         <h3 class="fontNormal" slot="title">{{ getName(item) }}</h3>
                         <van-icon
                             slot="right-icon"
                             :size="18"
                             :color="$colors.warn"
-                            v-if="value === item.id"
+                            v-if="valueId === item.id"
                             name="success"
                         />
                     </van-cell>
@@ -120,7 +120,7 @@ export default {
         valueInfo() {
             const list = [...this.list];
             return list.find(item => {
-                return item.id === Number(this.value);
+                return item.id === this.valueId;
             });
         },
         headerInfo() {
@@ -132,6 +132,9 @@ export default {
             } else {
                 return this.chooseInfo;
             }
+        },
+        valueId() {
+            return this.value ? Number(this.value) : 0;
         }
     },
     mounted() {

+ 2 - 1
src/mixins/collection.js

@@ -33,12 +33,13 @@ export default {
                     setTimeout(() => {
                         this.animate = false;
                     }, 1000);
-                    if (this.collectId) {
+                    if (this.isCollection) {
                         return this.$http.post('/collect/del/' + this.collectId);
                     } else {
                         return this.$http.post(
                             '/collect/save',
                             {
+                                id: this.collectId || null,
                                 userId: this.$store.state.userInfo.id,
                                 cid: this.cId,
                                 type: this.collectionType,

+ 27 - 0
src/mixins/commont.js

@@ -119,6 +119,33 @@ export default {
                 showCancelButton: showCancelButton,
                 confirmButtonText: confirmButtonText
             });
+        },
+        go3D() {
+            // wx.navigateToMiniProgram({
+            //     appId: 'wx44382d983fc116cf',
+            //     path: 'components/pages/webview/index?uid=7b282a24929070b22be6016a3df9261f4f6abc9f',
+            //     extraData: {},
+            //     success(res) {
+            //         // 打开成功
+            //     }
+            // });
+            wx.navigateToMiniProgram({
+                appId: 'wx03450d55dcb37448',
+                path: '/pages/Home',
+                extraData: {},
+                success(res) {
+                    // 打开成功
+                }
+            });
+        },
+        shareInfo() {
+            return {
+                title: 'IMT科技平台',
+                path: '/pages/Home',
+                imageUrl:
+                    'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/shareIcon.png' +
+                    '?x-oss-process=image/resize,m_pad,h_400,w_500,color_FFFFFF'
+            };
         }
     }
 };

+ 3 - 0
src/pages/Chat.vue

@@ -63,6 +63,9 @@ export default {
                 this.chatMemberlist = res;
             });
         }
+    },
+    onShareAppMessage(from, target) {
+        return this.shareInfo();
     }
 };
 </script>

+ 17 - 2
src/pages/Classify.vue

@@ -43,7 +43,14 @@
                 </van-sticky>
             </div>
             <scroll-view :style="{ height: `calc(100vh - ${barHeight}px)` }" :scroll-y="true" class="right">
-                <div class="top" @click="navigateTo('/pagesHome/ProductList?categoryIds=' + firstLevelId)">
+                <div
+                    class="top"
+                    @click="
+                        navigateTo(
+                            '/pagesHome/ProductList?defaultCategoryId=' + firstLevelId + '&categoryIds=' + firstLevelId
+                        )
+                    "
+                >
                     <van-image
                         src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/quanqiu_img_jixie.jpg"
                         fit="widthFix"
@@ -62,7 +69,12 @@
                     block
                     v-for="item in nowCategory.children"
                     :key="item.id"
-                    @click="navigateTo('/pagesHome/ProductList?categoryIds=' + item.id, false)"
+                    @click="
+                        navigateTo(
+                            '/pagesHome/ProductList?defaultCategoryId=' + firstLevelId + '&categoryIds=' + item.id,
+                            false
+                        )
+                    "
                     >{{ getName(item) }}</van-button
                 >
 
@@ -130,6 +142,9 @@ export default {
         confirm(e) {
             this.navigateTo('/pagesHome/ProductList?search=' + e.detail, false);
         }
+    },
+    onShareAppMessage(from, target) {
+        return this.shareInfo();
     }
 };
 </script>

+ 184 - 177
src/pages/Home.vue

@@ -11,130 +11,130 @@
 </config>
 <template>
     <div class="home">
-        <search-bar></search-bar>
-
-        <img class="bg" src="../static/imgs/home_top_bg.png" alt="" />
-        <div id="main">
-            <div class="swiper">
-                <swiper
-                    autoplay
-                    previous-margin="33px"
-                    next-margin="32px"
-                    class="swiper-home"
-                    @change="current = $event.detail.current"
-                    :current="current"
-                    circular
-                >
-                    <block v-for="(item, index) in banners" :key="item.id">
-                        <swiper-item :class="{ active: index === current }">
-                            <van-image
-                                @click="goDetail(item)"
-                                :src="item.img"
-                                width="620rpx"
-                                height="280rpx"
-                                radius="3"
-                                fit="cover"
-                            />
-                        </swiper-item>
-                    </block>
-                </swiper>
-                <div class="dots" v-if="banners.length > 1">
-                    <div
-                        class="dot"
-                        :class="{ active: index === current }"
-                        v-for="(item, index) in banners"
-                        :key="item.id"
-                    ></div>
+        <div id="homeTop">
+            <search-bar></search-bar>
+
+            <img class="bg" src="../static/imgs/home_top_bg.png" alt="" />
+            <div id="main">
+                <div class="swiper">
+                    <swiper
+                        autoplay
+                        previous-margin="33px"
+                        next-margin="32px"
+                        class="swiper-home"
+                        @change="current = $event.detail.current"
+                        :current="current"
+                        circular
+                    >
+                        <block v-for="(item, index) in banners" :key="item.id">
+                            <swiper-item :class="{ active: index === current }">
+                                <van-image
+                                    @click="goDetail(item)"
+                                    :src="item.img"
+                                    width="620rpx"
+                                    height="280rpx"
+                                    radius="3"
+                                    fit="cover"
+                                />
+                            </swiper-item>
+                        </block>
+                    </swiper>
+                    <div class="dots" v-if="banners.length > 1">
+                        <div
+                            class="dot"
+                            :class="{ active: index === current }"
+                            v-for="(item, index) in banners"
+                            :key="item.id"
+                        ></div>
+                    </div>
                 </div>
-            </div>
 
-            <div class="main">
-                <div class="menus">
-                    <div class="text">{{ $t('zhuan-ye-ping-tai') }}</div>
-                    <div class="text">{{ $t('zi-yuan-ji-qun-pang-da') }}</div>
-                    <div class="text">{{ $t('yi-zhan-shi-fu-wu') }}</div>
-                    <div class="text">{{ $t('xin-yu-bao-zhang') }}</div>
-                </div>
+                <div class="main">
+                    <div class="menus">
+                        <div class="text">{{ $t('zhuan-ye-ping-tai') }}</div>
+                        <div class="text">{{ $t('zi-yuan-ji-qun-pang-da') }}</div>
+                        <div class="text">{{ $t('yi-zhan-shi-fu-wu') }}</div>
+                        <div class="text">{{ $t('xin-yu-bao-zhang') }}</div>
+                    </div>
 
-                <van-grid clickable icon-size="40" :border="false" click>
-                    <van-grid-item
-                        content-class="menu-info"
-                        icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_zhanshang.png"
-                        :text="$t('zhan-shang-zong-lan')"
-                        @click="navigateTo('/pagesHome/Brand', false)"
-                    />
-                    <van-grid-item
-                        content-class="menu-info"
-                        icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_quanqiu.png"
-                        :text="$t('quan-qiu-chan-pin')"
-                        @click="navigateTo('/pagesHome/Product', false)"
-                    />
-                    <van-grid-item
-                        content-class="menu-info"
-                        icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_imt.png"
-                        :text="$t('imt-ping-tai')"
-                        @click="navigateTo('/pagesImt/Index', false)"
-                    />
-                    <van-grid-item
-                        content-class="menu-info"
-                        icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_xinwen.png"
-                        :text="$t('xin-wen-zi-xun')"
-                        @click="navigateTo('/pagesNews/News', false)"
-                    />
-                </van-grid>
-                <div class="pathImg">
-                    <van-image
-                        width="100%"
-                        height="90px"
-                        :radius="4"
-                        v-if="tDurl && tDurl !== 'null'"
-                        src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_img_3dimt.jpg"
-                        @click="navigateTo('/pagesHome/ShowView', false)"
-                    />
+                    <van-grid clickable icon-size="40" :border="false" click>
+                        <van-grid-item
+                            content-class="menu-info"
+                            icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_zhanshang.png"
+                            :text="$t('zhan-shang-zong-lan')"
+                            @click="navigateTo('/pagesHome/Brand', false)"
+                        />
+                        <van-grid-item
+                            content-class="menu-info"
+                            icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_quanqiu.png"
+                            :text="$t('quan-qiu-chan-pin')"
+                            @click="navigateTo('/pagesHome/Product', false)"
+                        />
+                        <van-grid-item
+                            content-class="menu-info"
+                            icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_imt.png"
+                            :text="$t('imt-ping-tai')"
+                            @click="navigateTo('/pagesImt/Index', false)"
+                        />
+                        <van-grid-item
+                            content-class="menu-info"
+                            icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_xinwen.png"
+                            :text="$t('xin-wen-zi-xun')"
+                            @click="navigateTo('/pagesNews/News', false)"
+                        />
+                    </van-grid>
+                    <div class="pathImg">
+                        <van-image
+                            width="100%"
+                            height="90px"
+                            :radius="4"
+                            src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_img_3dimt.jpg"
+                            @click="go3D"
+                        />
+                    </div>
                 </div>
-            </div>
-            <div class="hot" v-if="hotProductsList.length > 0">
-                <div class="title">
-                    <h1>{{ $t('re-men-chan-pin') }}</h1>
-                    <!-- <van-button size="small" :color="$colors.info" plain>
+                <div class="hot" v-if="hotProductsList.length > 0">
+                    <div class="title">
+                        <h1>{{ $t('re-men-chan-pin') }}</h1>
+                        <!-- <van-button size="small" :color="$colors.info" plain>
                     查看更多
                     <van-icon name="arrow" :color="$colors.info" />
                 </van-button> -->
-                </div>
-                <van-tabs :active="hotActive" @change="hotActive = $event.detail.index" :ellipsis="false">
-                    <van-tab :title="item.name" v-for="item in hotProductsList" :key="item.id"></van-tab>
-                </van-tabs>
-                <div class="van-content" v-if="nowProductsList.length > 0 || mainProductInfo">
-                    <product-grid-big :info="mainProductInfo" v-if="mainProductInfo"></product-grid-big>
-                    <div v-if="nowProductsList.length > 0">
-                        <swiper
-                            :style="{ height: swiperHeight + 'rpx' }"
-                            :current="hotSwiperIndex"
-                            @change="hotSwiperIndex = $event.detail.current"
-                        >
-                            <swiper-item v-for="(list, index) in swiperProduct" :key="index">
-                                <div class="product-list">
-                                    <div class="col-3" v-for="item in list" :key="item.id">
-                                        <product-grid :info="item" :clo="3" :padding="3"></product-grid>
+                    </div>
+                    <van-tabs :active="hotActive" @change="hotActive = $event.detail.index" :ellipsis="false">
+                        <van-tab :title="item.name" v-for="item in hotProductsList" :key="item.id"></van-tab>
+                    </van-tabs>
+                    <div class="van-content" v-if="nowProductsList.length > 0 || mainProductInfo">
+                        <product-grid-big :info="mainProductInfo" v-if="mainProductInfo"></product-grid-big>
+                        <div v-if="nowProductsList.length > 0">
+                            <swiper
+                                :style="{ height: swiperHeight + 'rpx' }"
+                                :current="hotSwiperIndex"
+                                @change="hotSwiperIndex = $event.detail.current"
+                            >
+                                <swiper-item v-for="(list, index) in swiperProduct" :key="index">
+                                    <div class="product-list">
+                                        <div class="col-3" v-for="item in list" :key="item.id">
+                                            <product-grid :info="item" :clo="3" :padding="3"></product-grid>
+                                        </div>
                                     </div>
-                                </div>
-                            </swiper-item>
-                        </swiper>
-
-                        <div class="dots" v-if="swiperProduct.length > 1">
-                            <div
-                                class="dot"
-                                :class="{ active: index === hotSwiperIndex }"
-                                v-for="(item, index) in swiperProduct"
-                                :key="index"
-                            ></div>
+                                </swiper-item>
+                            </swiper>
+
+                            <div class="dots" v-if="swiperProduct.length > 1">
+                                <div
+                                    class="dot"
+                                    :class="{ active: index === hotSwiperIndex }"
+                                    v-for="(item, index) in swiperProduct"
+                                    :key="index"
+                                ></div>
+                            </div>
                         </div>
                     </div>
-                </div>
 
-                <van-empty description="暂未设置该类型热门商品" v-else />
-            </div>
-            <!-- <div class="datas">
+                    <van-empty description="暂未设置该类型热门商品" v-else />
+                </div>
+                <!-- <div class="datas">
                 <van-image
                     width="100%"
                     src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/home_img_yewushuju.jpg"
@@ -157,62 +157,69 @@
                 </div>
             </div> -->
 
-            <div class="van-content" v-if="vendorInfos.length > 0">
-                <div class="title">
-                    <h1>合作伙伴</h1>
-                    <van-button size="small" :color="$colors.info" plain @click="navigateTo('/pagesHome/Brand', false)">
-                        <div class="btn_icon">
-                            <span>查看更多</span>
-                            <van-icon name="arrow" :color="$colors.info" />
-                        </div>
-                    </van-button>
-                </div>
-                <swiper
-                    :style="{ height: vendorInfosHeight + 'rpx' }"
-                    :current="vendorSwiper"
-                    @change="vendorSwiper = $event.detail.current"
-                >
-                    <block v-for="(list, index) in vendorInfos" :key="index">
-                        <swiper-item>
-                            <div class="vendor-list">
-                                <div class="col-3" v-for="item in list" :key="item.id">
-                                    <vendor-grid :info="item"></vendor-grid>
-                                </div>
+                <div class="van-content" v-if="vendorInfos.length > 0">
+                    <div class="title">
+                        <h1>合作伙伴</h1>
+                        <van-button
+                            size="small"
+                            :color="$colors.info"
+                            plain
+                            @click="navigateTo('/pagesHome/Brand', false)"
+                        >
+                            <div class="btn_icon">
+                                <span>查看更多</span>
+                                <van-icon name="arrow" :color="$colors.info" />
                             </div>
-                        </swiper-item>
-                    </block>
-                </swiper>
-
-                <div class="dots" v-if="vendorInfos.length > 1">
-                    <div
-                        class="dot"
-                        :class="{ active: index === vendorSwiper }"
-                        v-for="(item, index) in vendorInfos"
-                        :key="index"
-                    ></div>
+                        </van-button>
+                    </div>
+                    <swiper
+                        :style="{ height: vendorInfosHeight + 'rpx' }"
+                        :current="vendorSwiper"
+                        @change="vendorSwiper = $event.detail.current"
+                    >
+                        <block v-for="(list, index) in vendorInfos" :key="index">
+                            <swiper-item>
+                                <div class="vendor-list">
+                                    <div class="col-3" v-for="item in list" :key="item.id">
+                                        <vendor-grid :info="item"></vendor-grid>
+                                    </div>
+                                </div>
+                            </swiper-item>
+                        </block>
+                    </swiper>
+
+                    <div class="dots" v-if="vendorInfos.length > 1">
+                        <div
+                            class="dot"
+                            :class="{ active: index === vendorSwiper }"
+                            v-for="(item, index) in vendorInfos"
+                            :key="index"
+                        ></div>
+                    </div>
                 </div>
-            </div>
 
-            <div class="tuiJian">
-                <div class="title">
-                    <h1>为你推荐</h1>
+                <div class="tuiJian">
+                    <div class="title">
+                        <h1>为你推荐</h1>
+                    </div>
                 </div>
             </div>
         </div>
 
-        <van-sticky :container="main" :offset-top="barHeight">
-            <filter-sort-bar
-                :sort="sort"
-                :showType="showType"
-                @showFilter="showFilter"
-                @changeSort="changeSort"
-                @changeShowType="changeShowType"
-                :hasbottom="false"
-                background="linear-gradient(180deg, @bg 0%, #FFFFFF 100%)"
-            >
-            </filter-sort-bar>
-        </van-sticky>
-
+        <div>
+            <van-sticky :container="main" :offset-top="barHeight">
+                <filter-sort-bar
+                    :sort="sort"
+                    :showType="showType"
+                    @showFilter="showFilter"
+                    @changeSort="changeSort"
+                    @changeShowType="changeShowType"
+                    :hasbottom="false"
+                    background="linear-gradient(180deg, @bg 0%, #FFFFFF 100%)"
+                >
+                </filter-sort-bar>
+            </van-sticky>
+        </div>
         <sort-list :empty="empty" :loading="loading" :finish="finish" top="88rpx">
             <div class="product-list-sort" v-if="showType === 'grid'">
                 <div class="clo-2" v-for="item in list" :key="item.id">
@@ -358,9 +365,6 @@ export default {
         }
     },
     onLoad() {
-        this.$http.get('/sysConfig/get/ThreeD_URL').then(res => {
-            this.tDurl = res.value;
-        });
         getBanner('HOME').then(res => {
             console.log(res);
             this.banners = res;
@@ -383,16 +387,6 @@ export default {
             });
             console.log(_list);
             this.vendorInfos = [..._list.values()];
-
-            setTimeout(() => {
-                wx.createSelectorQuery()
-                    .select('#main')
-                    .boundingClientRect(rect => {
-                        console.log(rect);
-                        this.searchTop = rect.height;
-                    })
-                    .exec();
-            }, 1000);
         });
         this.getData();
     },
@@ -401,17 +395,30 @@ export default {
             console.log(e);
         },
         goDetail(info) {
-            console.log(info.url);
             if (info.url) {
                 this.navigateTo(info.url);
             }
-        }
+        },
+        getTop() {}
+    },
+    onPageScroll() {
+        this.$nextTick(() => {
+            wx.createSelectorQuery()
+                .select('#homeTop')
+                .boundingClientRect(rect => {
+                    this.searchTop = rect.height - this.barHeight;
+                })
+                .exec();
+        });
     },
     onReachBottom() {
         if (!this.loading && !this.finish) {
             this.page++;
             this.getData();
         }
+    },
+    onShareAppMessage(from, target) {
+        return this.shareInfo();
     }
 };
 </script>

+ 3 - 0
src/pages/My.vue

@@ -179,6 +179,9 @@ export default {
                     });
             }
         }
+    },
+    onShareAppMessage(from, target) {
+        return this.shareInfo();
     }
 };
 </script>

+ 35 - 13
src/pagesChat/ChatDetail.vue

@@ -23,6 +23,7 @@
                 </block>
 
                 <div class="adminTips" v-if="type === 'admin' && isAsk">
+                    <div class="chatTime" v-if="nowDateStr">{{ nowDateStr }}</div>
                     <div class="chatInfo">
                         <van-image class="left-icon" :src="otherInfo.img" :width="36" :height="36" fit="cover" />
                         <div class="chat-content">
@@ -83,6 +84,9 @@
 import ChatInfo from '../components/ChatInfo.vue';
 import dayjs from 'dayjs';
 import { adminAutoReply } from '../utils/chat';
+var relativeTime = require('dayjs/plugin/relativeTime');
+dayjs.extend(relativeTime);
+dayjs.locale('zh-cn');
 export default {
     components: { ChatInfo },
     data() {
@@ -141,8 +145,11 @@ export default {
         newList() {
             var list = [...this.list];
             return list.filter(item => {
-                return this.nowDate.isBefore(item.time);
+                return !this.nowDate.isAfter(item.time);
             });
+        },
+        nowDateStr() {
+            return this.nowDate ? this.nowDate.format('hh:mm') : '';
         }
     },
     onLoad(options) {
@@ -150,6 +157,7 @@ export default {
             this.services = res.value.split(',');
         });
         this.nowDate = dayjs();
+        console.log(this.nowDate);
         if (options.type === 'system') {
             wx.setNavigationBarTitle({
                 title: '系统消息'
@@ -179,15 +187,15 @@ export default {
             wx.setNavigationBarTitle({
                 title: '服务管家'
             });
-        }
-
-        if (options.isAsk) {
-            this.isAsk = true;
+        } else if (options.name) {
+            wx.setNavigationBarTitle({
+                title: options.name
+            });
         }
 
         if (options.toUserId) {
             this.toUserId = Number(options.toUserId);
-            this.getDetail();
+            this.getDetail(options.isAsk, true);
         }
 
         if (options.type) {
@@ -205,31 +213,45 @@ export default {
     },
     methods: {
         upper() {},
-        getDetail() {
+        getDetail(isAsk, first = false) {
             this.$loading('加载中');
             this.$http
-                .post('/message/details', {
-                    otherUserId: this.toUserId
-                })
+                .post(
+                    '/message/details',
+                    {
+                        otherUserId: this.toUserId
+                    },
+                    '',
+                    first
+                )
                 .then(res => {
-                    console.log(res);
-                    this.list = res.map(item => {
+                    const list = first ? res.data : res;
+                    this.list = list.map(item => {
                         return {
                             ...item,
                             time: dayjs(item.time || item.createdAt, 'YYYY-MM-DD HH:mm:ss')
                         };
                     });
 
+                    if (first) {
+                        this.nowDate = dayjs(res.header.Date);
+                        console.log(this.nowDate);
+                    }
+
                     this.$http.post('/message/batchRead', {
                         otherUserId: this.toUserId
                     });
+
+                    if (isAsk) {
+                        this.isAsk = true;
+                    }
                     this.$nextTick(() => {
                         setTimeout(() => {
-                            this.$loading.close();
                             wx.createSelectorQuery()
                                 .select('#chatList')
                                 .boundingClientRect(rect => {
                                     this.scrollTop = rect.height;
+                                    this.$loading.close();
                                 })
                                 .exec();
                         }, 500);

+ 2 - 1
src/pagesHome/Authorized.vue

@@ -27,7 +27,7 @@
     </div>
 </template>
 <script>
-import AuthPhone from '../components/AuthPhone';
+import AuthPhone from '../components/AuthPhone.vue';
 export default {
     data() {
         return {
@@ -41,6 +41,7 @@ export default {
     },
     methods: {
         login(e) {
+            console.log(e);
             if (e.detail.iv) {
                 this.wxInfo = e.detail.userInfo;
                 this.$http

+ 4 - 1
src/pagesHome/FilterPage.vue

@@ -47,6 +47,7 @@ export default {
         };
     },
     onShow() {
+        console.log(this.$mp);
         this.pageType = this.$mp.options.pageType;
         if (this.$mp.options.pageType === 'vendor') {
             this.categoryIds = this.$mp.options.categoryIds;
@@ -75,6 +76,7 @@ export default {
     methods: {
         restart() {
             this.categoryIds = '';
+            this.firstCategory = '';
             this.countries = '';
             this.brand = '';
             this.tagIds = '';
@@ -90,7 +92,8 @@ export default {
                 brand: this.brand,
                 tagIds: this.tagIds,
                 applicationField: this.applicationField,
-                enterpriseType: this.enterpriseType
+                enterpriseType: this.enterpriseType,
+                firstCategory: this.firstCategory
             });
             wx.navigateBack({
                 success: () => {

+ 27 - 16
src/pagesHome/ProductList.vue

@@ -29,10 +29,15 @@
                         ></product-category-filter>
                     </span>
                     <span slot="filter2">
-                        <country-filter size="small" v-model="countries" @input="refreash"></country-filter>
+                        <country-filter
+                            size="small"
+                            v-model="continent"
+                            :country.sync="countries"
+                            @input="refreash"
+                        ></country-filter>
                     </span>
                     <span slot="filter3">
-                        <product-tags-filter size="small" v-model="tagIds" @input="refreash"></product-tags-filter>
+                        <product-brand-filter size="small" v-model="brand" @input="refreash"></product-brand-filter>
                     </span>
                 </filter-sort-bar>
             </van-sticky>
@@ -56,7 +61,7 @@ import searchList from '../mixins/searchList';
 import FilterSortBar from '../components/bar/FilterSortBar';
 import SortList from '../components/SortList';
 import ProductGrid from '../components/product/GridNormal';
-import ProductTagsFilter from '../components/filter/ProductTags';
+import ProductBrandFilter from '../components/filter/ProductBrand';
 import ProductCategoryFilter from '../components/filter/ProductCategory';
 import CountryFilter from '../components/filter/Country';
 import ProductRow from '../components/product/RowNormal.vue';
@@ -67,13 +72,15 @@ export default {
             banners: [],
             categoryIds: '',
             countries: '',
-            brands: '',
+            continent: '',
+            brand: '',
             url: '/product/show',
             tagIds: '',
             applicationField: '',
             main: null,
             ratio: 1,
-            vendorInfoId: ''
+            vendorInfoId: '',
+            defaultCategoryId: ''
         };
     },
     mixins: [searchList],
@@ -100,12 +107,13 @@ export default {
         filterQuery() {
             return {
                 pageType: 'product',
-                firstCategory: this.defaultCategoryId,
                 categoryIds: this.categoryIds,
                 countries: this.countries,
+                continent: this.continent,
                 searchTop: this.searchTop,
                 tagIds: this.tagIds,
-                applicationField: this.applicationField
+                applicationField: this.applicationField,
+                brand: this.brand
             };
         }
     },
@@ -114,6 +122,9 @@ export default {
         if (options.categoryIds) {
             this.categoryIds = options.categoryIds;
         }
+        // if (options.defaultCategoryId) {
+        //     this.defaultCategoryId = options.defaultCategoryId;
+        // }
         if (options.applicationField) {
             this.applicationField = options.applicationField;
         }
@@ -136,20 +147,20 @@ export default {
         FilterSortBar,
         SortList,
         ProductGrid,
-        ProductTagsFilter,
+        ProductBrandFilter,
         ProductCategoryFilter,
         CountryFilter,
         SearchBar,
         ProductRow
-    },
-    watch: {
-        defaultCategoryId() {
-            this.categoryIds = '';
-            this.$nextTick(() => {
-                this.refreash();
-            });
-        }
     }
+    // watch: {
+    //     defaultCategoryId() {
+    //         this.categoryIds = '';
+    //         this.$nextTick(() => {
+    //             this.refreash();
+    //         });
+    //     }
+    // }
 };
 </script>
 

+ 8 - 0
src/pagesHome/Search.vue

@@ -26,6 +26,7 @@
                     @search="confirm"
                     shape="round"
                     placeholder="搜索..."
+                    @change="changeSearch"
                 />
             </div>
         </van-sticky>
@@ -60,6 +61,7 @@
 <script>
 import { mapState } from 'vuex';
 import Dialog from '../native/vant/dialog/dialog';
+import { matchingName } from '../utils/commont';
 export default {
     data() {
         return {
@@ -160,6 +162,12 @@ export default {
                 .catch(() => {
                     // on cancel
                 });
+        },
+        changeSearch(e) {
+            // matchingName(e.detail).then(res => {
+            //     console.log(res);
+            // });
+            // console.log(e);
         }
     }
 };

+ 3 - 3
src/pagesImt/Index.vue

@@ -23,7 +23,7 @@
             </div>
 
             <div class="main" id="main">
-                <div class="thirdbtn" v-if="tDurl && tDurl !== 'null'">
+                <div class="thirdbtn" @click="go3D">
                     <img src="../static/imgs/imt_topbanner_icon_3d.png" alt="" />
                     <div class="text">
                         <h4>点击观看 IMT 3D展厅</h4>
@@ -250,7 +250,7 @@ export default {
     background: #ffffff;
     border-radius: 4px;
     margin: 16px 33px 0;
-    padding: 30px 10px;
+    padding: 30px 16px;
 
     .p1 {
         font-size: 14px;
@@ -266,7 +266,7 @@ export default {
         margin-top: 20px;
         .introduce-img-item {
             // flex-grow: 1;
-            padding: 0 8px;
+            // padding: 0 8px;
             display: flex;
             flex-direction: column;
             align-items: center;

+ 1 - 1
src/pagesMine/Enter.vue

@@ -101,7 +101,7 @@ export default {
                 {
                     icon: 'http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/ruzhu_icon_jieduan03.png',
                     preTitle: '阶段三',
-                    title: '选择套餐',
+                    title: '功能开通',
                     steps: [
                         {
                             text: '审核通过后,开通展商功能'

+ 38 - 2
src/pagesMine/ReadRecords.vue

@@ -4,12 +4,23 @@
 }
 </config>
 <template>
-    <sort-list :empty="empty" :loading="loading" :finish="finish" :top="`0px + ${barHeight}px`">
+    <sort-list
+        emptyImg="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/kong_img_jilu.png"
+        emptyText="当前暂无浏览记录哦~"
+        :empty="empty"
+        :loading="loading"
+        :finish="finish"
+        :top="`0px + ${barHeight}px`"
+    >
         <div class="product-list">
             <div class="clo-2" v-for="item in list" :key="item.id">
                 <product-grid :info="item"></product-grid>
             </div>
         </div>
+        <fixed-button v-if="!empty">
+            <van-button :color="$colors.warn" block @click="clear">清除浏览记录</van-button>
+        </fixed-button>
+        <van-dialog id="van-dialog" />
     </sort-list>
 </template>
 <script>
@@ -17,8 +28,11 @@ import SortList from '../components/SortList.vue';
 import searchList from '../mixins/searchList';
 import ProductGrid from '../components/product/GridNormal.vue';
 import { mapState } from 'vuex';
+import FixedButton from '../components/FixedButton.vue';
+import Dialog from '../native/vant/dialog/dialog';
+
 export default {
-    components: { SortList, ProductGrid },
+    components: { SortList, ProductGrid, FixedButton },
     data() {
         return {
             url: '/collect/my',
@@ -47,6 +61,28 @@ export default {
             this.page++;
             this.getData();
         }
+    },
+    methods: {
+        clear() {
+            Dialog.confirm({
+                title: '提示',
+                message: '确定要清除全部浏览记录吗?',
+                confirmButtonColor: this.$colors.warn
+            })
+                .then(() => {
+                    return this.$http.post('/collect/cancelAll', {
+                        type: 'PRODUCT',
+                        isCollect: false
+                    });
+                })
+                .then(res => {
+                    this.page = 1;
+                    this.getData();
+                })
+                .catch(() => {
+                    // on cancel
+                });
+        }
     }
 };
 </script>

+ 5 - 5
src/pagesNews/Submit.vue

@@ -200,11 +200,11 @@ export default {
                 this.form = {
                     userId: this.userInfo.id,
                     sex: this.userInfo.sex,
-                    position: this.userInfo.position,
-                    nickname: this.userInfo.nickname,
-                    phone: this.userInfo.phone,
-                    email: this.userInfo.email,
-                    companyName: this.userInfo.chCompanyName,
+                    position: this.userInfo.position || '',
+                    nickname: this.userInfo.nickname || '',
+                    phone: this.userInfo.phone || '',
+                    email: this.userInfo.email || '',
+                    companyName: this.userInfo.chCompanyName || '',
                     informationId: this.informationId,
                     session: this.getList(this.information.session)
                 };

+ 156 - 92
src/pagesProduct/Detail.vue

@@ -8,78 +8,86 @@
 </config>
 <template>
     <div>
-        <custom-bar title="产品详情" :pre="0" :dark="false" :barTop="375"></custom-bar>
+        <custom-bar title="产品详情" :pre="0" :dark="!!productInfo.video" :barTop="375"></custom-bar>
         <banner :banners="banners" :height="375" :radius="0" :autoplay="false"></banner>
         <div class="main" id="main">
-            <div class="info">
-                <div class="ad" @click="goLocation" v-if="productInfo.offlineExperience">
-                    <span>可在IMT展厅线下体验,点击查看地址</span>
-                    <img src="../static/imgs/iocn_dingwei.png" alt="" />
-                </div>
-
-                <div class="info-top">
-                    <div class="title">
-                        {{ getName(productInfo) }}
+            <div id="detailTop">
+                <div class="info">
+                    <div class="ad" @click="goLocation" v-if="productInfo.offlineExperience">
+                        <span>可在IMT展厅线下体验,点击查看地址</span>
+                        <img src="../static/imgs/iocn_dingwei.png" alt="" />
                     </div>
-                    <div class="sub">{{ productInfo.model }}</div>
 
-                    <div class="btn">
-                        <van-icon
-                            @click="collection"
-                            :custom-class="animate ? 'my-icon iconAnimate' : 'my-icon'"
-                            :name="isCollection ? 'icon-aixin' : 'icon-icon_collect'"
-                            :size="36"
-                            :color="isCollection ? $colors.warn : '#BCC1CC'"
-                            class-prefix="iconfont"
+                    <div class="info-top">
+                        <div class="title">
+                            {{ getName(productInfo) }}
+                        </div>
+                        <div class="sub">{{ productInfo.model }}</div>
+
+                        <div class="btn">
+                            <van-icon
+                                @click="collection"
+                                :custom-class="animate ? 'my-icon iconAnimate' : 'my-icon'"
+                                :name="isCollection ? 'icon-aixin' : 'icon-icon_collect'"
+                                :size="42"
+                                :color="isCollection ? $colors.warn : '#BCC1CC'"
+                                class-prefix="iconfont"
+                            />
+                            <van-button
+                                plain
+                                icon="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_share.png"
+                                size="small"
+                                open-type="share"
+                            ></van-button>
+                        </div>
+                    </div>
+                    <van-divider />
+
+                    <van-cell-group :border="false">
+                        <van-cell :title="$t('chan-pin-pin-pai')" :border="false" :value="productInfo.brand" />
+                        <van-cell :title="$t('ying-wen-pin-ming')" :border="false" :value="productInfo.enName" />
+                        <van-cell :title="$t('chan-pin-lei-bie')" :border="false" :value="productCategoryName" />
+                        <van-cell
+                            title="交货周期"
+                            :border="false"
+                            v-if="productInfo.averageLeadTime"
+                            :value="productInfo.averageLeadTime"
                         />
-                        <van-icon
-                            custom-class="my-icon"
-                            name="icon-icon_share"
-                            :size="36"
-                            color="#BCC1CC"
-                            class-prefix="iconfont"
+                        <van-cell
+                            title="产品产地"
+                            v-if="productInfo.origin"
+                            :border="false"
+                            :value="productInfo.origin"
                         />
-                    </div>
+                        <van-cell title="应用领域" :border="false" :value="applicationField" />
+                        <van-cell title="产品标签" :border="false">
+                            <div>
+                                <van-tag color="#000" plain v-for="(item, index) in tags" :key="index">{{
+                                    item
+                                }}</van-tag>
+                            </div>
+                        </van-cell>
+                    </van-cell-group>
                 </div>
-                <van-divider />
-
-                <van-cell-group :border="false">
-                    <van-cell :title="$t('chan-pin-pin-pai')" :border="false" :value="productInfo.brand" />
-                    <van-cell :title="$t('ying-wen-pin-ming')" :border="false" :value="productInfo.enName" />
-                    <van-cell :title="$t('chan-pin-lei-bie')" :border="false" :value="productCategoryName" />
-                    <van-cell
-                        title="交货周期"
-                        :border="false"
-                        v-if="productInfo.averageLeadTime"
-                        :value="productInfo.averageLeadTime"
-                    />
-                    <van-cell title="产品产地" v-if="productInfo.origin" :border="false" :value="productInfo.origin" />
-                    <van-cell title="应用领域" :border="false" :value="applicationField" />
-                    <van-cell title="产品标签" :border="false">
-                        <div>
-                            <van-tag color="#000" plain v-for="(item, index) in tags" :key="index">{{ item }}</van-tag>
-                        </div>
-                    </van-cell>
-                </van-cell-group>
-            </div>
 
-            <div class="vendor" @click="navigateTo('/pagesVendor/Detail?id=' + vendorInfo.id)">
-                <van-image class="logo" :radius="4" :src="vendorInfo.logo" :width="60" :height="60" />
-                <div class="vendor-info">
-                    <div class="vendor-title">
-                        <h3>
-                            {{ getName(vendorInfo, ['chCompanyName', 'enCompanyName']) }}
-                        </h3>
-                        <van-image
-                            :width="17"
-                            :height="19"
-                            src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_qiyerenzheng.png"
-                            fit="contain"
-                        />
-                    </div>
+                <div class="vendor" @click="navigateTo('/pagesVendor/Detail?id=' + vendorInfo.id)">
+                    <van-image class="logo" :radius="4" :src="vendorInfo.logo" :width="60" :height="60" />
+                    <div class="vendor-info">
+                        <div class="vendor-title">
+                            <h3>
+                                {{ getName(vendorInfo, ['chCompanyName', 'enCompanyName']) }}
+                            </h3>
+                            <van-image
+                                :width="17"
+                                :height="19"
+                                src="http://imttech.oss-cn-hangzhou.aliyuncs.com/micro/icon_qiyerenzheng.png"
+                                fit="contain"
+                            />
+                        </div>
 
-                    <div class="vendor-btn">
-                        <van-button :color="$colors.warn" size="small">进入展商</van-button>
+                        <div class="vendor-btn">
+                            <van-button :color="$colors.warn" size="small">进入展商</van-button>
+                        </div>
                     </div>
                 </div>
             </div>
@@ -87,13 +95,14 @@
             <div class="detail" v-if="productInfo.id" id="detail">
                 <van-tabs
                     :active="hotActive"
-                    @change="tabClick"
+                    @click="tabClick"
+                    @change="tabChange"
                     :line-width="22"
                     :line-height="3"
                     sticky
                     :offset-top="barHeight"
                 >
-                    <van-tab title="图文详情">
+                    <van-tab title="图文详情" name="detail">
                         <div class="detail-content first">
                             <div class="imgList-btn" v-if="showBtn && detailImgList.length > 0" @click="showImgs">
                                 <van-image
@@ -111,12 +120,12 @@
                             </div>
                         </div>
                     </van-tab>
-                    <van-tab title="详细参数">
+                    <van-tab title="详细参数" name="list">
                         <div class="detail-content">
                             <parameter :productId="productId"></parameter>
                         </div>
                     </van-tab>
-                    <van-tab title="PDF资料" v-if="pdf.length > 0">
+                    <van-tab title="PDF资料" name="pdf" v-if="pdf.length > 0">
                         <div class="detail-content">
                             正在打开pdf...
                         </div>
@@ -257,10 +266,27 @@ export default {
                     // res.detailImg = new String(res.detailImg.getBytes('ISO-8859-1'), 'UTF-8');
                     this.productInfo = res;
                     this.getImgList(res.detailImg);
+
+                    if (res.video) {
+                        wx.setNavigationBarColor({
+                            frontColor: '#ffffff',
+                            backgroundColor: '#000000',
+                            animation: {
+                                duration: 400,
+                                timingFunc: 'easeIn'
+                            }
+                        });
+                    }
                     return this.$http.get('/vendorInfo/getHome/' + res.vendorInfoId);
                 })
                 .then(res => {
                     this.vendorInfo = res;
+
+                    wx.getSystemInfo({
+                        success: res => {
+                            this.screenHeight = res.screenHeight;
+                        }
+                    });
                 });
 
             if (this.$store.state.userInfo) {
@@ -274,36 +300,48 @@ export default {
         } else {
             this.showBtn = false;
         }
-    },
-    onReady() {
-        wx.getSystemInfo({
-            success: res => {
-                this.screenHeight = res.screenHeight;
-            }
-        });
-        setTimeout(() => {
+
+        this.$nextTick(() => {
             wx.createSelectorQuery()
-                .select('#main')
+                .select('#detailTop')
                 .boundingClientRect(rect => {
-                    const mainHeight = rect.height;
-                    wx.createSelectorQuery()
-                        .select('#detail')
-                        .boundingClientRect(rect => {
-                            this.detailTop = mainHeight - rect.height + rect.width + -this.barHeight - 30;
-                        })
-                        .exec();
+                    this.detailTop = rect.height + rect.width - this.barHeight;
                 })
                 .exec();
-        }, 1000);
+        });
+        if (this.productInfo.video) {
+            if (e.scrollTop > 0) {
+                wx.setNavigationBarColor({
+                    frontColor: '#000000',
+                    backgroundColor: '#ffffff',
+                    animation: {
+                        duration: 400,
+                        timingFunc: 'easeIn'
+                    }
+                });
+            } else {
+                wx.setNavigationBarColor({
+                    frontColor: '#ffffff',
+                    backgroundColor: '#000000',
+                    animation: {
+                        duration: 400,
+                        timingFunc: 'easeIn'
+                    }
+                });
+            }
+        }
+    },
+    onShareAppMessage(from, target) {
+        return {
+            title: 'IMT科技平台——' + this.getName(this.productInfo),
+            path: '/pagesProduct/Detail?id=' + this.productId,
+            imageUrl: this.getList(this.productInfo.img) + '?x-oss-process=image/resize,m_pad,h_400,w_500,color_FFFFFF'
+        };
     },
     methods: {
-        tabClick(e) {
-            wx.pageScrollTo({
-                scrollTop: this.detailTop,
-                duration: 300
-            });
+        tabChange(e) {
             this.hotActive = e.detail.index;
-            if (e.detail.index === 2) {
+            if (e.detail.name === 'pdf') {
                 wx.showActionSheet({
                     itemList: [...this.pdf].map((item, index) => {
                         const name = item.name.indexOf('http') !== -1 ? `文件${index + 1}` : item.name;
@@ -334,6 +372,12 @@ export default {
                 });
             }
         },
+        tabClick(e) {
+            wx.pageScrollTo({
+                scrollTop: this.detailTop,
+                duration: 300
+            });
+        },
         loginMethods() {
             this.$store.dispatch('getIntentionList');
             this.cId = this.$mp.options.id;
@@ -350,7 +394,6 @@ export default {
                     });
                 })
                 .then(() => {
-                    console.log('aaaa');
                     this.toast('添加成功!', 'success');
                     this.$store.dispatch('getIntentionList');
                 })
@@ -363,7 +406,14 @@ export default {
         goConnect() {
             this.$store.commit('updateChooseList', [this.productInfo]);
             console.log(this.$store.state.chooseList);
-            this.navigateTo('/pagesVendor/Connect?productId=' + this.productId + '&userId=' + this.vendorInfo.userId);
+            this.navigateTo(
+                '/pagesVendor/Connect?productId=' +
+                    this.productId +
+                    '&userId=' +
+                    this.vendorInfo.userId +
+                    '&vendorName=' +
+                    this.getName(this.vendorInfo, ['chCompanyName', 'enCompanyName'])
+            );
         },
         goLocation() {
             wx.openLocation({
@@ -452,10 +502,24 @@ export default {
         position: absolute;
         right: 0px;
         bottom: 0px;
+        display: flex;
+        align-items: center;
 
         ._van-icon {
             margin-left: 10px;
         }
+
+        ._van-button {
+            height: 40px;
+            margin-left: 5px;
+        }
+
+        .van-button {
+            --button-small-min-width: 0px;
+            --button-small-height: 40px;
+            --button-border-width: 0px;
+            --button-small-font-size: 24px;
+        }
     }
 
     --divider-text-color: #f2f4f5;

+ 2 - 2
src/pagesProduct/IntentionList.vue

@@ -60,7 +60,7 @@ export default {
             this.dialog('确认要删除该商品吗?', true, false, '立即删除')
                 .then(() => {
                     return this.$http.post('/intentionList/delOne', {
-                        type: 'PRODUCT_COMPARISON',
+                        type: 'BATCH_INQUIRY',
                         productId: id
                     });
                 })
@@ -69,7 +69,7 @@ export default {
                         this.choose(id);
                     }
                     this.toast('删除成功!', 'success');
-                    this.$store.dispatch('getContrastInfo');
+                    this.$store.dispatch('getIntentionList');
                 });
         },
         choose(id) {

+ 8 - 4
src/pagesVendor/Connect.vue

@@ -68,7 +68,8 @@ export default {
             artifact: '',
             otherProblems: '',
             productId: '',
-            toUserId: 0
+            toUserId: 0,
+            vendorName: ''
         };
     },
     computed: {
@@ -122,14 +123,17 @@ export default {
             this.vendorId = options.vendorId;
         }
 
+        if (options.vendorName) {
+            this.vendorName = options.vendorName;
+        }
+
         if (options.userId) {
             this.toUserId = options.userId;
         }
     },
     methods: {
         submit() {
-            console.log(JSON.stringify(this.submitForm));
-            if (!this.allList.length === 0) {
+            if (this.allList.length === 0) {
                 this.toast('请添加咨询产品');
                 return;
             }
@@ -150,7 +154,7 @@ export default {
                 })
                 .then(res => {
                     wx.redirectTo({
-                        url: '/pagesChat/ChatDetail?toUserId=' + this.toUserId
+                        url: '/pagesChat/ChatDetail?toUserId=' + this.toUserId + '&name=' + this.vendorName
                     });
                 })
                 .catch(e => {

+ 17 - 1
src/pagesVendor/Detail.vue

@@ -65,7 +65,16 @@
             <van-button
                 :color="$colors.warn"
                 block
-                @click="navigateTo('/pagesVendor/Connect?vendorId=' + vendorInfo.id + '&userId=' + vendorInfo.userId)"
+                @click="
+                    navigateTo(
+                        '/pagesVendor/Connect?vendorId=' +
+                            vendorInfo.id +
+                            '&userId=' +
+                            vendorInfo.userId +
+                            '&vendorName=' +
+                            getName(vendorInfo, ['chCompanyName', 'enCompanyName'])
+                    )
+                "
                 >咨询展商</van-button
             >
         </fixed-button>
@@ -163,6 +172,13 @@ export default {
         } else {
             this.showConnect = true;
         }
+    },
+    onShareAppMessage(from, target) {
+        return {
+            title: 'IMT科技平台——' + this.vendorInfo.chCompanyName,
+            path: '/pagesVendor/Detail?id=' + this.vendorInfo.id,
+            imageUrl: this.getList(this.vendorInfo.logo) + '?x-oss-process=image/resize,m_pad,h_400,w_500,color_FFFFFF'
+        };
     }
 };
 </script>

+ 2 - 2
src/plugins/http.js

@@ -57,7 +57,7 @@ const http = {
             });
         });
     },
-    post(url, data, options) {
+    post(url, data, options, backHeader = false) {
         console.log('post');
         options = options || {};
         return new Promise((resolve, reject) => {
@@ -74,7 +74,7 @@ const http = {
                 },
                 success(res) {
                     if (res && res.statusCode === 200) {
-                        resolve(res.data);
+                        resolve(backHeader ? res : res.data);
                     } else {
                         reject(res.data || res);
                     }

+ 12 - 7
src/styles/fonts.less

@@ -4,13 +4,13 @@
 }
 
 @font-face {
-    font-family: 'iconfont'; /* project id 2026145 */
-    src: url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.eot');
-    src: url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.eot?#iefix') format('embedded-opentype'),
-        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.woff2') format('woff2'),
-        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.woff') format('woff'),
-        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.ttf') format('truetype'),
-        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.svg#iconfont') format('svg');
+  font-family: 'iconfont';  /* project id 2026145 */
+  src: url('//at.alicdn.com/t/font_2026145_8twjl7d6y4v.eot');
+  src: url('//at.alicdn.com/t/font_2026145_8twjl7d6y4v.eot?#iefix') format('embedded-opentype'),
+  url('//at.alicdn.com/t/font_2026145_8twjl7d6y4v.woff2') format('woff2'),
+  url('//at.alicdn.com/t/font_2026145_8twjl7d6y4v.woff') format('woff'),
+  url('//at.alicdn.com/t/font_2026145_8twjl7d6y4v.ttf') format('truetype'),
+  url('//at.alicdn.com/t/font_2026145_8twjl7d6y4v.svg#iconfont') format('svg');
 }
 .iconfont {
     font-family: 'iconfont' !important;
@@ -39,6 +39,11 @@
     content: '\e61b';
 }
 
+.iconfont-icon-home:before{
+	 content: '\e674';
+
+}
+
 .iconfont-icon-arrow-up-filling:before {
     content: '\e688';
 }

+ 31 - 1
src/utils/commont.js

@@ -59,4 +59,34 @@ function saveBrowse(cid, type = 'PRODUCT') {
         });
 }
 
-export { getBanner, getArray, saveBrowse };
+// 模糊匹配
+function matchingName(str = '') {
+    if (str) {
+        return http.http
+            .post(
+                '/product/all',
+                {
+                    search: str,
+                    page: 0,
+                    size: 10
+                },
+                {
+                    header: {
+                        'Content-Type': 'application/json'
+                    }
+                }
+            )
+            .then(res => {
+                return Promise.resolve(
+                    res.content.map(item => {
+                        return {
+                            chName: item.chName,
+                            enName: item.enName
+                        };
+                    })
+                );
+            });
+    }
+}
+
+export { getBanner, getArray, saveBrowse, matchingName };