panhui 5 лет назад
Родитель
Сommit
d41580f8f3
60 измененных файлов с 3510 добавлено и 391 удалено
  1. 5 0
      package-lock.json
  2. 1 0
      package.json
  3. 89 14
      project.config.json
  4. 26 1
      src/App.vue
  5. 35 2
      src/components/AuthPhone.vue
  6. 61 23
      src/components/Banner.vue
  7. 69 0
      src/components/ChangeText.vue
  8. 150 0
      src/components/ChatInfo.vue
  9. 32 2
      src/components/FixedButton.vue
  10. 158 0
      src/components/Member.vue
  11. 1 1
      src/components/imt/Bottom.vue
  12. 11 6
      src/components/product/Row.vue
  13. 18 4
      src/components/product/RowMini.vue
  14. 93 0
      src/components/product/RowNormal.vue
  15. 66 0
      src/components/vendor/Application.vue
  16. 39 0
      src/components/vendor/Case.vue
  17. 1 1
      src/components/vendor/Grid.vue
  18. 6 1
      src/components/vendor/Row.vue
  19. 29 15
      src/main.js
  20. 94 0
      src/mixins/collection.js
  21. 24 5
      src/mixins/commont.js
  22. 2 1
      src/mixins/searchList.js
  23. 0 0
      src/native/cnchar.min.js
  24. 53 4
      src/pages/Chat.vue
  25. 7 6
      src/pages/Classify.vue
  26. 0 75
      src/pages/Collect.vue
  27. 4 3
      src/pages/Home.vue
  28. 9 5
      src/pages/My.vue
  29. 0 149
      src/pages/News.vue
  30. 4 2
      src/pagesHome/Authorized.vue
  31. 0 0
      src/pagesHome/Brand.vue
  32. 40 0
      src/pagesHome/ChatPage.vue
  33. 155 0
      src/pagesHome/Edit.vue
  34. 2 1
      src/pagesHome/FilterPage.vue
  35. 0 0
      src/pagesHome/Product.vue
  36. 0 0
      src/pagesHome/ProductList.vue
  37. 0 0
      src/pagesImt/Advantage.vue
  38. 0 0
      src/pagesImt/Connect.vue
  39. 9 9
      src/pagesImt/Index.vue
  40. 2 2
      src/pagesImt/Service.vue
  41. 2 2
      src/pagesImt/ServiceDetail.vue
  42. 74 0
      src/pagesMine/Activity.vue
  43. 181 0
      src/pagesMine/ChatDetail.vue
  44. 150 0
      src/pagesMine/Collect.vue
  45. 61 0
      src/pagesMine/ReadRecords.vue
  46. 55 28
      src/pagesProduct/Contrast.vue
  47. 27 0
      src/pagesProduct/ContrastDetail.vue
  48. 30 11
      src/pagesProduct/Detail.vue
  49. 134 0
      src/pagesProduct/FilterProduct.vue
  50. 134 0
      src/pagesProduct/FilterVendor.vue
  51. 227 0
      src/pagesProduct/Inquiry.vue
  52. 69 0
      src/pagesProduct/InquiryResult.vue
  53. 174 0
      src/pagesProduct/IntentionList.vue
  54. 234 0
      src/pagesVendor/About.vue
  55. 231 0
      src/pagesVendor/Connect.vue
  56. 160 0
      src/pagesVendor/Detail.vue
  57. 117 0
      src/pagesVendor/FilterProduct.vue
  58. 119 0
      src/pagesVendor/Product.vue
  59. 33 17
      src/store/index.js
  60. 3 1
      src/styles/fonts.less

+ 5 - 0
package-lock.json

@@ -4600,6 +4600,11 @@
       "resolved": "https://registry.npm.taobao.org/date-fns/download/date-fns-2.16.1.tgz?cache=0&sync_timestamp=1598884179081&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fdate-fns%2Fdownload%2Fdate-fns-2.16.1.tgz",
       "integrity": "sha1-BXdXksPzMx2oEq8lPhqTWFHTg0s="
     },
+    "dayjs": {
+      "version": "1.9.6",
+      "resolved": "https://registry.npm.taobao.org/dayjs/download/dayjs-1.9.6.tgz",
+      "integrity": "sha1-bwx312rB/2NyDdEZfly4e2eUPXA="
+    },
     "de-indent": {
       "version": "1.0.2",
       "resolved": "https://registry.npm.taobao.org/de-indent/download/de-indent-1.0.2.tgz",

+ 1 - 0
package.json

@@ -40,6 +40,7 @@
         "@vant/weapp": "^1.4.4",
         "countup.js": "^2.0.7",
         "date-fns": "^2.16.1",
+        "dayjs": "^1.9.6",
         "megalo": "latest",
         "octoparse": "^0.4.2",
         "style-resources-loader": "^1.3.3",

+ 89 - 14
project.config.json

@@ -67,6 +67,12 @@
                     "pathName": "pages/My",
                     "scene": null
                 },
+                {
+                    "id": -1,
+                    "name": "编辑",
+                    "pathName": "pagesHome/Edit",
+                    "scene": null
+                },
                 {
                     "id": -1,
                     "name": "产品分类",
@@ -76,13 +82,19 @@
                 {
                     "id": -1,
                     "name": "授权",
-                    "pathName": "pages/Authorized",
+                    "pathName": "pagesHome/Authorized",
                     "scene": null
                 },
                 {
                     "id": -1,
                     "name": "收藏",
-                    "pathName": "pages/Collect",
+                    "pathName": "pagesMine/Collect",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "浏览记录",
+                    "pathName": "pagesMine/ReadRecords",
                     "scene": null
                 },
                 {
@@ -94,7 +106,7 @@
                 {
                     "id": -1,
                     "name": "筛选",
-                    "pathName": "pages/FilterPage",
+                    "pathName": "pagesHome/FilterPage",
                     "scene": null
                 },
                 {
@@ -106,7 +118,7 @@
                 {
                     "id": -1,
                     "name": "imt平台",
-                    "pathName": "pages/imt/Index",
+                    "pathName": "pagesImt/Index",
                     "scene": null
                 },
                 {
@@ -144,7 +156,7 @@
                 {
                     "id": -1,
                     "name": "imt服务详情",
-                    "pathName": "pages/imt/ServiceDetail",
+                    "pathName": "pagesImt/ServiceDetail",
                     "query": "name=综合物流",
                     "scene": null
                 },
@@ -159,15 +171,78 @@
                     "id": -1,
                     "name": "商品详情",
                     "pathName": "pagesProduct/Detail",
-                    "query": "id=4763",
-                    "scene": null
-                },{
-                      "id": -1,
-                      "name": "商品对比",
-                      "pathName": "pagesProduct/Contrast",
-                      "query": "productId=4763",
-                      "scene": null
-                  }
+                    "query": "id=7038",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "商品对比",
+                    "pathName": "pagesProduct/Contrast",
+                    "query": "productId=7040",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "选择展商",
+                    "pathName": "pagesProduct/FilterVendor",
+                    "query": "categoryIds=277",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "选择商品",
+                    "pathName": "pagesProduct/FilterProduct",
+                    "query": "categoryIds=277&vendorId=6315&vendorName=走马小商铺",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "意向单",
+                    "pathName": "pagesProduct/IntentionList",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "询价",
+                    "pathName": "pagesProduct/Inquiry",
+                    "query": "chooseIds=6877,4819,4763",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "询价结果",
+                    "pathName": "pagesProduct/InquiryResult",
+                    "query": "",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "关于展商",
+                    "pathName": "pagesVendor/Detail",
+                    "query": "id=6294",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "咨询展商",
+                    "pathName": "pagesVendor/Connect",
+                    "query": "vendorId=6294",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "聊天",
+                    "pathName": "pages/Chat",
+                    "scene": null
+                },
+                {
+                    "id": -1,
+                    "name": "聊天详情",
+                    "pathName": "pagesMine/ChatDetail",
+                    "query": "toUserId=6293",
+                    "scene": null
+                }
             ]
         }
     }

+ 26 - 1
src/App.vue

@@ -70,9 +70,10 @@ h3 {
     font-weight: bold;
     color: #000000;
     line-height: 24px;
-    white-space: nowrap;
     overflow: hidden;
     text-overflow: ellipsis;
+    white-space: nowrap;
+    word-wrap: normal;
 }
 
 h4 {
@@ -148,4 +149,28 @@ page {
         background-color: darken(#fff, 5);
     }
 }
+
+@keyframes iconAnimate {
+    from {
+        -webkit-transform: scale(1);
+        transform: scale(1);
+    }
+
+    20% {
+        -webkit-transform: scale(0.8);
+        transform: scale(0.8);
+    }
+
+    80% {
+        -webkit-transform: scale(1.5);
+        transform: scale(1.5);
+    }
+    100% {
+        -webkit-transform: scale(1);
+        transform: scale(1);
+    }
+}
+.iconAnimate {
+    animation: iconAnimate ease-in-out 0.3s;
+}
 </style>

+ 35 - 2
src/components/AuthPhone.vue

@@ -16,9 +16,17 @@
                     round
                     class="logo"
                 />
-                <h3>IMT科技平台 <span>申请</span></h3>
+                <h3>IMT科技平台 <span>申请使用</span></h3>
+            </div>
+            <h2>获取你的昵称、头像、地区及性别</h2>
+
+            <div class="userinfo">
+                <van-image :width="40" :height="40" round :src="info.avatarUrl" fit="cover" />
+                <div class="info">
+                    <div class="text1">{{ info.nickName }}</div>
+                    <div class="text2">微信个人信息</div>
+                </div>
             </div>
-            <h2>使用你的手机号码</h2>
 
             <div class="btn-list">
                 <van-button :radius="4" style="margin-right: 20px;" @click="refus">拒绝</van-button>
@@ -35,6 +43,12 @@ export default {
         show: {
             type: Boolean,
             default: false
+        },
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
         }
     },
     methods: {
@@ -78,6 +92,25 @@ export default {
         }
     }
 }
+
+.userinfo {
+    display: flex;
+    padding: 24px 0 10px;
+    .info {
+        margin-left: 9px;
+        .text1 {
+            font-size: 15px;
+            color: #000000;
+            line-height: 21px;
+        }
+
+        .text2 {
+            font-size: 13px;
+            color: #b2b2b2;
+            line-height: 18px;
+        }
+    }
+}
 </style>
 
 <style lang="less">

+ 61 - 23
src/components/Banner.vue

@@ -6,9 +6,19 @@
             </div>
         </div>
         <div class="swiperContent" :style="bannerStyle">
-            <swiper autoplay :style="scale" @change="current = $event.detail.current" :current="current">
-                <swiper-item v-for="item in banners" :key="item.id">
-                    <van-image :src="item.img" width="100%" height="100%" fit="cover" :radius="radius" />
+            <swiper :autoplay="autoplay" :style="scale" @change="current = $event.detail.current" :current="current">
+                <swiper-item v-for="(item, index) in banners" :key="index">
+                    <van-image
+                        v-if="checkImg(item.img)"
+                        :src="item.img"
+                        width="100%"
+                        height="100%"
+                        fit="cover"
+                        :radius="radius"
+                    />
+                    <div class="video" v-else>
+                        <video class="video-content" :src="item.img"></video>
+                    </div>
                 </swiper-item>
             </swiper>
         </div>
@@ -46,6 +56,10 @@ export default {
         fixed: {
             type: Boolean,
             default: false
+        },
+        autoplay: {
+            type: Boolean,
+            default: true
         }
     },
     data() {
@@ -97,28 +111,41 @@ export default {
             }
         }
     },
-    onPageScroll(e) {
-        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'
-                }
-            });
+    methods: {
+        checkImg(file) {
+            const imglist = ['png', 'PNG', 'jpg', 'JPG', 'jpeg', 'JPEG', 'bmp', 'BMP', 'gif', 'GIF'];
+            const _info = file.split('.');
+            if (imglist.indexOf(_info[_info.length - 1]) !== -1) {
+                return true;
+            } else {
+                return false;
+            }
         }
+    },
+    onPageScroll(e) {
+        if (this.fixed) {
+            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'
+                    }
+                });
+            }
 
-        this.scrollTop = e.scrollTop;
+            this.scrollTop = e.scrollTop;
+        }
     }
 };
 </script>
@@ -179,4 +206,15 @@ export default {
 .swiperContent {
     z-index: 1;
 }
+
+.video {
+    width: 100%;
+    height: 100%;
+    background-color: #000;
+
+    .video-content {
+        height: 100%;
+        width: 100%;
+    }
+}
 </style>

+ 69 - 0
src/components/ChangeText.vue

@@ -0,0 +1,69 @@
+<template>
+    <van-popup :show="show" round position="bottom" @close="refus">
+        <div class="popup-content">
+            <input
+                class="weui-input"
+                @input="
+                    change = true;
+                    nowValue = $event.detail.value;
+                "
+                :value="value"
+                :focus="true"
+                placeholder="请输入..."
+                confirm-type="done"
+            />
+            <div class="btn">
+                <van-button block :color="$colors.warn" @click="submit">确定</van-button>
+            </div>
+        </div>
+    </van-popup>
+</template>
+<script>
+export default {
+    props: {
+        show: {
+            type: Boolean,
+            default: false
+        },
+        value: {
+            type: String,
+            default: ''
+        }
+    },
+    data() {
+        return {
+            nowValue: '',
+            change: false
+        };
+    },
+    watch: {
+        show() {
+            this.change = false;
+        }
+    },
+    methods: {
+        refus() {
+            this.$emit('update:show', false);
+        },
+        submit() {
+            this.$emit('input', this.change ? this.nowValue : this.value);
+            this.$emit('update:show', false);
+        }
+    }
+};
+</script>
+<style lang="less">
+.popup-content {
+    background-color: #fff;
+    padding: 16px;
+
+    .weui-input {
+        padding: 12px;
+        background-color: #f2f4f5;
+        border-radius: 4px;
+    }
+    .btn {
+        margin: 15px 20px 0;
+    }
+}
+</style>

+ 150 - 0
src/components/ChatInfo.vue

@@ -0,0 +1,150 @@
+<template>
+    <div>
+        <div class="chatTime">
+            {{ info.time }}
+        </div>
+        <div class="chatInfo" :class="{ right: isMine }" v-if="isInquiry">
+            <van-image class="left-icon" :src="info.sendLogo" :width="36" :height="36" round fit="cover" />
+
+            <div class="order">
+                <van-image
+                    src="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/liaotian_img_zixundan.png"
+                    :width="90"
+                    :height="90"
+                    fit="cover"
+                />
+
+                <div class="order-info">
+                    <div class="name">咨询单</div>
+                    <div class="time">{{ info.time }}</div>
+                    <div class="btn">查看详情</div>
+                </div>
+            </div>
+            <van-image class="right-icon" :src="info.receiveLogo" :width="36" :height="36" round fit="cover" />
+        </div>
+        <div class="chatInfo" :class="{ right: isMine }">
+            <van-image class="left-icon" :src="info.sendLogo" :width="36" :height="36" round fit="cover" />
+            <div class="chat-content">{{ content }}</div>
+            <van-image class="right-icon" :src="info.receiveLogo" :width="36" :height="36" round fit="cover" />
+        </div>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        }
+    },
+    data() {
+        return {};
+    },
+    computed: {
+        ...mapState(['userInfo']),
+        isInquiry() {
+            if (this.info.content && this.info.content[0] === '{') {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        content() {
+            if (this.info.content) {
+                if (this.info.content[0] === '{') {
+                    return '你好,我对贵方的产品非常感兴趣,希望可以详细聊聊';
+                } else {
+                    return this.info.content;
+                }
+            } else {
+                return '';
+            }
+        },
+        isMine() {
+            if (this.userInfo && this.info.sendUserId === this.userInfo.id) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }
+};
+</script>
+<style lang="less" scoped>
+.chatInfo {
+    display: flex;
+    padding: 15px 16px;
+
+    .chat-content {
+        font-size: 16px;
+        color: #000000;
+        line-height: 26px;
+        padding: 10px;
+        background: #ffffff;
+        border-radius: 0px 12px 12px 12px;
+        margin: 0 8px;
+    }
+    .right-icon {
+        visibility: hidden;
+    }
+
+    &.right {
+        flex-direction: row-reverse;
+        .chat-content {
+            color: #fff;
+            background: #425067;
+            border-radius: 12px 0px 12px 12px;
+        }
+        .order {
+            flex-direction: row;
+            border-radius: 12px 0px 12px 12px;
+        }
+    }
+
+    .order {
+        background: #ffffff;
+        border-radius: 0px 12px 12px 12px;
+        display: flex;
+        margin: 0 8px;
+        overflow: hidden;
+        flex-direction: row-reverse;
+        &:active {
+            background-color: darken(#fff, 2);
+        }
+        .order-info {
+            padding: 10px 12px;
+            .name {
+                font-size: 18px;
+                font-weight: bold;
+                color: #292c33;
+                line-height: 25px;
+            }
+
+            .time {
+                font-size: 12px;
+                color: #878d99;
+                line-height: 17px;
+                margin-top: 2px;
+            }
+
+            .btn {
+                font-size: 12px;
+                color: #ffa526;
+                line-height: 17px;
+                margin-top: 5px;
+            }
+        }
+    }
+}
+
+.chatTime {
+    font-size: 12px;
+    color: #878d99;
+    line-height: 17px;
+    padding: 15px;
+    text-align: center;
+}
+</style>

+ 32 - 2
src/components/FixedButton.vue

@@ -1,13 +1,22 @@
 <template>
     <div class="bottomFixed">
-        <div class="btn">
+        <div class="btn-list" v-if="btnList">
+            <slot></slot>
+        </div>
+        <div class="btn" v-else>
             <slot></slot>
         </div>
     </div>
 </template>
 <script>
 export default {
-    name: 'FixedButton'
+    name: 'FixedButton',
+    props: {
+        btnList: {
+            type: Boolean,
+            default: false
+        }
+    }
 };
 </script>
 
@@ -15,6 +24,27 @@ export default {
 .bottomFixed {
     height: 60px;
 
+    .btn-list {
+        position: fixed;
+        background-color: #fff;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        padding: 8px 10px;
+        z-index: 99;
+        box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
+        display: flex;
+        align-items: center;
+        ._van-button {
+            width: 50%;
+            box-sizing: border-box;
+            padding: 0 6px;
+        }
+        .van-button {
+            height: 40px;
+        }
+    }
+
     .btn {
         position: fixed;
         background-color: #fff;

+ 158 - 0
src/components/Member.vue

@@ -0,0 +1,158 @@
+<template>
+    <div class="message" @click="goDetail" :class="{ system: !!type }">
+        <van-image :src="img" :width="48" :height="48" fit="cover" :radius="4" />
+        <div class="info">
+            <div class="name">{{ name }}</div>
+            <div class="message">{{ content }}</div>
+        </div>
+        <div class="right">
+            <div class="time" v-if="info.time">{{ time }}</div>
+            <div class="badge" v-if="info.unreadNumber">{{ info.unreadNumber }}</div>
+        </div>
+    </div>
+</template>
+<script>
+import dayjs from 'dayjs';
+var relativeTime = require('dayjs/plugin/relativeTime');
+dayjs.extend(relativeTime);
+dayjs.locale('zh-cn');
+export default {
+    name: 'member',
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        },
+        type: {
+            type: String,
+            default: ''
+        },
+        isChoose: {
+            type: Boolean,
+            default: false
+        }
+    },
+    data() {
+        return {};
+    },
+    computed: {
+        img() {
+            if (this.type === 'system') {
+                return 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/xiaoxi_icon_xitong.png';
+            } else if (this.type === 'admin') {
+                return 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/xiaoxi_icon_fuwuguanjia.png';
+            } else {
+                return this.info.otherLogo || 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/info_img_touxiang_01.png';
+            }
+        },
+        name() {
+            if (this.type === 'system') {
+                return '系统消息';
+            } else if (this.type === 'admin') {
+                return '服务管家';
+            } else {
+                return this.info.otherName || '神秘用户';
+            }
+        },
+        content() {
+            if (this.type === 'system') {
+                return this.info.content || '';
+            } else if (this.info.message) {
+                if (this.info.message[0] === '{') {
+                    return '你好,我对贵方的产品非常感兴趣,希望可以详细聊聊';
+                } else {
+                    return this.info.message;
+                }
+            } else {
+                return '';
+            }
+        },
+        time() {
+            if (this.info.time) {
+                return dayjs(this.info.time).fromNow();
+            } else {
+                return '';
+            }
+        }
+    },
+    methods: {
+        goDetail() {
+            if (this.type === 'system') {
+                this.navigateTo('/pagesMine/ChatDetail?type=system');
+            } else {
+                this.navigateTo(
+                    `/pagesMine/ChatDetail?toUserId=${this.info.otherUserId}${this.type ? '&type=' + this.type : ''}`
+                );
+            }
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.message {
+    display: flex;
+    padding: 16px;
+    height: 48px;
+    .info {
+        flex-grow: 1;
+        padding: 2px 8px;
+        overflow: hidden;
+        .name {
+            font-size: 16px;
+            color: #000000;
+            line-height: 22px;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+        }
+
+        .message {
+            font-size: 12px;
+            color: #878d99;
+            line-height: 17px;
+            margin-top: 5px;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+        }
+    }
+
+    .right {
+        flex-shrink: 0;
+        display: flex;
+        flex-direction: column;
+        align-items: flex-end;
+        .time {
+            font-size: 12px;
+            color: #bcc1cc;
+            line-height: 17px;
+        }
+
+        .badge {
+            margin-top: 4px;
+
+            font-size: 12px;
+            color: #ffffff;
+            line-height: 10px;
+            padding: 4px;
+            border-radius: 100%;
+            background-color: #e14948;
+            min-width: 10px;
+            text-align: center;
+        }
+    }
+    &.system {
+        .info {
+            .name {
+                color: @warn;
+            }
+        }
+    }
+    &:active {
+        background-color: darken(#fff, 5);
+    }
+}
+</style>

+ 1 - 1
src/components/imt/Bottom.vue

@@ -29,7 +29,7 @@ export default {
                     img1: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/imt_icon_gaikuang.png',
                     img2: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/imt_icon_gaikuang_pre.png',
                     text: '概况',
-                    url: '/pages/imt/Index'
+                    url: '/pagesImt/Index'
                 },
                 {
                     img1: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/imt_icon_youshi.png',

+ 11 - 6
src/components/product/RowMini copy.vue → src/components/product/Row.vue

@@ -1,14 +1,10 @@
 <template>
-    <div class="product">
+    <div class="product" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
         <van-image :src="img" :width="62" :height="62" fit="cover" />
         <div class="info">
             <h3>{{ getName(info) }}</h3>
-            <div class="sub">
-                <van-image :src="info.logo" v-if="info.logo" :width="39" :height="17" fit="contain" />
-                <p>{{ info.model }}</p>
-            </div>
+            <p>{{ info.model }}</p>
         </div>
-        <van-icon :size="20" color="#BCC1CC" name="delete" />
     </div>
 </template>
 <script>
@@ -38,8 +34,17 @@ export default {
 <style lang="less" scoped>
 .product {
     display: flex;
+    padding: 8px 12px;
+    overflow: hidden;
+    width: 100%;
+    box-sizing: border-box;
     .info {
         flex-grow: 1;
+        margin-left: 8px;
+        overflow: hidden;
+    }
+    &:active {
+        background-color: darken(#fff, 5);
     }
 }
 </style>

+ 18 - 4
src/components/product/RowMini.vue

@@ -1,6 +1,12 @@
 <template>
     <div class="product" @click="choose">
-        <van-icon :name="checked ? 'checked' : 'circle'" :color="checked ? $colors.warn : '#BCC1CC'" :size="16" />
+        <van-icon
+            v-if="hasCheck"
+            :name="checked ? 'checked' : 'circle'"
+            :color="checked ? $colors.warn : '#BCC1CC'"
+            :size="16"
+            style="margin-right:12px"
+        />
         <van-image :src="img" :width="62" :height="62" fit="cover" />
         <div class="info">
             <h3>{{ getName(info) }}</h3>
@@ -9,7 +15,7 @@
                 <p>{{ info.model }}</p>
             </div>
         </div>
-        <van-icon @click.stop="del" :size="20" color="#BCC1CC" name="delete" />
+        <van-icon v-if="hasDel" @click.stop="del" :size="20" color="#BCC1CC" name="delete" />
     </div>
 </template>
 <script>
@@ -24,6 +30,14 @@ export default {
         checked: {
             type: Boolean,
             default: false
+        },
+        hasDel: {
+            type: Boolean,
+            default: true
+        },
+        hasCheck: {
+            type: Boolean,
+            default: true
         }
     },
     computed: {
@@ -57,8 +71,8 @@ export default {
         align-self: center;
     }
 
-    ._van-image {
-        margin-left: 12px;
+    &:active {
+        background-color: darken(#fff, 5);
     }
 }
 </style>

+ 93 - 0
src/components/product/RowNormal.vue

@@ -0,0 +1,93 @@
+<template>
+    <div class="product" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
+        <van-image :src="img" :width="110" :height="110" fit="cover" />
+        <div class="info">
+            <h3>{{ getName(info) }}</h3>
+            <div class="sub">
+                <van-image :src="info.logo" v-if="info.logo" :width="39" :height="17" fit="contain" />
+                <p>{{ info.model }}</p>
+            </div>
+            <div class="tags">
+                <van-tag v-for="(item, index) in tag" :key="index" custom-class="mini" plain color="#BCC1CC">{{
+                    item
+                }}</van-tag>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        }
+    },
+    computed: {
+        img() {
+            if (this.getList(this.info.img)) {
+                return this.getList(this.info.img) + '?x-oss-process=image/resize,m_fill,h_200,w_200';
+            } else {
+                return '';
+            }
+        },
+        tag() {
+            return (
+                this.info.tag
+                    .filter(item => {
+                        return !!item;
+                    })
+                    .slice(0, 3) || []
+            );
+        }
+    },
+    data() {
+        return {};
+    }
+};
+</script>
+<style lang="less" scoped>
+.product {
+    display: flex;
+    padding: 8px 12px;
+    overflow: hidden;
+    box-sizing: border-box;
+    background-color: #fff;
+    border-radius: 4px;
+    .info {
+        flex-grow: 1;
+        padding: 12px;
+        overflow: hidden;
+    }
+    &:active {
+        background-color: darken(#fff, 5);
+    }
+}
+
+.sub {
+    display: flex;
+    align-items: center;
+}
+
+.tags {
+    display: flex;
+    align-items: center;
+    flex-wrap: nowrap;
+    white-space: nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    min-height: 21px;
+    margin-top: 21px;
+}
+</style>
+
+<style lang="less">
+.van-tag {
+    &.mini {
+        font-size: 10px;
+        margin-right: 4px;
+    }
+}
+</style>

+ 66 - 0
src/components/vendor/Application.vue

@@ -0,0 +1,66 @@
+<template>
+    <div class="application " @click="$router.push(`/brandProductList?vendorInfoId=${storeId}&applicationField=${id}`)">
+        <van-image :src="bgs[index % 8]" :radius="4" :width="100" :height="120" fit="cover" />
+        <div class="text">{{ name }}</div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'Application',
+    props: {
+        index: {
+            type: Number,
+            default: 0
+        },
+        name: {
+            type: String,
+            default: ''
+        },
+        storeId: {
+            type: Number,
+            default: 0
+        },
+        id: {
+            type: Number,
+            default: 0
+        }
+    },
+    data() {
+        return {
+            bgs: [
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_012x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_022x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_032x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_042x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_052x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_062x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_072x.jpg',
+                'http://imt.oss-cn-hangzhou.aliyuncs.com/case/application/yingyong_img_082x.jpg'
+            ]
+        };
+    }
+};
+</script>
+<style lang="scss" scoped>
+.application {
+    position: relative;
+    cursor: pointer;
+    overflow: hidden;
+    flex-shrink: 0;
+
+    .text {
+        font-size: 14px;
+        color: #ffffff;
+        line-height: 19px;
+        position: absolute;
+        top: 0;
+        left: 0;
+        right: 0;
+        bottom: 0;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+}
+</style>

+ 39 - 0
src/components/vendor/Case.vue

@@ -0,0 +1,39 @@
+<template>
+    <div class="case">
+        <van-image :width="300" :height="170" :src="info.img" fit="contain" />
+        <h3>{{ info.title }}</h3>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    name: 'case',
+    props: {
+        info: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        }
+    },
+    data() {
+        return {};
+    }
+};
+</script>
+<style lang="less" scoped>
+.case {
+    h3 {
+        padding: 11px 12px;
+        font-weight: normal;
+    }
+
+    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.06);
+    border-radius: 4px;
+    overflow: hidden;
+
+    &:active {
+        background-color: darken(#fff, 5);
+    }
+}
+</style>

+ 1 - 1
src/components/vendor/Grid.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="bg-white">
+    <div class="bg-white" @click="navigateTo('/pagesVendor/Detail?id=' + info.id, false)">
         <van-image radius="4" width="100%" :src="logo" fit="cover" />
     </div>
 </template>

+ 6 - 1
src/components/vendor/Row.vue

@@ -1,5 +1,5 @@
 <template>
-    <div class="bg-white vendor">
+    <div class="bg-white vendor" @click="navigateTo('/pagesVendor/Detail?id=' + info.id, false)">
         <van-image :radius="0" width="110px" height="110px" :src="info.logo" fit="cover" />
         <div class="content">
             <h3>{{ getName(info, ['chCompanyName', 'enCompanyName']) }}</h3>
@@ -45,6 +45,11 @@ export default {
     display: flex;
     border-radius: 4px;
     overflow: hidden;
+    background-color: #fff;
+
+    &:active {
+        background-color: darken(#fff, 5);
+    }
 
     .content {
         flex-grow: 1;

+ 29 - 15
src/main.js

@@ -8,6 +8,7 @@ import vuexI18n from 'vuex-i18n';
 import en from './locales/en/index';
 import zh from './locales/zh/index';
 import commont from './mixins/commont';
+require('dayjs/locale/zh-cn');
 
 Vue.mixin(commont);
 Vue.prototype.$colors = {
@@ -57,33 +58,46 @@ app.$mount();
 export default {
     config: {
         // pages 的首个页面会被编译成首页
-        pages: [
-            'pages/Home',
-            'pages/Chat',
-            'pages/Classify',
-            'pages/My',
-            'pages/Authorized',
-            'pages/Collect',
-            'pages/Brand',
-            'pages/Product',
-            'pages/ProductList',
-            'pages/FilterPage',
-            'pages/imt/Index',
-            'pages/imt/ServiceDetail'
-        ],
+        pages: ['pages/Home', 'pages/Chat', 'pages/Classify', 'pages/My'],
         subPackages: [
+            {
+                root: 'pagesHome',
+                pages: ['Product', 'Brand', 'ProductList', 'Authorized', 'FilterPage', 'Edit']
+            },
+            {
+                root: 'pagesImt',
+                pages: ['Index', 'ServiceDetail']
+            },
+            {
+                root: 'pagesMine',
+                pages: ['Collect', 'ReadRecords', 'Activity', 'ChatDetail']
+            },
             {
                 root: 'pagesProduct',
-                pages: ['Detail', 'Contrast']
+                pages: [
+                    'Detail',
+                    'Contrast',
+                    'FilterVendor',
+                    'FilterProduct',
+                    'ContrastDetail',
+                    'IntentionList',
+                    'Inquiry',
+                    'InquiryResult'
+                ]
             },
             {
                 root: 'pagesNews',
                 pages: ['Detail', 'News', 'Submit']
+            },
+            {
+                root: 'pagesVendor',
+                pages: ['Detail', 'Connect', 'FilterProduct']
             }
         ],
         tabBar: {
             color: '#878D99',
             selectedColor: '#0F264D',
+            borderStyle: 'white',
             list: [
                 {
                     pagePath: 'pages/Home',

+ 94 - 0
src/mixins/collection.js

@@ -0,0 +1,94 @@
+//收藏
+export default {
+    data() {
+        return {
+            //是否关注
+            isCollection: false,
+            collectId: 0,
+            collectionType: '',
+            cId: 0,
+            needCollect: true,
+            animate: false
+        };
+    },
+    watch: {
+        cId() {
+            if (
+                this.$store.state.userInfo &&
+                this.cId &&
+                this.collectionType &&
+                this.$store.state.userInfo.id &&
+                this.needCollect
+            ) {
+                this.checkCollection();
+            }
+        }
+    },
+    methods: {
+        // 关注店铺
+        collection() {
+            this.checkLogin()
+                .then(() => {
+                    this.animate = true;
+                    setTimeout(() => {
+                        this.animate = false;
+                    }, 1000);
+                    if (this.collectId) {
+                        return this.$http.post('/collect/del/' + this.collectId);
+                    } else {
+                        return this.$http.post(
+                            '/collect/save',
+                            {
+                                userId: this.$store.state.userInfo.id,
+                                cid: this.cId,
+                                type: this.collectionType,
+                                isCollect: true
+                            },
+                            {
+                                header: {
+                                    'Content-Type': 'application/json'
+                                }
+                            }
+                        );
+                    }
+                })
+                .then(res => {
+                    if (res) {
+                        this.collectId = res.id;
+                        this.isCollection = res.isCollect;
+                        this.toast('关注成功!', 'success');
+                    } else {
+                        this.collectId = 0;
+                        this.isCollection = false;
+                        this.toast('取消关注成功', 'success');
+                    }
+                });
+        },
+        checkCollection() {
+            this.$http
+                .post(
+                    '/collect/all',
+                    {
+                        query: {
+                            userId: this.$store.state.userInfo.id,
+                            cid: this.cId,
+                            type: this.collectionType,
+                            isCollection: true,
+                            del: false
+                        }
+                    },
+                    {
+                        header: {
+                            'Content-Type': 'application/json'
+                        }
+                    }
+                )
+                .then(res => {
+                    if (res.content.length > 0) {
+                        this.isCollection = res.content[0].isCollect;
+                        this.collectId = res.content[0].id;
+                    }
+                });
+        }
+    }
+};

+ 24 - 5
src/mixins/commont.js

@@ -33,13 +33,32 @@ export default {
                 return info[labels[1]] || info[labels[0]];
             }
         },
-        checkLogin() {
-            if (this.$store.state.userInfo) {
+        checkLogin(needAll) {
+            if (this.$store.state.userInfo && (this.$store.state.userInfo.chCompanyName || !needAll)) {
                 console.log('已登录');
                 return Promise.resolve(this.$store.state.userInfo);
+            } else if (this.$store.state.userInfo) {
+                wx.showModal({
+                    title: '提示',
+                    content: '需要补全资料方可使用此功能',
+                    confirmText: '立即补全',
+                    cancelText: '稍后再说',
+                    confirmColor: this.$colors.warn,
+                    cancelColor: '#BCC1CC',
+                    success(res) {
+                        if (res.confirm) {
+                            wx.navigateTo({
+                                url: '/pagesHome/Edit'
+                            });
+                        } else if (res.cancel) {
+                            console.log('用户点击取消');
+                        }
+                    }
+                });
+                return Promise.reject('信息不全');
             } else {
                 wx.navigateTo({
-                    url: '/pages/Authorized'
+                    url: '/pagesHome/Authorized'
                 });
                 return Promise.reject('未登录');
             }
@@ -53,9 +72,9 @@ export default {
             }
             return img;
         },
-        navigateTo(e, checkLogin = true) {
+        navigateTo(e, checkLogin = true, needAll = true) {
             if (checkLogin) {
-                this.checkLogin()
+                this.checkLogin(needAll)
                     .then(() => {
                         wx.navigateTo({
                             url: e

+ 2 - 1
src/mixins/searchList.js

@@ -170,6 +170,7 @@ export default {
         },
         refreash() {
             console.log('刷新');
+            this.list = [];
             this.page = 1;
             this.getData();
             wx.pageScrollTo({
@@ -183,7 +184,7 @@ export default {
                 return key + '=' + _query[key];
             });
 
-            this.navigateTo('/pages/FilterPage?' + querys.join('&'), false);
+            this.navigateTo('/pagesHome/FilterPage?' + querys.join('&'), false);
         },
         changeSort(value) {
             this.sort = value;

Разница между файлами не показана из-за своего большого размера
+ 0 - 0
src/native/cnchar.min.js


+ 53 - 4
src/pages/Chat.vue

@@ -1,17 +1,66 @@
 <config>
 {
 'navigationBarTitleText': '咨询消息',
-'disableScroll': true
+'disableScroll': false
 }
 </config>
 <template>
-    <div></div>
+    <div>
+        <member :info="systemInfo" type="system" />
+        <member :info="adminInfo" type="admin" />
+        <van-divider />
+        <block v-for="item in showList" :key="item.otherUserId">
+            <member :info="item"></member>
+        </block>
+    </div>
 </template>
 <script>
+import Member from '../components/Member.vue';
 export default {
+    components: { Member },
     data() {
-        return {};
+        return {
+            chatMemberlist: [],
+            systemInfo: {},
+            adminId: 0
+        };
     },
-    onShow() {}
+    computed: {
+        adminInfo() {
+            return (
+                [...this.chatMemberlist].find(item => {
+                    return item.otherUserId === this.adminId;
+                }) || { otherUserId: this.adminId }
+            );
+        },
+        showList() {
+            return [...this.chatMemberlist].filter(item => {
+                return item.otherUserId !== this.adminId;
+            });
+        }
+    },
+    onLoad() {
+        this.$http.post('/user/getAdmin').then(res => {
+            this.adminId = res;
+        });
+    },
+    methods: {
+        loginMethods() {
+            this.$http.get('/email/my').then(res => {
+                this.systemInfo = res || {};
+            });
+            this.$http.post('/message/my').then(res => {
+                this.chatMemberlist = res;
+            });
+        }
+    }
 };
 </script>
+<style lang="less">
+.van-divider {
+    --divider-margin: 0 0;
+    --divider-border-color: #f5f7fa;
+    height: 5px;
+    background-color: #f5f7fa;
+}
+</style>

+ 7 - 6
src/pages/Classify.vue

@@ -10,8 +10,7 @@
   "van-sidebar": "../native/vant/sidebar/index",
   "van-sidebar-item": "../native/vant/sidebar-item/index"
 },
-
-'disableScroll': false
+'disableScroll': true
 }
 </config>
 <template>
@@ -36,8 +35,8 @@
                     </div>
                 </van-sticky>
             </div>
-            <div class="right">
-                <div class="top" @click="navigateTo('/pages/ProductList?categoryIds=' + firstLevelId)">
+            <scroll-view style="height:calc(100vh - 71px)" :scroll-y="true" class="right">
+                <div class="top" @click="navigateTo('/pagesHome/ProductList?categoryIds=' + firstLevelId)">
                     <van-image
                         src="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/quanqiu_img_jixie.jpg"
                         fit="widthFix"
@@ -55,10 +54,12 @@
                     block
                     v-for="item in nowCategory.children"
                     :key="item.id"
-                    @click="navigateTo('/pages/ProductList?categoryIds=' + item.id)"
+                    @click="navigateTo('/pagesHome/ProductList?categoryIds=' + item.id)"
                     >{{ getName(item) }}</van-button
                 >
-            </div>
+
+                <div style="height:20px"></div>
+            </scroll-view>
         </div>
     </div>
 </template>

+ 0 - 75
src/pages/Collect.vue

@@ -1,75 +0,0 @@
-<config>
-{
-'navigationBarTitleText': '我的收藏',
-'backgroundColorTop': '#fff',
-'backgroundColor':'#F5F7FA'
-}
-</config>
-<template>
-    <div>
-        <van-sticky>
-            <div class="top">
-                <div class="tabs">
-                    <div class="tab" :class="{ active: type === item.key }" v-for="item in collectType" :key="item.key">
-                        {{ $t(item.name) }}
-                    </div>
-                </div>
-
-                <van-button size="small" :color="$colors.warn" plain>编辑</van-button>
-            </div>
-        </van-sticky>
-    </div>
-</template>
-<script>
-import { collectType } from '../utils/appState';
-export default {
-    data() {
-        return {
-            type: 'PRODUCT'
-        };
-    },
-    computed: {
-        collectType() {
-            return [...collectType].map(item => {
-                return {
-                    key: item[0],
-                    name: item[1]
-                };
-            });
-        }
-    },
-    onShow() {}
-};
-</script>
-
-<style lang="less">
-.top {
-    display: flex;
-    height: 44px;
-    background: #ffffff;
-    align-items: center;
-    justify-content: space-between;
-
-    .tabs {
-        display: flex;
-
-        font-size: 14px;
-        font-family: PingFangSC-Regular, PingFang SC;
-        font-weight: 400;
-        color: #292c33;
-        line-height: 24px;
-
-        .tab {
-            padding: 0 20px;
-        }
-    }
-
-    .van-button {
-        border-width: 0px;
-    }
-}
-
-page {
-    background-color: #f5f7fa;
-}
-</style>

+ 4 - 3
src/pages/Home.vue

@@ -1,6 +1,7 @@
 <config>
 {
 'backgroundColorTop': '#0F264D',
+'backgroundColorBottom': '#F5F7FA',
 'backgroundColor': '#fff',
 'navigationStyle':'custom',
 'navigationBarBackgroundColor':'#0F264D',
@@ -52,19 +53,19 @@
                     content-class="menu-info"
                     icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_zhanshang.png"
                     :text="$t('zhan-shang-zong-lan')"
-                    @click="navigateTo('/pages/Brand', false)"
+                    @click="navigateTo('/pagesHome/Brand', false)"
                 />
                 <van-grid-item
                     content-class="menu-info"
                     icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_quanqiu.png"
                     :text="$t('quan-qiu-chan-pin')"
-                    @click="navigateTo('/pages/Product', false)"
+                    @click="navigateTo('/pagesHome/Product', false)"
                 />
                 <van-grid-item
                     content-class="menu-info"
                     icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/home_icon_imt.png"
                     :text="$t('imt-ping-tai')"
-                    @click="navigateTo('/pages/imt/Index', false)"
+                    @click="navigateTo('/pagesImt/Index', false)"
                 />
                 <van-grid-item
                     content-class="menu-info"

+ 9 - 5
src/pages/My.vue

@@ -4,7 +4,7 @@
 'backgroundColor': '#fff',
 'navigationStyle':'custom',
 'backgroundTextStyle':'light',
-'navigationBarTextStyle':'white'
+'navigationBarTextStyle':'black'
 }
 </config>
 <template>
@@ -31,7 +31,7 @@
                     :color="$colors.warn"
                     :radius="4"
                     plain
-                    @click="navigateTo('/pages/Edit')"
+                    @click="navigateTo('/pagesHome/Edit', true, false)"
                     >编辑资料</van-button
                 >
             </div>
@@ -63,12 +63,13 @@
                 title="我的收藏"
                 icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect.png"
                 is-link
-                @click="navigateTo('/pages/Collect')"
+                @click="navigateTo('/pagesMine/Collect')"
             />
 
             <van-cell
                 custom-class="my-cell"
                 title="浏览记录"
+                @click="navigateTo('/pagesMine/ReadRecords')"
                 icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(2).png"
                 is-link
             />
@@ -76,6 +77,7 @@
             <van-cell
                 custom-class="my-cell"
                 title="我的活动"
+                @click="navigateTo('/pagesMine/Activity')"
                 icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(5).png"
                 is-link
             />
@@ -95,7 +97,7 @@
             />
         </van-cell-group>
 
-        <auth-phone ref="auth" :show.sync="showPhone"></auth-phone>
+        <auth-phone ref="auth" :info="wxInfo" :show.sync="showPhone"></auth-phone>
     </div>
 </template>
 
@@ -112,7 +114,8 @@ export default {
                 enName: 'English'
             },
             locale: 'zh',
-            showPhone: false
+            showPhone: false,
+            wxInfo: {}
         };
     },
     computed: {
@@ -149,6 +152,7 @@ export default {
         login(e) {
             console.log(e);
             if (e.detail.iv) {
+                this.wxInfo = e.detail.userInfo;
                 this.$http
                     .post('/user/getMaUserInfo', {
                         sessionKey: this.$store.state.sessionKey,

+ 0 - 149
src/pages/News.vue

@@ -1,149 +0,0 @@
-<config>
-{
-'navigationBarTitleText': '',
-'navigationStyle':'custom',
-'navigationBarTextStyle':'white',
-'backgroundColorTop': '#fff',
-'backgroundColorBottom': '#f5f7fa',
-'enablePullDownRefresh':false
-}
-</config>
-<template>
-    <div>
-        <custom-bar :ratio="ratio" :pre="0" :title="title" :barTop="140"></custom-bar>
-        <banner :banners="banners" fixed :height="140" :radius="0" :scrollTop="scrollTop"></banner>
-        <div class="main" id="main">
-            <van-sticky :offset-top="71" :z-index="100" :container="main">
-                <div class="tab-content">
-                    <van-tabs
-                        :active="hotActive"
-                        @change="changeTab($event.detail.index)"
-                        :ellipsis="false"
-                        :line-width="24"
-                        :line-height="2"
-                    >
-                        <van-tab :title="item.name" v-for="item in informations" :key="item.key"></van-tab>
-                    </van-tabs>
-                </div>
-            </van-sticky>
-
-            <sort-list :empty="empty" :loading="loading" :finish="finish" top="115px + 172rpx">
-                <div class="list">
-                    <template v-if="pageType === 'bigImg'">
-                        <block v-for="item in list" :key="item.id">
-                            <news-grid :info="item"></news-grid>
-                        </block>
-                    </template>
-                    <template v-if="pageType === 'default'">
-                        <block v-for="item in list" :key="item.id">
-                            <news-row :info="item"></news-row>
-                        </block>
-                    </template>
-                </div>
-            </sort-list>
-        </div>
-    </div>
-</template>
-<script>
-import Banner from '../components/Banner.vue';
-import CustomBar from '../components/bar/CustomBar.vue';
-import { getBanner } from '../utils/commont';
-import { InformationType } from '../utils/appState';
-import searchList from '../mixins/searchList';
-import SortList from '../components/SortList.vue';
-import NewsGrid from '../components/News/Grid.vue';
-import NewsRow from '../components/News/Row.vue';
-export default {
-    components: { Banner, CustomBar, SortList, NewsGrid, NewsRow },
-    data() {
-        return {
-            banners: [],
-            ratio: 0,
-            hotActive: 0,
-            main: null,
-            url: '/information/typeList',
-            httpType: 'get',
-            barTop: 0,
-            noPage: true,
-            scrollTop: 0
-        };
-    },
-    mixins: [searchList],
-    computed: {
-        informations() {
-            return [...InformationType].map(item => {
-                return {
-                    key: item[0],
-                    name: this.$t(item[1].name),
-                    type: item[1].type || 'default'
-                };
-            });
-        },
-        listQuery() {
-            return {
-                type: [...this.informations][this.hotActive].key
-            };
-        },
-        pageType() {
-            return [...this.informations][this.hotActive].type;
-        },
-        title() {
-            return this.$t([...this.informations][this.hotActive].name);
-        }
-    },
-    onLoad() {
-        this.changeTab(0, true);
-    },
-    methods: {
-        changeTab(index, first = false) {
-            this.hotActive = index;
-            getBanner([...this.informations][index].key).then(res => {
-                this.banners = res;
-            });
-
-            this.$nextTick(() => {
-                if (first) {
-                    this.getData();
-                } else {
-                    this.refreash();
-                }
-            });
-        }
-    },
-    onPageScroll() {},
-    onReady() {
-        this.main = wx.createSelectorQuery().select('#main');
-        this.main
-            .boundingClientRect(rect => {
-                this.searchTop = rect.top - 61;
-                this.barTop = rect.top - 71;
-            })
-            .exec();
-    }
-};
-</script>
-<style lang="less" scoped>
-.list {
-    padding: 16px;
-    .news + .news {
-        margin-top: 16px;
-    }
-}
-</style>
-<style lang="less">
-.tab-content {
-    .van-tabs__scroll {
-        .van-tab {
-            color: #292c33;
-            &.van-tab--active {
-                color: @warn;
-            }
-        }
-
-        .van-tabs__line {
-            bottom: 8px;
-            left: 7.5px;
-        }
-    }
-}
-</style>

+ 4 - 2
src/pages/Authorized.vue → src/pagesHome/Authorized.vue

@@ -23,7 +23,7 @@
             </div>
         </div>
 
-        <auth-phone :show.sync="showAuth"></auth-phone>
+        <auth-phone :info="wxInfo" :show.sync="showAuth"></auth-phone>
     </div>
 </template>
 <script>
@@ -31,7 +31,8 @@ import AuthPhone from '../components/AuthPhone';
 export default {
     data() {
         return {
-            showAuth: false
+            showAuth: false,
+            wxInfo: {}
         };
     },
     onShow() {},
@@ -41,6 +42,7 @@ export default {
     methods: {
         login(e) {
             if (e.detail.iv) {
+                this.wxInfo = e.detail.userInfo;
                 this.$http
                     .post('/user/getMaUserInfo', {
                         sessionKey: this.$store.state.sessionKey,

+ 0 - 0
src/pages/Brand.vue → src/pagesHome/Brand.vue


+ 40 - 0
src/pagesHome/ChatPage.vue

@@ -0,0 +1,40 @@
+<template>
+    <div>
+        19282
+        <member :info="systemInfo" type="system" />
+        <member :info="adminInfo" type="admin" />
+        <van-divider />
+        <block v-for="item in showList" :key="item.otherUserId">
+            <member :info="item"></member>
+        </block>
+    </div>
+</template>
+<script>
+import Member from '../components/Member.vue';
+export default {
+    components: { Member },
+    props: ['adminId', 'systemInfo', 'chatMemberlist'],
+    computed: {
+        adminInfo() {
+            return (
+                [...this.chatMemberlist].find(item => {
+                    return item.otherUserId === this.adminId;
+                }) || { otherUserId: this.adminId }
+            );
+        },
+        showList() {
+            return [...this.chatMemberlist].filter(item => {
+                return item.otherUserId !== this.adminId;
+            });
+        }
+    }
+};
+</script>
+<style lang="less">
+.van-divider {
+    --divider-margin: 0 0;
+    --divider-border-color: #f5f7fa;
+    height: 5px;
+    background-color: #f5f7fa;
+}
+</style>

+ 155 - 0
src/pagesHome/Edit.vue

@@ -0,0 +1,155 @@
+<config>
+{
+'navigationBarTitleText': '编辑资料'
+}
+</config>
+<template>
+    <div>
+        <van-cell-group>
+            <van-cell title="头像" is-link value-class="cellValue">
+                <van-image :src="myInfo.logo" :width="36" :height="36" fit="cover" :radius="4" />
+            </van-cell>
+            <van-cell title="昵称" is-link :value="myInfo.nickname" @click="change('nickname')" />
+            <van-cell
+                title="称呼"
+                @click="chooseSex"
+                is-link
+                :value="sex || '未选择'"
+                :value-class="sex ? '' : 'noValue'"
+            />
+            <van-cell
+                title="公司名称"
+                is-link
+                :value="myInfo.chCompanyName || '未填写'"
+                :value-class="myInfo.chCompanyName ? '' : 'noValue'"
+                @click="change('chCompanyName')"
+            />
+            <van-cell
+                title="职位"
+                is-link
+                :value="myInfo.userPosition || '未填写'"
+                :value-class="myInfo.userPosition ? '' : 'noValue'"
+                @click="change('userPosition')"
+            />
+            <!-- <van-cell title="地址" is-link :value="myInfo.nickname" />
+            <van-cell title="所属行业" is-link :value="myInfo.nickname" />
+            <van-cell title="感兴趣的产品" is-link :value="myInfo.nickname" />
+            <van-cell title="交流语言" is-link :value="myInfo.position" /> -->
+            <van-cell
+                title="邮箱"
+                :border="false"
+                is-link
+                :value="myInfo.userEmail || '未填写'"
+                :value-class="myInfo.userEmail ? '' : 'noValue'"
+                @click="change('userEmail')"
+            />
+        </van-cell-group>
+
+        <fixed-button>
+            <van-button :color="$colors.warn" block @click="save">保存</van-button>
+        </fixed-button>
+
+        <change-text :show.sync="show" v-model="changeValue" @input="changeSubmit"></change-text>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import ChangeText from '../components/ChangeText.vue';
+import FixedButton from '../components/FixedButton.vue';
+import { sexModels } from '../utils/appState';
+export default {
+    components: {
+        ChangeText,
+        FixedButton
+    },
+    data() {
+        return {
+            myInfo: {},
+            show: false,
+            changeValue: '',
+            changeKey: ''
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+        sex() {
+            if (this.myInfo.userSex && sexModels.has(this.myInfo.userSex)) {
+                return sexModels.get(this.myInfo.userSex).label;
+            } else {
+                return '';
+            }
+        }
+    },
+    methods: {
+        loginMethods() {
+            this.$store.dispatch('getUserInfo').then(res => {
+                res.logo = res.logo || this.userInfo.avatar;
+                this.myInfo = { ...res };
+            });
+        },
+        chooseSex() {
+            const _list = [...sexModels.values()].map(item => {
+                return item.label;
+            });
+            wx.showActionSheet({
+                itemList: _list,
+                success: res => {
+                    this.myInfo.userSex = [...sexModels.keys()][res.tapIndex];
+                },
+                fail: res => {
+                    console.log(res.errMsg);
+                }
+            });
+        },
+        changeSubmit(e) {
+            this.changeValue = e;
+            this.myInfo[this.changeKey] = e;
+        },
+        change(key) {
+            this.changeValue = this.myInfo[key];
+            this.changeKey = key;
+            this.show = true;
+        },
+        save() {
+            var form = { ...this.myInfo };
+
+            this.$http
+                .post('/buyersInfo/saveVO', form, {
+                    header: {
+                        'Content-Type': 'application/json'
+                    }
+                })
+                .then(res => {
+                    this.toast('保存成功', 'success');
+                    this.$store.dispatch('getUserInfo').then(() => {
+                        this.navigateBack();
+                    });
+                });
+        }
+    }
+};
+</script>
+<style lang="less">
+.van-cell-group {
+    --cell-vertical-padding: 17px;
+    --cell-line-height: 24px;
+    --cell-text-color: #000;
+    min-height: 70px;
+    align-items: center;
+
+    .cellValue {
+        display: flex;
+        justify-content: flex-end;
+    }
+
+    .van-cell__value {
+        flex-grow: 2;
+    }
+
+    .noValue {
+        --cell-value-color: @warn;
+    }
+
+    --cell-value-color: #000;
+}
+</style>

+ 2 - 1
src/pages/FilterPage.vue → src/pagesHome/FilterPage.vue

@@ -1,6 +1,7 @@
 <config>
 {
-'navigationBarTitleText': '筛选'
+'navigationBarTitleText': '筛选',
+'disableScroll': false
 }
 </config>
 <template>

+ 0 - 0
src/pages/Product.vue → src/pagesHome/Product.vue


+ 0 - 0
src/pages/ProductList.vue → src/pagesHome/ProductList.vue


+ 0 - 0
src/pages/imt/Advantage.vue → src/pagesImt/Advantage.vue


+ 0 - 0
src/pages/imt/Connect.vue → src/pagesImt/Connect.vue


+ 9 - 9
src/pages/imt/Index.vue → src/pagesImt/Index.vue

@@ -17,7 +17,7 @@
 
             <div class="main" id="main">
                 <div class="thirdbtn">
-                    <img src="../../static/imgs/imt_topbanner_icon_3d.png" alt="" />
+                    <img src="../static/imgs/imt_topbanner_icon_3d.png" alt="" />
                     <div class="text">
                         <h4>点击观看 IMT 3D展厅</h4>
                     </div>
@@ -41,19 +41,19 @@
                     <div class="introduce-img">
                         <div class="introduce-img-item">
                             <div class="img-box">
-                                <img src="../../static/imgs/imt_gaikuang_icon_01.png" alt="" />
+                                <img src="../static/imgs/imt_gaikuang_icon_01.png" alt="" />
                             </div>
                             <div class="text">高度集聚性</div>
                         </div>
                         <div class="introduce-img-item">
                             <div class="img-box">
-                                <img src="../../static/imgs/imt_gaikuang_icon_02.png" alt="" />
+                                <img src="../static/imgs/imt_gaikuang_icon_02.png" alt="" />
                             </div>
                             <div class="text">高精密产品/技术</div>
                         </div>
                         <div class="introduce-img-item">
                             <div class="img-box">
-                                <img src="../../static/imgs/imt_gaikuang_icon_03.png" alt="" />
+                                <img src="../static/imgs/imt_gaikuang_icon_03.png" alt="" />
                             </div>
                             <div class="text">高度专业化</div>
                         </div>
@@ -77,11 +77,11 @@
     </div>
 </template>
 <script>
-import Banner from '../../components/Banner';
-import CustomBar from '../../components/bar/CustomBar';
-import Title from '../../components/imt/Title';
-import Core from '../../components/imt/Core';
-import Bottom from '../../components/imt/Bottom';
+import Banner from '../components/Banner';
+import CustomBar from '../components/bar/CustomBar';
+import Title from '../components/imt/Title';
+import Core from '../components/imt/Core';
+import Bottom from '../components/imt/Bottom';
 import Advantage from './Advantage';
 import Service from './Service';
 import Connect from './Connect';

+ 2 - 2
src/pages/imt/Service.vue → src/pagesImt/Service.vue

@@ -4,7 +4,7 @@
             class="service-item"
             v-for="(item, index) in services"
             :key="index"
-            @click="navigateTo('/pages/imt/ServiceDetail?name=' + item.name, false)"
+            @click="navigateTo('/pagesImt/ServiceDetail?name=' + item.name, false)"
         >
             <van-icon :name="item.icon" :size="50" />
             <div class="servce-info">
@@ -15,7 +15,7 @@
     </div>
 </template>
 <script>
-import { services } from '../../utils/imtPageInfo';
+import { services } from '../utils/imtPageInfo';
 export default {
     computed: {
         services() {

+ 2 - 2
src/pages/imt/ServiceDetail.vue → src/pagesImt/ServiceDetail.vue

@@ -40,8 +40,8 @@
     </div>
 </template>
 <script>
-import { services } from '../../utils/imtPageInfo';
-import Banner from '../../components/Banner';
+import { services } from '../utils/imtPageInfo';
+import Banner from '../components/Banner';
 export default {
     data() {
         return {

+ 74 - 0
src/pagesMine/Activity.vue

@@ -0,0 +1,74 @@
+<config>
+{
+'navigationBarTitleText': '浏览记录'
+}
+</config>
+<template>
+    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px">
+        <div class="list">
+            <block v-for="item in list" :key="item.id">
+                <news-grid :info="item" userActivity></news-grid>
+            </block>
+        </div>
+    </sort-list>
+</template>
+<script>
+import SortList from '../components/SortList.vue';
+import searchList from '../mixins/searchList';
+import { mapState } from 'vuex';
+import NewsGrid from '../components/News/Grid.vue';
+export default {
+    components: { SortList, NewsGrid },
+    data() {
+        return {
+            url: '/eventRegistration/all',
+            formType: { body: 'json' },
+            isEnd: '0'
+        };
+    },
+    computed: {
+        ...mapState(['userInfo']),
+        listQuery() {
+            return {
+                query: { userId: this.userInfo.id }
+            };
+        },
+        showList() {
+            return [...this.list].filter(item => {
+                if (Number(this.isEnd)) {
+                    return item.information.isEnd;
+                } else {
+                    return !item.information.isEnd;
+                }
+            });
+        },
+        showListEmpty() {
+            if (this.empty) {
+                return true;
+            } else if (!this.loading && this.showList.length == 0) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    },
+    mixins: [searchList],
+    mounted() {
+        this.getData();
+    },
+    onReachBottom() {
+        if (!this.loading && !this.finish) {
+            this.page++;
+            this.getData();
+        }
+    }
+};
+</script>
+<style lang="less">
+.list {
+    padding: 16px;
+    .news + .news {
+        margin-top: 16px;
+    }
+}
+</style>

+ 181 - 0
src/pagesMine/ChatDetail.vue

@@ -0,0 +1,181 @@
+<config>
+{
+'navigationBarTitleText': '',
+'disableScroll': true
+}
+</config>
+<template>
+    <div class="page">
+        <scroll-view
+            :scroll-top="scrollTop"
+            :style="{ height: height }"
+            :scroll-y="true"
+            class="scrollView"
+            @scrolltoupper="upper"
+        >
+            <div class="chat-list" id="chatList">
+                <block v-for="(item, index) in list" :key="index">
+                    <chat-info :info="item"></chat-info>
+                </block>
+            </div>
+        </scroll-view>
+        <div class="input" v-if="!noBack">
+            <input
+                class="weui-input"
+                @input="value = $event.detail.value"
+                :value="value"
+                placeholder="请输入需要咨询的问题"
+                confirm-type="send"
+                @confirm="confirm"
+            />
+            <van-icon name="plus" color="#0F264D" :size="20" />
+        </div>
+    </div>
+</template>
+<script>
+import ChatInfo from '../components/ChatInfo.vue';
+export default {
+    components: { ChatInfo },
+    data() {
+        return {
+            scrollTop: 0,
+            type: '',
+            list: [],
+            toUserId: 0,
+            value: ''
+        };
+    },
+    computed: {
+        otherInfo() {
+            if (this.type === 'system') {
+                return {
+                    img: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/xiaoxi_icon_xitong.png',
+                    name: '系统消息'
+                };
+            } else if (this.type === 'admin') {
+                return {
+                    img: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/xiaoxi_icon_fuwuguanjia.png',
+                    name: '服务管家'
+                };
+            } else {
+                return {
+                    img: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/xiaoxi_icon_xitong.png',
+                    name: '系统消息'
+                };
+            }
+        },
+        noBack() {
+            if (this.type === 'system') {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        height() {
+            if (this.noBack) {
+                return '100vh';
+            } else {
+                return 'calc(100vh - 120rpx)';
+            }
+        }
+    },
+    onLoad(options) {
+        if (options.type === 'system') {
+            wx.setNavigationBarTitle({
+                title: '系统消息'
+            });
+            this.$http.get('/email/details').then(res => {
+                this.list = res;
+            });
+        } else if (options.type === 'admin') {
+            wx.setNavigationBarTitle({
+                title: '咨询管家'
+            });
+        }
+
+        if (options.toUserId) {
+            this.toUserId = Number(options.toUserId);
+            this.getDetail();
+        }
+
+        if (options.type) {
+            this.type = options.type;
+        }
+    },
+    methods: {
+        upper() {},
+        getDetail() {
+            this.$loading('加载中');
+            this.$http
+                .post('/message/details', {
+                    otherUserId: this.toUserId
+                })
+                .then(res => {
+                    console.log(res);
+                    this.list = res;
+
+                    this.$nextTick(() => {
+                        setTimeout(() => {
+                            this.$loading.close();
+                            wx.createSelectorQuery()
+                                .select('#chatList')
+                                .boundingClientRect(rect => {
+                                    this.scrollTop = rect.height;
+                                })
+                                .exec();
+                        }, 500);
+                    });
+                });
+        },
+        confirm() {
+            this.send(this.value);
+            this.value = '';
+        },
+        send(content) {
+            this.$http
+                .post(
+                    '/message/save',
+                    {
+                        sendUserId: this.$store.state.userInfo.id,
+                        receiveUserId: this.toUserId,
+                        content: content
+                    },
+                    {
+                        header: {
+                            'Content-Type': 'application/json'
+                        }
+                    }
+                )
+                .then(res => {
+                    this.getDetail();
+                })
+                .catch(e => {
+                    this.toast(e.error);
+                });
+        }
+    }
+};
+</script>
+<style lang="less">
+.scrollView {
+    background: #f2f3f5;
+}
+
+.input {
+    padding: 8px 16px;
+    display: flex;
+    align-items: center;
+    flex-shrink: 0;
+    .weui-input {
+        height: 44px;
+        background: #f5f7fa;
+        padding: 0 12px;
+        margin-right: 10px;
+        font-size: 16px;
+        color: #000000;
+        line-height: 26px;
+        flex-grow: 1;
+        border-radius: 100px;
+    }
+}
+</style>

+ 150 - 0
src/pagesMine/Collect.vue

@@ -0,0 +1,150 @@
+<config>
+{
+'navigationBarTitleText': '我的收藏',
+'backgroundColorTop': '#fff',
+'backgroundColor':'#F5F7FA'
+}
+</config>
+<template>
+    <div>
+        <van-sticky>
+            <div class="top">
+                <div class="tabs">
+                    <div
+                        class="tab"
+                        @click="chooseTab(item.key)"
+                        :class="{ active: type === item.key }"
+                        v-for="item in collectType"
+                        :key="item.key"
+                    >
+                        {{ $t(item.name) }}
+                    </div>
+                </div>
+
+                <van-button size="small" :color="$colors.warn" plain>编辑</van-button>
+            </div>
+        </van-sticky>
+        <sort-list :empty="empty" :loading="loading" :finish="finish" top="88rpx">
+            <div class="product-list" v-if="type === 'PRODUCT'">
+                <product-row v-for="item in list" :info="item" :key="item.id"></product-row>
+            </div>
+            <div class="product-list" v-else>
+                <vendor-row v-for="item in list" :info="item" :key="item.id"></vendor-row>
+            </div>
+        </sort-list>
+    </div>
+</template>
+<script>
+import { collectType } from '../utils/appState';
+import searchList from '../mixins/searchList';
+import SortList from '../components/SortList.vue';
+import ProductRow from '../components/product/RowNormal.vue';
+import VendorRow from '../components/vendor/Row.vue';
+export default {
+    components: { SortList, ProductRow, VendorRow },
+    data() {
+        return {
+            url: '/collect/my',
+            httpType: 'get',
+            type: 'PRODUCT'
+        };
+    },
+    mixins: [searchList],
+    computed: {
+        collectType() {
+            return [...collectType].map(item => {
+                return {
+                    key: item[0],
+                    name: item[1]
+                };
+            });
+        },
+        listQuery() {
+            return {
+                type: this.type,
+                isCollect: true,
+                del: false
+            };
+        },
+        typeName() {
+            return collectType.get(this.type);
+        }
+    },
+    onLoad() {
+        this.getData();
+    },
+    methods: {
+        chooseTab(type) {
+            if (type !== this.type) {
+                this.type = type;
+                this.refreash();
+            }
+        }
+    },
+    onReachBottom() {
+        if (!this.loading && !this.finish) {
+            this.page++;
+            this.getData();
+        }
+    }
+};
+</script>
+
+<style lang="less">
+.top {
+    display: flex;
+    height: 44px;
+    background: #ffffff;
+    align-items: center;
+    justify-content: space-between;
+
+    .tabs {
+        display: flex;
+
+        font-size: 14px;
+        font-family: PingFangSC-Regular, PingFang SC;
+        font-weight: 400;
+        color: #292c33;
+        line-height: 24px;
+
+        .tab {
+            padding: 0 20px;
+            position: relative;
+
+            &.active {
+                color: @warn;
+                &::after {
+                    content: '';
+                    width: 24px;
+                    height: 2px;
+                    background-color: @warn;
+                    position: absolute;
+                    left: 50%;
+                    bottom: -4px;
+                    transform: translateX(-50%);
+                }
+            }
+        }
+    }
+
+    .van-button {
+        border-width: 0px;
+    }
+}
+
+page {
+    background-color: #f5f7fa;
+}
+
+.product-list {
+    padding: 16px;
+
+    .product + .product {
+        margin-top: 12px;
+    }
+
+    .vendor + .vendor {
+        margin-top: 12px;
+    }
+}
+</style>

+ 61 - 0
src/pagesMine/ReadRecords.vue

@@ -0,0 +1,61 @@
+<config>
+{
+'navigationBarTitleText': '浏览记录'
+}
+</config>
+<template>
+    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px">
+        <div class="product-list">
+            <div class="clo-2" v-for="item in list" :key="item.id">
+                <product-grid :info="item"></product-grid>
+            </div>
+        </div>
+    </sort-list>
+</template>
+<script>
+import SortList from '../components/SortList.vue';
+import searchList from '../mixins/searchList';
+import ProductGrid from '../components/product/GridNormal.vue';
+export default {
+    components: { SortList, ProductGrid },
+    data() {
+        return {
+            url: '/collect/my',
+            httpType: 'get',
+            type: 'PRODUCT',
+            chooseList: [],
+            isEdit: false
+        };
+    },
+    computed: {
+        listQuery() {
+            return {
+                type: this.type,
+                isCollect: false
+            };
+        }
+    },
+    mixins: [searchList],
+    mounted() {
+        this.getData();
+    },
+    onReachBottom() {
+        if (!this.loading && !this.finish) {
+            this.page++;
+            this.getData();
+        }
+    }
+};
+</script>
+<style lang="less">
+.product-list {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 0 10px;
+    .clo-2 {
+        width: 50%;
+        padding: 6px;
+        box-sizing: border-box;
+    }
+}
+</style>

+ 55 - 28
src/pagesProduct/Contrast.vue

@@ -37,15 +37,16 @@
 
         <van-empty description="暂无对比商品" v-else />
 
-        <div class="contrast-content" v-if="list.length > 0">
+        <div class="contrast-content" v-if="showList.length > 0">
             <div class="title">同类别推荐</div>
             <div class="product-list">
                 <product-row
                     :checked="[...addList].includes(item.id)"
-                    v-for="item in list"
+                    v-for="item in showList"
                     :key="item.id"
                     :info="item"
-                    @choose="choose"
+                    @choose="chooseAdd"
+                    :hasDel="false"
                 ></product-row>
             </div>
         </div>
@@ -58,15 +59,28 @@
                 </div>
             </div>
         </van-dialog>
+
+        <fixed-button :btnList="true">
+            <van-button
+                block
+                :radius="4"
+                @click="navigateTo('/pagesProduct/FilterVendor?categoryIds=' + (category.id || ''))"
+                >添加产品</van-button
+            >
+            <van-button block :color="$colors.warn" :radius="4" :disabled="chooseIds.length < 2"
+                >开始对比({{ chooseIds.length }})</van-button
+            >
+        </fixed-button>
     </div>
 </template>
 <script>
+import FixedButton from '../components/FixedButton.vue';
 import ProductRow from '../components/product/RowMini.vue';
+import { mapState } from 'vuex';
 export default {
     data() {
         return {
             productId: '',
-            contrastInfo: {},
             chooseIds: [],
             list: [],
             addList: []
@@ -79,11 +93,21 @@ export default {
         }
     },
     computed: {
+        ...mapState(['contrastInfo']),
         contrastList() {
             return this.contrastInfo.product || [];
         },
         category() {
             return this.contrastInfo.category || {};
+        },
+        showList() {
+            const list = [...this.list];
+            const contrastList = [...this.contrastList];
+            return list.filter(item => {
+                return !contrastList.find(child => {
+                    return child.id === item.id;
+                });
+            });
         }
     },
     watch: {
@@ -98,15 +122,10 @@ export default {
     methods: {
         loginMethods() {
             this.chooseIds = [this.productId];
-            this.getContrastInfo()
+            this.$store
+                .dispatch('getContrastInfo')
                 .then(() => {
-                    return this.$http.post('/intentionList/add', {
-                        productId: this.productId,
-                        type: 'PRODUCT_COMPARISON'
-                    });
-                })
-                .then(() => {
-                    this.getContrastInfo();
+                    return this.addContrast(this.productId);
                 })
                 .catch(res => {
                     if (res.error === '已添加') {
@@ -117,21 +136,24 @@ export default {
                                 return this.clearAllContrast();
                             })
                             .then(() => {
-                                return this.$http.post('/intentionList/add', {
-                                    productId: this.productId,
-                                    type: 'PRODUCT_COMPARISON'
-                                });
-                            })
-                            .then(() => {
-                                this.getContrastInfo();
+                                return this.addContrast(this.productId);
                             })
                             .catch(e => {
-                                console.log('取消');
                                 this.chooseIds = [];
                             });
                     }
                 });
         },
+        addContrast(productId) {
+            return this.$http
+                .post('/intentionList/add', {
+                    productId: productId,
+                    type: 'PRODUCT_COMPARISON'
+                })
+                .then(() => {
+                    this.$store.dispatch('getContrastInfo');
+                });
+        },
         clearAllContrast() {
             return this.$http.post('/intentionList/delAll', {
                 type: 'PRODUCT_COMPARISON'
@@ -146,15 +168,13 @@ export default {
                     });
                 })
                 .then(() => {
+                    if (this.chooseIds.includes(id)) {
+                        this.choose(id);
+                    }
                     this.toast('删除成功!', 'success');
-                    this.getContrastInfo();
+                    this.$store.dispatch('getContrastInfo');
                 });
         },
-        getContrastInfo() {
-            return this.$http.get('/intentionList/myCompared').then(res => {
-                this.contrastInfo = res || {};
-            });
-        },
         choose(id) {
             console.log(id);
             const chooseIds = [...this.chooseIds];
@@ -173,10 +193,17 @@ export default {
                 .then(res => {
                     this.list = res;
                 });
+        },
+        chooseAdd(id) {
+            this.addContrast(id).then(() => {
+                this.chooseIds.push(id);
+                this.$store.dispatch('getContrastInfo');
+            });
         }
     },
     components: {
-        ProductRow
+        ProductRow,
+        FixedButton
     }
 };
 </script>
@@ -241,7 +268,7 @@ export default {
         &::after {
             content: '';
             position: absolute;
-            bottom: 0;
+            top: 0;
             left: 28px;
             right: 0px;
             height: 1px;

+ 27 - 0
src/pagesProduct/ContrastDetail.vue

@@ -0,0 +1,27 @@
+<config>
+{
+'navigationBarTitleText': '产品对比'
+}
+</config>
+<template>
+    <div></div>
+</template>
+<script>
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {};
+    },
+    computed: {
+        ...mapState(['contrastInfo']),
+        contrastList() {
+            return this.contrastInfo.product || [];
+        }
+    },
+    methods: {
+        loginMethods() {
+            this.$store.dispatch('getContrastInfo');
+        }
+    }
+};
+</script>

+ 30 - 11
src/pagesProduct/Detail.vue

@@ -9,7 +9,7 @@
 <template>
     <div>
         <custom-bar title="产品详情" :pre="0" :dark="false" :barTop="375"></custom-bar>
-        <banner :banners="banners" :height="375" :radius="0"></banner>
+        <banner :banners="banners" :height="375" :radius="0" :autoplay="false"></banner>
         <div class="main" id="main">
             <div class="info">
                 <div class="ad">
@@ -25,10 +25,11 @@
 
                     <div class="btn">
                         <van-icon
-                            custom-class="my-icon"
-                            name="icon-icon_collect"
+                            @click="collection"
+                            :custom-class="animate ? 'my-icon iconAnimate' : 'my-icon'"
+                            :name="isCollection ? 'icon-aixin' : 'icon-icon_collect'"
                             :size="32"
-                            color="#BCC1CC"
+                            :color="isCollection ? $colors.warn : '#BCC1CC'"
                             class-prefix="iconfont"
                         />
                         <van-icon
@@ -57,7 +58,7 @@
                 </van-cell-group>
             </div>
 
-            <div class="vendor">
+            <div class="vendor" @click="navigateTo('/pagesVendor/Detail?id=' + vendorInfo.id)">
                 <van-icon :name="vendorInfo.logo" :size="60" />
                 <div class="vendor-info">
                     <h3>{{ getName(vendorInfo, ['chCompanyName', 'enCompanyName']) }}</h3>
@@ -98,7 +99,7 @@
                         <van-icon name="icon-xiangqingye_iocn_vs" :size="24" class-prefix="iconfont" />
                         <div class="text">对比</div>
                     </div>
-                    <div class="btn-icon">
+                    <div class="btn-icon" @click="navigateTo('/pagesProduct/IntentionList')">
                         <van-icon
                             name="icon-xiangqingye_iocn_yixiangdan"
                             :info="intentionList.length > 0 ? intentionList.length : ''"
@@ -116,7 +117,9 @@
                             @click="addIntentionList"
                             >{{ isIntented ? '已添加' : '添加意向单' }}</van-button
                         >
-                        <van-button :color="$colors.warn" type="primary" :radius="0">询价</van-button>
+                        <van-button :color="$colors.warn" @click="goConnect" type="primary" :radius="0"
+                            >询价</van-button
+                        >
                     </div>
                 </div>
             </div>
@@ -125,6 +128,7 @@
 </template>
 <script>
 import Banner from '../components/Banner.vue';
+import collection from '../mixins/collection';
 import CustomBar from '../components/bar/CustomBar.vue';
 import Parameter from '../components/product/Parameter.vue';
 import { mapState } from 'vuex';
@@ -136,16 +140,18 @@ export default {
             productInfo: {},
             vendorInfo: {},
             hotActive: 0,
-            detailTop: 0
+            detailTop: 0,
+            collectionType: 'PRODUCT'
         };
     },
+    mixins: [collection],
     computed: {
         ...mapState(['intentionList']),
         banners() {
             if (this.productInfo.img) {
-                return this.productInfo.img.split(',').map(item => {
+                return this.productInfo.img.split(',').map((item, index) => {
                     return {
-                        img: item + '?x-oss-process=image/resize,m_fill,h_750,w_750'
+                        img: item
                     };
                 });
             }
@@ -176,7 +182,8 @@ export default {
         detailImg() {
             let detail = this.productInfo.detailImg || '';
             if (detail) {
-                detail = detail.replace(/<img/g, `<img class='detaiImg' `);
+                // detail = detail.replace(/<img/g, `<img class='detaiImg' `);
+                detail = detail.replace(/<video/g, `<video style='width:345px;height:180px' `);
             }
             return detail;
         },
@@ -248,6 +255,7 @@ export default {
         },
         loginMethods() {
             this.$store.dispatch('getIntentionList');
+            this.cId = this.$mp.options.id;
         },
         addIntentionList() {
             if (this.isIntented) {
@@ -270,6 +278,11 @@ export default {
                         this.toast(e.error);
                     }
                 });
+        },
+        goConnect() {
+            this.$store.commit('updateChooseList', [this.productInfo]);
+            console.log(this.$store.state.chooseList);
+            this.navigateTo('/pagesVendor/Connect?productId=' + this.productId);
         }
     }
 };
@@ -389,6 +402,12 @@ export default {
 }
 
 .detaiImg {
+    width: 100%;
+    height: 180px;
+    margin: 0 0px;
+}
+
+.blockImg {
     max-width: 100%;
     height: auto;
     display: block;

+ 134 - 0
src/pagesProduct/FilterProduct.vue

@@ -0,0 +1,134 @@
+<template>
+    <div>
+        <van-sticky v-if="category" :z-index="200" :offset-top="0">
+            <div class="top">
+                <van-button :color="$colors.warn" plain block>{{ getName(category) }}</van-button>
+            </div>
+        </van-sticky>
+
+        <div class="product-list" v-if="showList.length > 0">
+            <product-row
+                v-for="item in showList"
+                :key="item.id"
+                :info="item"
+                @choose="addContrast"
+                :hasDel="false"
+                :hasCheck="false"
+            ></product-row>
+        </div>
+        <van-empty v-else description="商品已在对比列表中或无商品" />
+    </div>
+</template>
+<script>
+import ProductRow from '../components/product/RowMini.vue';
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {
+            categoryIds: '',
+            vendorId: '',
+            list: [],
+            category: {}
+        };
+    },
+    onLoad(options) {
+        if (options.categoryIds) {
+            this.categoryIds = options.categoryIds;
+            this.vendorId = options.vendorId;
+            wx.setNavigationBarTitle({
+                title: options.vendorName
+            });
+            this.$http.get('/productCategory/get/' + options.categoryIds).then(res => {
+                this.category = res;
+            });
+        }
+        this.getList();
+    },
+    computed: {
+        ...mapState(['contrastInfo']),
+        contrastList() {
+            return this.contrastInfo.product || [];
+        },
+        showList() {
+            const list = [...this.list];
+            const contrastList = [...this.contrastList];
+            return list.filter(item => {
+                return !contrastList.find(child => {
+                    return child.id === item.id;
+                });
+            });
+        }
+    },
+    methods: {
+        getList() {
+            this.$http
+                .post(
+                    '/product/all',
+                    {
+                        query: {
+                            productCategoryId: this.categoryIds,
+                            vendorInfoId: this.vendorId
+                        }
+                    },
+                    {
+                        header: {
+                            'Content-Type': 'application/json'
+                        }
+                    }
+                )
+                .then(res => {
+                    this.list = res.content;
+                });
+        },
+        addContrast(productId) {
+            return this.$http
+                .post('/intentionList/add', {
+                    productId: productId,
+                    type: 'PRODUCT_COMPARISON'
+                })
+                .then(() => {
+                    this.$store.dispatch('getContrastInfo');
+                    const pages = getCurrentPages();
+                    pages[pages.length - 3].rootVM.choose(productId);
+                    wx.navigateBack({
+                        delta: 2
+                    });
+                })
+                .catch(e => {
+                    this.toast(e.error);
+                });
+        }
+    },
+    components: {
+        ProductRow
+    }
+};
+</script>
+<style lang="less">
+.top {
+    padding: 10px 16px 12px;
+    --button-plain-background-color: #ffa52612;
+    --button-border-width: 0px;
+    z-index: 20;
+    background-color: #fff;
+    --button-default-height: 40px;
+}
+.product-list {
+    .product {
+        padding: 16px;
+        position: relative;
+    }
+
+    .product + .product {
+        &::after {
+            content: '';
+            position: absolute;
+            top: 0;
+            left: 28px;
+            right: 0px;
+            height: 1px;
+            background: #f5f7fa;
+        }
+    }
+}
+</style>

+ 134 - 0
src/pagesProduct/FilterVendor.vue

@@ -0,0 +1,134 @@
+<config>
+{
+'navigationBarTitleText': '展商',
+"usingComponents": {
+  "van-index-bar": "/native/vant/index-bar/index",
+  "van-index-anchor": "/native/vant/index-anchor/index"
+}
+}
+</config>
+<template>
+    <div>
+        <div class="header">
+            <van-sticky v-if="category" :z-index="200" :offset-top="0">
+                <div class="top">
+                    <van-button :color="$colors.warn" plain block>{{ getName(category) }}</van-button>
+                </div>
+            </van-sticky>
+        </div>
+
+        <div class="main">
+            <van-index-bar :index-list="indexList" :sticky-offset-top="62" :highlight-color="$colors.warn">
+                <block v-for="(item, index) in dataList" :key="index">
+                    <van-index-anchor :index="item[0]"></van-index-anchor>
+                    <van-cell
+                        :icon="prod.logo"
+                        :title="prod.name"
+                        :border="false"
+                        v-for="prod in item[1]"
+                        :key="prod.id"
+                        clickable
+                        :url="
+                            '/pagesProduct/FilterProduct?vendorId=' +
+                                prod.id +
+                                '&categoryIds=' +
+                                categoryIds +
+                                '&vendorName=' +
+                                prod.name
+                        "
+                    />
+                </block>
+            </van-index-bar>
+        </div>
+    </div>
+</template>
+<script>
+import cnchar from '../native/cnchar.min.js';
+export default {
+    data() {
+        return {
+            category: null,
+            categoryIds: '',
+            list: []
+        };
+    },
+    computed: {
+        nameList() {
+            return [...this.list].map(item => {
+                return item.name[0];
+            });
+        },
+        indexList() {
+            return [
+                ...new Set(
+                    [...this.nameList].map(item => {
+                        return item.spell('first', 'up');
+                    })
+                )
+            ];
+        },
+        dataList() {
+            const list = [...this.list];
+            return [...this.indexList].map(item => {
+                return [
+                    item,
+                    list.filter(child => {
+                        return child.name[0].spell('first', 'up') === item;
+                    })
+                ];
+            });
+        }
+    },
+    onLoad(options) {
+        if (options.categoryIds) {
+            this.categoryIds = options.categoryIds;
+            this.$http.get('/productCategory/get/' + options.categoryIds).then(res => {
+                this.category = res;
+            });
+        }
+        this.getList();
+    },
+    methods: {
+        getList() {
+            this.$http.get('/vendorInfo/allList').then(res => {
+                this.list = res
+                    .map(item => {
+                        return { ...item, name: this.getName(item, ['chCompanyName', 'enCompanyName']) };
+                    })
+                    .sort((a, b) => {
+                        return cnchar.compareSpell(a.name[0], b.name[0]) === 'more' ? 1 : -1;
+                    });
+            });
+        }
+    }
+};
+</script>
+<style lang="less">
+.top {
+    padding: 10px 16px 12px;
+    --button-plain-background-color: #ffa52612;
+    --button-border-width: 0px;
+    z-index: 20;
+    background-color: #fff;
+    --button-default-height: 40px;
+}
+.header {
+    position: relative;
+    z-index: 2;
+}
+.main {
+    position: relative;
+    z-index: 1;
+    --cell-icon-size: 60px;
+    --cell-line-height: 60px;
+    --cell-text-color: #292c33;
+    --cell-vertical-padding: 6px;
+    --index-anchor-active-background-color: #f5f7fa;
+    --index-anchor-background-color: #f5f7fa;
+    --index-anchor-text-color: #878d99;
+    --index-anchor-line-height: 24px;
+    .van-cell__left-icon-wrap {
+        margin-right: 12px;
+    }
+}
+</style>

+ 227 - 0
src/pagesProduct/Inquiry.vue

@@ -0,0 +1,227 @@
+<config>
+{
+'navigationBarTitleText': '询价',
+}
+</config>
+<template>
+    <div class="Inquiry">
+        <h2>询价产品</h2>
+        <div class="product-list" v-if="showList.length > 0">
+            <product-row
+                v-for="item in showList"
+                :key="item.id"
+                :info="item"
+                :hasDel="false"
+                :hasCheck="false"
+            ></product-row>
+
+            <div class="limit" v-if="hasLimit" @click="isLimit = false">
+                <span>展开全部{{ idList.length }}个产品</span>
+                <van-icon color="#BCC1CC" :size="20" name="arrow-down" />
+            </div>
+        </div>
+        <van-empty description="什么都没有哦" v-else />
+        <van-divider />
+        <div class="form">
+            <h2>计划加工</h2>
+            <textarea
+                class="textarea"
+                @input="artifact = $event.detail.value"
+                auto-height
+                placeholder="请输入计划加工的工件名称"
+                placeholder-class="pla-textarea"
+            />
+        </div>
+        <div class="form">
+            <h2>需求描述</h2>
+            <textarea
+                class="textarea"
+                @input="otherProblems = $event.detail.value"
+                auto-height
+                placeholder="请简要描述您的问题需求,100字以内"
+                placeholder-class="pla-textarea"
+            />
+        </div>
+
+        <fixed-button>
+            <van-button block :color="$colors.warn" :radius="4" :disabled="!canNext" @click="submit"
+                >提交询价</van-button
+            >
+        </fixed-button>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import FixedButton from '../components/FixedButton.vue';
+import ProductRow from '../components/product/RowMini.vue';
+export default {
+    data() {
+        return {
+            isBranch: false,
+            idList: [],
+            isLimit: true,
+            artifact: '',
+            otherProblems: ''
+        };
+    },
+    computed: {
+        ...mapState(['intentionList', 'userInfo']),
+        allList() {
+            const list = [...this.intentionList];
+            return list.filter(item => {
+                return this.idList.includes(item.id.toString());
+            });
+        },
+        showList() {
+            const list = [...this.allList];
+            if (this.isLimit) {
+                return list.slice(0, 3);
+            } else {
+                return list;
+            }
+        },
+        hasLimit() {
+            return this.isLimit && this.idList.length > 3;
+        },
+        canNext() {
+            if (this.artifact && this.otherProblems) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        submitForm() {
+            const list = [...this.allList];
+            const _backList = [
+                ...new Set(
+                    list.map(item => {
+                        return item.vendorInfoId;
+                    })
+                )
+            ];
+            const form = _backList.map(item => {
+                return {
+                    vendorInfoId: item,
+                    userId: this.userInfo.id,
+                    offlineExperience: false,
+                    productIds: list
+                        .filter(child => {
+                            return child.vendorInfoId === item;
+                        })
+                        .map(child => {
+                            return child.id;
+                        }),
+                    artifact: this.artifact,
+                    otherProblems: this.otherProblems
+                };
+            });
+
+            return JSON.stringify(form);
+        }
+    },
+    onLoad(options) {
+        if (options.chooseIds) {
+            this.isBranch = true;
+            this.idList = options.chooseIds.split(',');
+            console.log(this.idList);
+        }
+    },
+    methods: {
+        loginMethods() {
+            if (this.intentionList.length === 0 && this.isBranch) {
+                this.$store.dispatch('getIntentionList');
+            }
+        },
+        submit() {
+            if (!this.artifact) {
+                this.toast('请输入计划加工的工件');
+                return;
+            }
+            if (!this.otherProblems) {
+                this.toast('请输入问题需求');
+                return;
+            }
+
+            this.save(this.submitForm);
+        },
+        save(formData) {
+            this.$http
+                .post('/advisoryForm/create', {
+                    form: formData
+                })
+                .then(res => {
+                    wx.redirectTo({
+                        url: '/pagesProduct/InquiryResult'
+                    });
+                })
+                .catch(e => {
+                    this.$toast(e.error);
+                });
+        }
+    },
+    components: {
+        ProductRow,
+        FixedButton
+    }
+};
+</script>
+<style lang="less">
+h2 {
+    font-size: 18px;
+    line-height: 25px;
+    padding: 16px 16px 0;
+}
+.product-list {
+    // padding: 16px 0;
+    .product {
+        padding: 16px;
+        position: relative;
+    }
+
+    .product + .product {
+        &::after {
+            content: '';
+            position: absolute;
+            top: 0;
+            left: 28px;
+            right: 0px;
+            height: 1px;
+            background: #f5f7fa;
+        }
+    }
+}
+.Inquiry {
+    --divider-margin: 0 16px 30px;
+}
+.limit {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    color: #bcc1cc;
+    line-height: 22px;
+    padding-bottom: 36px;
+}
+.form {
+    padding: 0px 0 20px;
+    .textarea {
+        margin: 16px 16px 0;
+        background: #f5f7fa;
+        border-radius: 4px;
+        min-height: 100px;
+        width: calc(100% - 32px);
+        display: block;
+        padding: 12px;
+        box-sizing: border-box;
+        font-size: 14px;
+        line-height: 22px;
+        color: #000;
+    }
+
+    .pla-textarea {
+        color: #bcc1cc;
+        font-size: 14px;
+        line-height: 22px;
+    }
+}
+</style>

+ 69 - 0
src/pagesProduct/InquiryResult.vue

@@ -0,0 +1,69 @@
+<config>
+{
+'navigationBarTitleText': '',
+'disableScroll': true
+}
+</config>
+<template>
+    <div class="container">
+        <div class="top">
+            <van-icon name="checked" :size="68" :color="$colors.warn" />
+            <h2>已提交询价信息</h2>
+            <p>稍后可在咨询消息列表中查看回复情况</p>
+        </div>
+
+        <div class="btn-content">
+            <div>
+                <van-button :color="$colors.warn" block :radius="4" @click="navigateBack">返回</van-button>
+            </div>
+            <div style="margin-top:20px">
+                <van-button block :radius="4" :color="$colors.warn" plain @click="goChat">查看记录</van-button>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {};
+    },
+    onShow() {},
+    methods: {
+        goChat() {
+            wx.switchTab({
+                url: '/pages/Chat'
+            });
+        }
+    }
+};
+</script>
+
+<style lang="less" scoped>
+.container {
+    min-height: 100vh;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-around;
+    .top {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        h2 {
+            padding: 36px 0 16px;
+            font-size: 18px;
+        }
+    }
+}
+</style>
+
+<style lang="less">
+.btn-content {
+    width: 240px;
+    .van-button {
+        height: 44px;
+        --button-border-width: 0px;
+        --button-plain-background-color: #f2f3f5;
+    }
+}
+</style>

+ 174 - 0
src/pagesProduct/IntentionList.vue

@@ -0,0 +1,174 @@
+<config>
+{
+'navigationBarTitleText': '意向单',
+}
+</config>
+<template>
+    <div class="contrast">
+        <div class="product-list" v-if="intentionList.length > 0">
+            <product-row
+                :checked="[...chooseIds].includes(item.id)"
+                v-for="item in intentionList"
+                :key="item.id"
+                :info="item"
+                @choose="choose"
+                @del="delContrast"
+            ></product-row>
+        </div>
+        <van-empty description="什么都没有哦" v-else />
+
+        <van-dialog id="van-dialog"> </van-dialog>
+
+        <fixed-button v-if="chooseIds.length > 0">
+            <van-button
+                block
+                :color="$colors.warn"
+                :radius="4"
+                @click="navigateTo('/pagesProduct/Inquiry?chooseIds=' + chooseIds.join(','))"
+                >批量询价</van-button
+            >
+        </fixed-button>
+    </div>
+</template>
+<script>
+import FixedButton from '../components/FixedButton.vue';
+import ProductRow from '../components/product/RowMini.vue';
+import { mapState } from 'vuex';
+export default {
+    data() {
+        return {
+            productId: '',
+            chooseIds: [],
+            list: [],
+            addList: []
+        };
+    },
+    onLoad(options) {
+        console.log(options);
+        if (options.productId) {
+            this.productId = Number(options.productId);
+        }
+    },
+    computed: {
+        ...mapState(['intentionList'])
+    },
+    methods: {
+        loginMethods() {
+            this.$store.dispatch('getIntentionList');
+        },
+        delContrast(id) {
+            this.dialog('确认要删除该商品吗?', true, false, '立即删除')
+                .then(() => {
+                    return this.$http.post('/intentionList/delOne', {
+                        type: 'PRODUCT_COMPARISON',
+                        productId: id
+                    });
+                })
+                .then(() => {
+                    if (this.chooseIds.includes(id)) {
+                        this.choose(id);
+                    }
+                    this.toast('删除成功!', 'success');
+                    this.$store.dispatch('getContrastInfo');
+                });
+        },
+        choose(id) {
+            console.log(id);
+            const chooseIds = [...this.chooseIds];
+            if (chooseIds.includes(id)) {
+                chooseIds.splice(chooseIds.indexOf(id), 1);
+            } else {
+                chooseIds.push(id);
+            }
+            this.chooseIds = [...chooseIds];
+        }
+    },
+    components: {
+        ProductRow,
+        FixedButton
+    }
+};
+</script>
+
+<style lang="less">
+.my-notice {
+    &.van-notice-bar {
+        align-items: flex-start;
+        --notice-bar-line-height: 20px;
+        --notice-bar-icon-size: 20px;
+        .van-notice-bar__left-icon {
+            margin-top: 3px;
+        }
+    }
+}
+
+.notice {
+    padding: 16px 0 6px;
+    background: #f5f7fa;
+    --notice-bar-wrapable-padding: 0 16px;
+    --button-border-width: 0px;
+    .van-button {
+        padding: 0 16px;
+    }
+    display: flex;
+    flex-direction: column;
+    ._van-button {
+        align-self: flex-end;
+    }
+}
+
+.dialog-center {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    padding: 36px 30px 20px;
+
+    .dialog-title {
+        font-size: 14px;
+        font-weight: bold;
+        color: #353535;
+        line-height: 23px;
+        text-align: center;
+        margin-top: 25px;
+    }
+}
+
+.contrast-top {
+    padding: 16px;
+    --button-plain-background-color: #ffa52612;
+    --button-border-width: 0px;
+}
+
+.product-list {
+    // padding: 16px 0;
+    .product {
+        padding: 16px;
+        position: relative;
+    }
+
+    .product + .product {
+        &::after {
+            content: '';
+            position: absolute;
+            top: 0;
+            left: 28px;
+            right: 0px;
+            height: 1px;
+            background: #f5f7fa;
+        }
+    }
+}
+.contrast-content {
+    .title {
+        background: #f2f3f5;
+        padding: 7px 16px;
+        font-size: 12px;
+        color: #878d99;
+        line-height: 17px;
+    }
+
+    .product-list {
+        padding: 0 16px;
+    }
+}
+</style>

+ 234 - 0
src/pagesVendor/About.vue

@@ -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>

+ 231 - 0
src/pagesVendor/Connect.vue

@@ -0,0 +1,231 @@
+<config>
+{
+'navigationBarTitleText': '咨询展商',
+}
+</config>
+<template>
+    <div class="Inquiry">
+        <h2>感兴趣的产品</h2>
+        <div class="product-list" v-if="allList.length > 0">
+            <product-row
+                v-for="item in allList"
+                :key="item.id"
+                :info="item"
+                :hasDel="false"
+                :hasCheck="false"
+            ></product-row>
+        </div>
+        <div class="add-btn" v-if="!productId">
+            <van-button block round @click="navigateTo('/pagesVendor/FilterProduct?vendorId=' + vendorId)">
+                <div class="add">
+                    <van-icon :size="20" color="#565B66" name="plus" />
+                    添加
+                </div>
+            </van-button>
+        </div>
+        <div class="form">
+            <h2>计划加工</h2>
+            <textarea
+                class="textarea"
+                @input="artifact = $event.detail.value"
+                auto-height
+                placeholder="请输入计划加工的工件名称"
+                placeholder-class="pla-textarea"
+            />
+        </div>
+        <div class="form">
+            <h2>需求描述</h2>
+            <textarea
+                class="textarea"
+                @input="otherProblems = $event.detail.value"
+                auto-height
+                placeholder="请简要描述您的问题需求,100字以内"
+                placeholder-class="pla-textarea"
+            />
+        </div>
+
+        <fixed-button>
+            <van-button block :color="$colors.warn" :radius="4" :disabled="!canNext" @click="submit"
+                >提交咨询</van-button
+            >
+        </fixed-button>
+    </div>
+</template>
+<script>
+import { mapState } from 'vuex';
+import FixedButton from '../components/FixedButton.vue';
+import ProductRow from '../components/product/RowMini.vue';
+export default {
+    data() {
+        return {
+            isBranch: false,
+            idList: [],
+            isLimit: true,
+            artifact: '',
+            otherProblems: '',
+            productId: '',
+            vendorId: 0
+        };
+    },
+    computed: {
+        ...mapState(['chooseList', 'userInfo']),
+        allList() {
+            return this.chooseList ? [...this.chooseList] : [];
+        },
+        canNext() {
+            if (this.allList.length > 0 && this.artifact && this.otherProblems) {
+                return true;
+            } else {
+                return false;
+            }
+        },
+        submitForm() {
+            const list = [...this.allList];
+            const _backList = [
+                ...new Set(
+                    list.map(item => {
+                        return item.vendorInfoId;
+                    })
+                )
+            ];
+            return _backList.map(item => {
+                return {
+                    vendorInfoId: item,
+                    userId: this.userInfo.id,
+                    offlineExperience: false,
+                    productIds: list
+                        .filter(child => {
+                            return child.vendorInfoId === item;
+                        })
+                        .map(child => {
+                            return child.id;
+                        }),
+                    artifact: this.artifact,
+                    otherProblems: this.otherProblems
+                };
+            });
+        }
+    },
+    onLoad(options) {
+        if (options.productId) {
+            console.log(this.chooseList);
+            this.productId = options.productId;
+        } else {
+            this.$store.commit('updateChooseList', []);
+        }
+
+        if (options.vendorId) {
+            this.vendorId = options.vendorId;
+        }
+    },
+    methods: {
+        submit() {
+            console.log(JSON.stringify(this.submitForm));
+            if (!this.allList.length === 0) {
+                this.toast('请添加咨询产品');
+                return;
+            }
+            if (!this.artifact) {
+                this.toast('请输入计划加工的工件');
+                return;
+            }
+            if (!this.otherProblems) {
+                this.toast('请输入问题需求');
+                return;
+            }
+            this.save(JSON.stringify(this.submitForm));
+        },
+        save(formData) {
+            this.$http
+                .post('/advisoryForm/create', {
+                    form: formData
+                })
+                .then(res => {
+                    wx.redirectTo({
+                        url: '/pagesMine/ChatDetail?toUserId=' + this.vendorId
+                    });
+                })
+                .catch(e => {
+                    this.$toast(e.error);
+                });
+        }
+    },
+    components: {
+        ProductRow,
+        FixedButton
+    }
+};
+</script>
+<style lang="less">
+h2 {
+    font-size: 18px;
+    line-height: 25px;
+    padding: 16px 16px 0;
+}
+.product-list {
+    // padding: 16px 0;
+    .product {
+        padding: 16px;
+        position: relative;
+    }
+
+    .product + .product {
+        &::after {
+            content: '';
+            position: absolute;
+            top: 0;
+            left: 28px;
+            right: 0px;
+            height: 1px;
+            background: #f5f7fa;
+        }
+    }
+}
+.add-btn {
+    --button-default-color: #565b66;
+    --button-normal-font-size: 15px;
+    line-height: 44px;
+    margin: 20px 58px;
+    .add {
+        display: flex;
+        align-items: center;
+        .van-icon {
+            margin-right: 8px;
+        }
+    }
+}
+.Inquiry {
+    --divider-margin: 0 16px 30px;
+}
+.limit {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    font-size: 12px;
+    color: #bcc1cc;
+    line-height: 22px;
+    padding-bottom: 36px;
+}
+.form {
+    padding: 0px 0 20px;
+    .textarea {
+        margin: 16px 16px 0;
+        background: #f5f7fa;
+        border-radius: 4px;
+        min-height: 100px;
+        width: calc(100% - 32px);
+        display: block;
+        padding: 12px;
+        box-sizing: border-box;
+        font-size: 14px;
+        line-height: 22px;
+        color: #000;
+    }
+
+    .pla-textarea {
+        color: #bcc1cc;
+        font-size: 14px;
+        line-height: 22px;
+    }
+}
+</style>

+ 160 - 0
src/pagesVendor/Detail.vue

@@ -0,0 +1,160 @@
+<config>
+{
+'navigationBarTitleText': '',
+'navigationStyle':'custom',
+'navigationBarTextStyle':'white',
+'backgroundColorBottom': '#fff',
+'backgroundColorTop': '#0F264D',
+"usingComponents": {
+  "van-sidebar": "../native/vant/sidebar/index",
+  "van-sidebar-item": "../native/vant/sidebar-item/index"
+},
+}
+</config>
+<template>
+    <div>
+        <div style="height:71px">
+            <search-bar v-model="searchKey" :ratio="ratio" @search="submitSearch"> </search-bar>
+        </div>
+        <div class="vendor" id="vendor">
+            <van-image :radius="4" :src="vendorInfo.logo" fit="cover" :width="60" :height="60" />
+            <div class="vendor-info">
+                <div class="text1">{{ vendorInfo.chCompanyName }}</div>
+                <div class="text2">{{ vendorInfo.enCompanyName }}</div>
+            </div>
+            <div class="collect" @click="collection">
+                <van-icon
+                    :custom-class="animate ? 'my-icon iconAnimate' : 'my-icon'"
+                    :name="isCollection ? 'icon-aixin' : 'icon-icon_collect'"
+                    :size="32"
+                    :color="isCollection ? $colors.warn : '#BCC1CC'"
+                    class-prefix="iconfont"
+                />
+                <div class="text">{{ isCollection ? '已关注' : '关注' }}</div>
+            </div>
+        </div>
+        <div class="main" id="main">
+            <van-tabs :z-index="200" :line-height="0" sticky :offset-top="71" @change="active = $event.detail.index">
+                <van-tab title="关于展商">
+                    <about :vendorInfo="vendorInfo" :showConnect="showConnect"></about>
+                </van-tab>
+                <van-tab title="产品">
+                    <product :vendorInfo="vendorInfo" :fixedTop="searchTop"></product>
+                </van-tab>
+                <van-tab title="新闻资讯"> </van-tab>
+            </van-tabs>
+        </div>
+    </div>
+</template>
+<script>
+import SearchBar from '../components/bar/SearchBarWithValue.vue';
+import collection from '../mixins/collection';
+import About from './About.vue';
+import Product from './Product.vue';
+
+export default {
+    components: { SearchBar, About, Product },
+    data() {
+        return {
+            ratio: 1,
+            searchKey: '',
+            productList: [],
+            decorationInfo: {},
+            collectionType: 'VENDOR',
+            vendorInfo: {},
+            active: 0,
+            searchTop: 0,
+            showConnect: false
+        };
+    },
+    mixins: [collection],
+    methods: {
+        submitSearch() {},
+        loginMethods() {
+            this.cId = this.$mp.options.id;
+        }
+    },
+    onLoad(options) {
+        this.$loading('加载中');
+        this.$http.get('/vendorInfo/getHome/' + options.id).then(res => {
+            this.vendorInfo = res;
+            this.$loading.close();
+            this.$nextTick(() => {
+                this.active = 0;
+            });
+        });
+    },
+    onReady() {
+        this.main = wx.createSelectorQuery().select('#main');
+        this.main
+            .boundingClientRect(rect => {
+                this.searchTop = rect.top;
+
+                wx.createSelectorQuery()
+                    .select('#vendor')
+                    .boundingClientRect(rect => {
+                        this.searchTop = this.searchTop - rect.height;
+                    })
+                    .exec();
+            })
+            .exec();
+    },
+    onPageScroll(e) {
+        if (e.scrollTop < 115) {
+            this.showConnect = false;
+        } else {
+            this.showConnect = true;
+        }
+    }
+};
+</script>
+<style lang="less">
+.vendor {
+    display: flex;
+    padding: 10px 16px 14px;
+    background-color: #0f264d;
+    .vendor-info {
+        flex-grow: 1;
+        padding: 0 8px;
+
+        .text1 {
+            font-size: 15px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 24px;
+        }
+
+        .text2 {
+            font-size: 12px;
+            color: #878d99;
+            line-height: 17px;
+        }
+    }
+
+    .collect {
+        display: flex;
+        flex-direction: column;
+        align-items: center;
+        width: 40px;
+        // justify-content: center;
+        .text {
+            font-size: 10px;
+            color: #9ca2af;
+            line-height: 14px;
+            transform: translateY(-8px);
+        }
+
+        .my-icon {
+            &:active {
+                color: @warn!important;
+                background-color: darken(@prim, 5);
+            }
+        }
+    }
+}
+
+.main {
+    --tabs-nav-background-color: @prim;
+    --tab-text-color: #ffffffaa;
+}
+</style>

+ 117 - 0
src/pagesVendor/FilterProduct.vue

@@ -0,0 +1,117 @@
+<template>
+    <div>
+        <div class="product-list" v-if="list.length > 0">
+            <product-row
+                v-for="item in list"
+                :checked="[...chooseIds].includes(item.id)"
+                :key="item.id"
+                :info="item"
+                @choose="addContrast"
+                :hasDel="false"
+            ></product-row>
+        </div>
+        <van-empty v-else description="什么都没有哦" />
+
+        <fixed-button v-if="chooseIds.length > 0">
+            <van-button :color="$colors.warn" block @click="submit">确定</van-button>
+        </fixed-button>
+    </div>
+</template>
+<script>
+import ProductRow from '../components/product/RowMini.vue';
+import { mapState } from 'vuex';
+import FixedButton from '../components/FixedButton.vue';
+export default {
+    data() {
+        return {
+            categoryIds: '',
+            vendorId: '',
+            chooseIds: [],
+            list: [],
+            category: {}
+        };
+    },
+    onLoad(options) {
+        this.chooseIds = [...this.chooseList].map(item => {
+            return item.id;
+        });
+        this.vendorId = options.vendorId;
+        this.getList();
+    },
+    computed: {
+        ...mapState(['chooseList']),
+        nowChoose() {
+            var list = [...this.list];
+            return list.filter(item => {
+                return [...this.chooseIds].includes(item.id);
+            });
+        }
+    },
+    methods: {
+        getList() {
+            this.$http
+                .post(
+                    '/product/all',
+                    {
+                        query: {
+                            vendorInfoId: this.vendorId
+                        }
+                    },
+                    {
+                        header: {
+                            'Content-Type': 'application/json'
+                        }
+                    }
+                )
+                .then(res => {
+                    this.list = res.content;
+                });
+        },
+        addContrast(id) {
+            const chooseIds = [...this.chooseIds];
+            if (chooseIds.includes(id)) {
+                chooseIds.splice(chooseIds.indexOf(id), 1);
+            } else {
+                chooseIds.push(id);
+            }
+            this.chooseIds = [...chooseIds];
+        },
+        submit() {
+            this.$store.commit('updateChooseList', [...this.nowChoose]);
+            this.navigateBack();
+        }
+    },
+    components: {
+        ProductRow,
+        FixedButton
+    }
+};
+</script>
+<style lang="less">
+.top {
+    padding: 10px 16px 12px;
+    --button-plain-background-color: #ffa52612;
+    --button-border-width: 0px;
+    z-index: 20;
+    background-color: #fff;
+    --button-default-height: 40px;
+}
+.product-list {
+    .product {
+        padding: 16px;
+        position: relative;
+    }
+
+    .product + .product {
+        &::after {
+            content: '';
+            position: absolute;
+            top: 0;
+            left: 28px;
+            right: 0px;
+            height: 1px;
+            background: #f5f7fa;
+        }
+    }
+}
+</style>

+ 119 - 0
src/pagesVendor/Product.vue

@@ -0,0 +1,119 @@
+<template>
+    <div class="productPage" style="height: calc(100vh - 71px - 44px);">
+        <div class="left-side">
+            <van-sidebar :active-key="activeKey" @change="changeCustomCate">
+                <van-sidebar-item :title="getName(item)" :key="item.id" v-for="item in menus" />
+            </van-sidebar>
+        </div>
+
+        <div class="right">
+            <scroll-view :scroll-y="true" :scroll-x="false" style="height:calc(100vh - 71px - 44px);width:100%">
+                <div class="product-row-list">
+                    <product-row v-for="item in list" :key="item.id" :info="item"></product-row>
+                </div>
+
+                <van-empty description="什么都没有哦" v-if="empty" />
+            </scroll-view>
+        </div>
+    </div>
+</template>
+<script>
+import searchList from '../mixins/searchList';
+import ProductRow from '../components/product/Row';
+export default {
+    name: 'product',
+    data() {
+        return {
+            menus: [],
+            activeKey: 0,
+            url: '/product/show'
+        };
+    },
+    mixins: [searchList],
+    props: {
+        vendorInfo: {
+            type: Object,
+            default: () => {
+                return {};
+            }
+        }
+    },
+    computed: {
+        listQuery() {
+            return {
+                productSort: this.sort,
+                customCateId: this.customCateId
+            };
+        },
+        customCateId() {
+            if (this.menus.length > this.activeKey) {
+                return [...this.menus][this.activeKey].id;
+            } else {
+                return '';
+            }
+        }
+    },
+    mounted() {
+        this.searchTop = 71 + 44;
+        this.$http
+            .get('/customCategory/my', {
+                vendorId: this.$mp.options.id
+            })
+            .then(res => {
+                this.menus = res;
+                this.$nextTick(() => {
+                    this.getData();
+                });
+            });
+    },
+    methods: {
+        changeCustomCate(e) {
+            this.activeKey = e.detail;
+            this.refreash();
+        }
+    },
+    components: {
+        ProductRow
+    }
+};
+</script>
+<style lang="less">
+.productPage {
+    display: flex;
+    width: 100%;
+    overflow: hidden;
+}
+.left-side {
+    width: 121px;
+    --sidebar-padding: 20px;
+    --sidebar-selected-border-color: transparent;
+    --sidebar-selected-font-weight: bolder;
+    background: #f5f7fa;
+    flex-shrink: 0;
+    .van-sidebar-item {
+        width: 121px;
+    }
+
+    .van-sidebar-item--selected {
+        position: relative;
+        &::before {
+            content: '';
+            width: 2px;
+            height: 20px;
+            background: @warn;
+            position: absolute;
+            left: 12px;
+            top: 50%;
+            transform: translateY(-50%);
+        }
+    }
+}
+
+.right {
+    flex-grow: 1;
+}
+.product-row-list {
+    overflow: hidden;
+    width: 100%;
+}
+</style>

+ 33 - 17
src/store/index.js

@@ -10,7 +10,9 @@ export default new Vuex.Store({
         userIcon: '',
         filterInfo: {},
         productCategories: [],
-        intentionList: []
+        intentionList: [],
+        contrastInfo: {},
+        chooseList: []
     },
     mutations: {
         setSafeAreaTop(state, val) {
@@ -39,30 +41,39 @@ export default new Vuex.Store({
         },
         setProductCategories(state, productCategories) {
             state.productCategories = productCategories;
+        },
+        updateContrastInfo(state, contrastInfo) {
+            state.contrastInfo = contrastInfo;
+        },
+        updateChooseList(state, chooseList) {
+            state.chooseList = chooseList;
         }
     },
     actions: {
         getUserInfo(context) {
             let userInfo = {};
-            return http.http
-                .get('/user/my')
-                .then(res => {
-                    if (res.phone) {
-                        userInfo = res;
-                        return http.http.post('/buyersInfo/getInfo', {
+            return http.http.get('/user/my').then(res => {
+                if (res.phone) {
+                    userInfo = res;
+                    return http.http
+                        .post('/buyersInfo/getInfo', {
                             userId: res.id
+                        })
+                        .then(res => {
+                            if (res.logo) {
+                                userInfo.avatar = res.logo;
+                            }
+                            context.commit('setUserInfo', userInfo);
+                            return Promise.resolve(res);
+                        })
+                        .catch(e => {
+                            context.commit('setUserInfo', userInfo);
+                            return Promise.resolve();
                         });
-                    }
-
+                } else {
                     return Promise.reject();
-                })
-                .then(res => {
-                    if (res.logo) {
-                        userInfo.avatar = res.logo;
-                    }
-                    context.commit('setUserInfo', userInfo);
-                    return Promise.resolve();
-                });
+                }
+            });
         },
         getProductCategories(context) {
             return http.http.get('/productCategory/tree').then(res => {
@@ -89,6 +100,11 @@ export default new Vuex.Store({
                     context.commit('updateIntentionList', res || []);
                 });
             }
+        },
+        getContrastInfo(context) {
+            return http.http.get('/intentionList/myCompared').then(res => {
+                context.commit('updateContrastInfo', res || {});
+            });
         }
     }
 });

+ 3 - 1
src/styles/fonts.less

@@ -20,7 +20,9 @@
     -moz-osx-font-smoothing: grayscale;
     position: relative;
 }
-
+.iconfont-icon-aixin:before {
+    content: '\e8c3';
+}
 .iconfont-icon-icon_collect:before {
     content: '\e616';
 }

Некоторые файлы не были показаны из-за большого количества измененных файлов