panhui 5 yıl önce
ebeveyn
işleme
1ea619e56c

+ 3 - 1
.env.development

@@ -1 +1,3 @@
-VUE_APP_BASE_URL=https://imt.izouma.com
+VUE_APP_BASE_URL=https://imt.izouma.com
+VUE_APP_PHONE=862160797117
+VUE_APP_EMAIL=imttech@itoc.com.cn

+ 3 - 1
.env.production

@@ -1 +1,3 @@
-VUE_APP_BASE_URL=https://imt.izouma.com
+VUE_APP_BASE_URL=https://imt.izouma.com
+VUE_APP_PHONE=862160797117
+VUE_APP_EMAIL=imttech@itoc.com.cn

+ 7 - 7
project.config.json

@@ -72,13 +72,13 @@
                     "name": "对比",
                     "pathName": "pagesProduct/Contrast",
                     "scene": null
-                },{
-                      "id": -1,
-                      "name": "对比",
-											"pathName": "pagesProduct/Detail",
-											"query":"id=14574",
-                      "scene": null
-                  }
+                },
+                {
+                    "id": -1,
+                    "name": "IMT",
+                    "pathName": "pagesImt/Index",
+                    "scene": null
+                }
             ]
         }
     }

+ 4 - 0
src/App.vue

@@ -128,6 +128,10 @@ page {
     background-color: #fff;
 }
 
+.flex1 {
+    flex-grow: 1;
+}
+
 .form {
     .van-cell {
         --cell-vertical-padding: 23px;

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

@@ -3,7 +3,7 @@
         <div class="navBar" :style="narStyle" id="searchBar">
             <van-icon name="arrow-left" @click="navigateBack" :size="24" :color="fontColor" />
 
-            <div class="text" v-if="ratio" :style="{ fontColor: fontColor }">{{ title }}</div>
+            <div class="text" v-if="!topHide || ratio" :style="{ fontColor: fontColor }">{{ title }}</div>
         </div>
     </div>
 </template>
@@ -37,6 +37,10 @@ export default {
         barTop: {
             type: Number,
             default: 100
+        },
+        topHide: {
+            type: Boolean,
+            default: true
         }
     },
     data() {

+ 52 - 4
src/components/bar/FilterSortBar.vue

@@ -3,8 +3,27 @@
         <div class="sort-top">
             <div class="sort-left">
                 <block v-for="item in sortList" :key="item.key">
-                    <div class="sort-item" @click="changeSort(item.key)" :class="{ active: sort === item.key }">
+                    <div
+                        class="sort-item"
+                        @click="changeSort(item.key)"
+                        :class="{ active: checkChoose(item.key, true) }"
+                    >
                         {{ $t(item.name) }}
+
+                        <div class="right" v-if="item.list">
+                            <van-icon
+                                name="icon-arrow-up-filling"
+                                :size="10"
+                                :color="checkChoose('TIME_SEQUENCE') ? $colors.warn : $colors.info"
+                                class-prefix="iconfont"
+                            />
+                            <van-icon
+                                name="icon-arrow-down-filling"
+                                :size="10"
+                                :color="checkChoose('TIME') ? $colors.warn : $colors.info"
+                                class-prefix="iconfont"
+                            />
+                        </div>
                     </div>
                 </block>
             </div>
@@ -96,7 +115,8 @@ export default {
                 return [...ProductSortType].map(item => {
                     return {
                         key: item[0],
-                        name: item[1]
+                        name: typeof item[1] === 'string' ? item[1] : item[1].name,
+                        list: typeof item[1] === 'string' ? null : item[1].list
                     };
                 });
             }
@@ -110,10 +130,21 @@ export default {
             this.$emit('showFilter');
         },
         changeSort(value) {
-            this.$emit('changeSort', value);
+            if (value === 'TIME' && this.sort === value) {
+                this.$emit('changeSort', 'TIME_SEQUENCE');
+            } else {
+                this.$emit('changeSort', value);
+            }
         },
         changeShowType() {
             this.$emit('changeShowType');
+        },
+        checkChoose(chooseValue, isMore = false) {
+            if ((!isMore && chooseValue === this.sort) || (isMore && this.sort.indexOf(chooseValue) !== -1)) {
+                return true;
+            } else {
+                return false;
+            }
         }
     }
 };
@@ -154,8 +185,9 @@ export default {
     .sort-left {
         display: flex;
         flex-grow: 1;
+        padding-left: 12px;
         .sort-item {
-            padding: 0 25px;
+            padding: 0 12px;
 
             &.active {
                 color: @warn;
@@ -176,6 +208,22 @@ export default {
             &:active {
                 color: @warn;
             }
+
+            // display: flex;
+            // align-items: center;
+            position: relative;
+            .right {
+                display: flex;
+                flex-direction: column;
+                justify-content: center;
+                align-items: center;
+                line-height: 8px;
+                margin-left: 5px;
+                position: absolute;
+                right: 0px;
+                top: 50%;
+                transform: translateY(-50%);
+            }
         }
     }
 }

+ 2 - 2
src/components/filter/Country.vue

@@ -4,7 +4,7 @@
             <h3 class="filterInfoTitle">国家和地区</h3>
         </block>
         <div class="filter-btn" :class="{ noChoose: !valueInfo }" @click="show">
-            <h3 class="fontNormal">{{ valueInfo ? $t(valueInfo.label) : size === 'big' ? '请选择' : '地区' }}</h3>
+            <h3 class="fontNormal">{{ valueInfo ? $t(valueInfo.label) : size === 'big' ? '请选择' : '国家/地区' }}</h3>
             <van-icon v-if="size === 'big'" color="#CBCFDB" :size="18" name="arrow" />
             <van-icon
                 v-if="size === 'small'"
@@ -29,7 +29,7 @@
                     :border="false"
                     :custom-class="chooseId === headerInfo.value ? 'active' : ''"
                 >
-                    <h3 class="fontNormal" slot="title">全部{{ $t(headerInfo.label) }}地区</h3>
+                    <h3 class="fontNormal" slot="title">全部{{ $t(headerInfo.label) }}国家/地区</h3>
                     <van-icon
                         v-if="chooseId === headerInfo.value"
                         slot="right-icon"

+ 1 - 1
src/components/filter/ProductCategory.vue

@@ -4,7 +4,7 @@
             <h3 class="filterInfoTitle">分类</h3>
         </block>
         <div class="filter-btn" :class="{ noChoose: !valueInfo }" @click="show">
-            <h3 class="fontNormal">{{ valueInfo ? getName(valueInfo) : size === 'big' ? '请选择' : '分类' }}</h3>
+            <h3 class="fontNormal">{{ valueInfo ? getName(valueInfo) : size === 'big' ? '请选择' : '产品类别' }}</h3>
             <van-icon v-if="size === 'big'" color="#CBCFDB" :size="18" name="arrow" />
             <van-icon
                 v-if="size === 'small'"

+ 5 - 0
src/components/imt/Bottom.vue

@@ -86,6 +86,8 @@ export default {
 .imt-bottom {
     height: 48px;
     margin-top: 20px;
+    padding-bottom: calc(8px + constant(safe-area-inset-bottom));
+    padding-bottom: calc(8px + env(safe-area-inset-bottom));
 
     .bottom {
         position: fixed;
@@ -95,6 +97,9 @@ export default {
         width: 100%;
         min-width: 375px;
         height: 48px;
+        right: 0;
+        padding-bottom: calc(8px + constant(safe-area-inset-bottom));
+        padding-bottom: calc(8px + env(safe-area-inset-bottom));
     }
 }
 </style>

+ 16 - 2
src/components/product/Grid.vue

@@ -4,7 +4,15 @@
         <div class="content">
             <div class="text">
                 <h4>{{ name }}</h4>
-                <p>{{ info.model }}</p>
+                <!-- <p>{{ info.model }}</p> -->
+
+                <van-image
+                    class="grid-logo"
+                    width="100%"
+                    :height="25"
+                    :src="info.logo1 + '?x-oss-process=image/resize,h_100,m_lfit'"
+                    fit="contain"
+                />
             </div>
         </div>
     </div>
@@ -28,7 +36,7 @@ export default {
         },
         img() {
             if (this.getList(this.info.img)) {
-                return this.getList(this.info.img) + '?x-oss-process=image/resize,m_fill,h_200,w_200';
+                return this.getList(this.info.img) + '?x-oss-process=image/resize,m_fill,h_300,w_300';
             } else {
                 return '';
             }
@@ -50,5 +58,11 @@ export default {
     &:active {
         background-color: darken(#fff, 5);
     }
+
+    p {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
 }
 </style>

+ 7 - 1
src/components/product/GridBig.vue

@@ -7,7 +7,13 @@
                 <p>{{ info.model }}</p>
             </div>
 
-            <van-image class="grid-logo" width="105px" height="45px" :src="info.logo" fit="cover" />
+            <van-image
+                class="grid-logo"
+                :width="105"
+                :height="45"
+                :src="info.logo1 + '?x-oss-process=image/resize,h_135,m_lfit'"
+                fit="contain"
+            />
         </div>
     </div>
 </template>

+ 1 - 0
src/components/product/RowMini.vue

@@ -76,6 +76,7 @@ export default {
 <style lang="less" scoped>
 .product {
     display: flex;
+    overflow: hidden;
     .info {
         flex-grow: 1;
         margin-left: 8px;

+ 63 - 6
src/components/product/RowNormal.vue

@@ -1,5 +1,12 @@
 <template>
-    <div class="product" @click="navigateTo(`/pagesProduct/Detail?id=${info.id}`, false)">
+    <div class="product" @click="clickEvent">
+        <van-icon
+            v-if="isChoose"
+            :name="checked ? 'checked' : 'circle'"
+            :color="checked ? $colors.warn : '#BCC1CC'"
+            :size="16"
+            style="margin-right:12px"
+        />
         <van-image :src="img" :width="110" :height="110" fit="cover" />
         <div class="info">
             <h3>{{ getName(info) }}</h3>
@@ -7,6 +14,7 @@
                 <van-image :src="info.logo" v-if="info.logo" :width="39" :height="17" fit="contain" />
                 <p>{{ info.model }}</p>
             </div>
+            <div class="flex1"></div>
             <div class="tags">
                 <van-tag v-for="(item, index) in tag" :key="index" custom-class="mini" plain color="#BCC1CC">{{
                     item
@@ -23,6 +31,16 @@ export default {
             default: () => {
                 return {};
             }
+        },
+        isChoose: {
+            type: Boolean,
+            default: false
+        },
+        chooseList: {
+            type: Array,
+            default: () => {
+                return [];
+            }
         }
     },
     computed: {
@@ -41,10 +59,28 @@ export default {
                     })
                     .slice(0, 3) || []
             );
+        },
+        checked() {
+            return [...this.chooseList].includes(this.info.id);
         }
     },
-    data() {
-        return {};
+    methods: {
+        clickEvent() {
+            if (!this.isChoose) {
+                this.navigateTo(`/pagesProduct/Detail?id=${this.info.id}`, false);
+            } else {
+                if (this.checked) {
+                    this.$emit(
+                        'update:chooseList',
+                        [...this.chooseList].filter(item => {
+                            return item !== this.info.id;
+                        })
+                    );
+                } else {
+                    this.$emit('update:chooseList', [...this.chooseList, this.info.id]);
+                }
+            }
+        }
     }
 };
 </script>
@@ -53,21 +89,33 @@ export default {
     display: flex;
     overflow: hidden;
     box-sizing: border-box;
-    background-color: #fff;
     border-radius: 4px;
     .info {
         flex-grow: 1;
         padding: 12px;
         overflow: hidden;
+        background-color: #fff;
+        height: 110px;
+        box-sizing: border-box;
+        display: flex;
+        flex-direction: column;
     }
     &:active {
-        background-color: darken(#fff, 5);
+        .info {
+            background-color: darken(#fff, 5);
+        }
     }
 }
 
 .sub {
     display: flex;
     align-items: center;
+    overflow: hidden;
+    p {
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
 }
 
 .tags {
@@ -78,7 +126,10 @@ export default {
     overflow: hidden;
     text-overflow: ellipsis;
     min-height: 21px;
-    margin-top: 21px;
+    // margin-top: 21px;
+}
+.product + .product {
+    margin-top: 12px;
 }
 </style>
 
@@ -89,4 +140,10 @@ export default {
         margin-right: 4px;
     }
 }
+
+.product {
+    .van-image {
+        border-radius: 4px 0 0 4px;
+    }
+}
 </style>

+ 1 - 1
src/components/select/ProductCategory.vue

@@ -10,7 +10,7 @@
                     <van-icon v-if="headerInfo" color="#5E636D" @click="back" :size="18" name="arrow-left" />
                 </div>
                 <h3>选择感兴趣的产品</h3>
-                <van-button :color="$colors.warn" size="small" @click="submit">确认</van-button>
+                <van-button :color="$colors.warn" plain size="small" @click="submit">确认</van-button>
             </div>
             <van-cell-group :border="false">
                 <block v-for="item in showList" :key="item.id">

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

@@ -23,6 +23,8 @@ export default {
 </script>
 <style lang="less" scoped>
 .case {
+    width: 300px;
+    flex-shrink: 0;
     h3 {
         padding: 11px 12px;
         font-weight: normal;
@@ -36,4 +38,7 @@ export default {
         background-color: darken(#fff, 5);
     }
 }
+.case + .case {
+    margin-left: 16px;
+}
 </style>

+ 10 - 0
src/components/vendor/Grid.vue

@@ -20,3 +20,13 @@ export default {
     }
 };
 </script>
+<style lang="less">
+.bg-white {
+    &:active {
+        background-color: darken(#fff, 5);
+        .van-image {
+            opacity: 0.6;
+        }
+    }
+}
+</style>

+ 65 - 19
src/components/vendor/Row.vue

@@ -1,42 +1,71 @@
 <template>
-    <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="vendor" @click="clickEvent">
+        <van-icon
+            v-if="isChoose"
+            :name="checked ? 'checked' : 'circle'"
+            :color="checked ? $colors.warn : '#BCC1CC'"
+            :size="16"
+            style="margin-right:12px"
+        />
+        <van-image :width="110" :height="110" :src="logo" fit="cover" />
         <div class="content">
             <h3>{{ getName(info, ['chCompanyName', 'enCompanyName']) }}</h3>
             <div class="info">
                 <van-icon :size="20" name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/icon_leibie.png" />
-                <p>{{ category }}</p>
+                <p>{{ categories }}</p>
             </div>
-            <div class="info" v-if="info.country">
+            <div class="info">
                 <van-icon :size="20" name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/icon_weizhi.png" />
-                <p>{{ info.country }}</p>
+                <p>{{ country }}</p>
             </div>
         </div>
     </div>
 </template>
 <script>
+import vendorInfo from '../../mixins/vendorInfo';
 export default {
+    mixins: [vendorInfo],
     props: {
         info: {
             type: Object,
             default: () => {
                 return {};
             }
+        },
+        isChoose: {
+            type: Boolean,
+            default: false
+        },
+        chooseList: {
+            type: Array,
+            default: () => {
+                return [];
+            }
         }
     },
     computed: {
-        category() {
-            if (this.info.categories && this.info.categories.length > 0) {
-                return this.getName([...this.info.categories].pop());
+        checked() {
+            return [...this.chooseList].includes(this.info.id);
+        }
+    },
+    methods: {
+        clickEvent() {
+            if (!this.isChoose) {
+                this.navigateTo('/pagesVendor/Detail?id=' + this.info.id, false);
             } else {
-                return '';
+                if (this.checked) {
+                    this.$emit(
+                        'update:chooseList',
+                        [...this.chooseList].filter(item => {
+                            return item !== this.info.id;
+                        })
+                    );
+                } else {
+                    this.$emit('update:chooseList', [...this.chooseList, this.info.id]);
+                }
             }
         }
-    },
-    data() {
-        return {};
-    },
-    onShow() {}
+    }
 };
 </script>
 
@@ -45,28 +74,45 @@ export default {
     display: flex;
     border-radius: 4px;
     overflow: hidden;
-    background-color: #fff;
-
-    &:active {
-        background-color: darken(#fff, 5);
+    ._van-icon {
+        align-self: center;
+        flex-shrink: 0;
     }
-
     .content {
         flex-grow: 1;
         padding: 12px;
         overflow: hidden;
+        background-color: #fff;
         h3 {
             margin-bottom: 8px;
         }
     }
+    &:active {
+        .content {
+            background-color: darken(#fff, 5);
+        }
+    }
 }
 
 .info {
     display: flex;
     align-items: center;
+    overflow: hidden;
     p {
         margin-left: 6px;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        word-wrap: normal;
     }
     margin-bottom: 4px;
 }
 </style>
+
+<style lang="less">
+.vendor {
+    .van-image {
+        border-radius: 4px 0 0 4px;
+    }
+}
+</style>

+ 2 - 1
src/locales/zh.json

@@ -147,5 +147,6 @@
   "zhan-ting-liu-lan-liang": "展厅浏览量",
   "zhan-ting-fang-ke-ren-shu": "展厅访客人数",
   "xuan-ze-pin-pai": "选择品牌",
-  "pin-pai": "品牌"
+  "pin-pai": "品牌",
+  "fa-bu-shi-jian": "发布时间"
 }

+ 5 - 0
src/mixins/commont.js

@@ -92,6 +92,11 @@ export default {
         navigateBack() {
             wx.navigateBack();
         },
+        goHome() {
+            wx.switchTab({
+                url: '/pages/Home'
+            });
+        },
         toast(title, icon = 'none', duration = 1500) {
             wx.showToast({
                 icon: icon,

+ 7 - 1
src/mixins/searchList.js

@@ -80,6 +80,7 @@ export default {
                     return this.$http.get(this.url, data, this.formType);
                 }
             };
+            this.$loading('加载中...');
             back()
                 .then(res => {
                     if (res) {
@@ -105,13 +106,17 @@ export default {
                     }
 
                     this.loading = false;
-                    console.log(res);
+                    this.$loading.close();
                 })
                 .catch(e => {
                     this.list = [];
                     this.error = true;
                     this.loading = false;
+                    this.$loading.close();
                     this.empty = true;
+                    if (e && e.error) {
+                        this.toast(e.error);
+                    }
                 });
         },
         // changeSort(prop, order) {
@@ -216,6 +221,7 @@ export default {
                 this.countries = this.filterInfo.countries;
                 this.continent = this.filterInfo.continent;
                 this.enterpriseType = this.filterInfo.enterpriseType;
+                this.applicationField = this.filterInfo.applicationField;
                 this.page = 1;
                 this.getData();
             } else if (this.filterQuery.pageType === 'product') {

+ 31 - 0
src/mixins/vendorInfo.js

@@ -0,0 +1,31 @@
+export default {
+    computed: {
+        name() {
+            return this.$i18n.locale().indexOf('zh') != -1 ? this.info.chCompanyName : this.info.enCompanyName;
+        },
+        categories() {
+            let str = this.info.categories
+                ? [...this.info.categories]
+                      .filter((item, index) => {
+                          return index === 0 || item.id !== [...this.info.categories][index - 1].id;
+                      })
+                      .map(item => {
+                          return this.$i18n.locale().indexOf('zh') != -1 ? item.chName.split('/').pop() : item.enName;
+                      })
+                      .join('/')
+                : '';
+
+            if (this.info.customCategory) {
+                str += (str ? '/' : '') + this.info.customCategory.split(',').join('/');
+            }
+
+            return str;
+        },
+        country() {
+            return this.info.country || '中国';
+        },
+        logo() {
+            return this.info.logo ? this.info.logo + '?x-oss-process=image/resize,m_fill,h_480,w_480' : '';
+        }
+    }
+};

+ 4 - 4
src/pages/Home.vue

@@ -18,8 +18,8 @@
             <div class="swiper">
                 <swiper
                     autoplay
-                    previous-margin="33px"
-                    next-margin="33px"
+                    previous-margin="26px"
+                    next-margin="25px"
                     class="swiper-home"
                     @change="current = $event.detail.current"
                     :current="current"
@@ -125,7 +125,7 @@
 
                 <van-empty description="暂未设置该类型热门商品" v-else />
             </div>
-            <div class="datas">
+            <!-- <div class="datas">
                 <van-image
                     width="100%"
                     src="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/home_img_yewushuju.jpg"
@@ -146,7 +146,7 @@
                         <siv class="text2">2480</siv>
                     </div>
                 </div>
-            </div>
+            </div> -->
 
             <div class="van-content" v-if="vendorInfos.length > 0">
                 <div class="title">

+ 10 - 5
src/pagesHome/Brand.vue

@@ -29,6 +29,7 @@
                     <div class="hot-item" v-for="item in vendors" :key="item.id">
                         <vendor-grid :info="item"></vendor-grid>
                     </div>
+                    <div style="min-width:16px;height:100%"></div>
                 </div>
             </scroll-view>
 
@@ -68,7 +69,7 @@
                     </span>
                 </filter-sort-bar>
             </van-sticky>
-            <sort-list :empty="empty" :loading="loading" :finish="finish" top="172rpx">
+            <sort-list :empty="empty" emptyText="敬请期待" :loading="loading" :finish="finish" top="172rpx">
                 <div>
                     <div class="grid-list" v-if="showType === 'grid'">
                         <div class="col-2" v-for="item in list" :key="item.id">
@@ -89,7 +90,7 @@
 import Banner from '../components/Banner';
 import { getBanner } from '../utils/commont';
 import searchList from '../mixins/searchList';
-import VendorGrid from '../components/vendor/Grid';
+import VendorGrid from '../components/vendor/Grid.vue';
 import VendorRow from '../components/vendor/Row';
 import SearchBar from '../components/bar/SearchBarWithValue';
 import FilterSortBar from '../components/bar/FilterSortBar';
@@ -113,7 +114,8 @@ export default {
             countries: '',
             continent: '',
             enterpriseType: '',
-            showType: 'row'
+            showType: 'row',
+            applicationField: ''
         };
     },
     computed: {
@@ -124,7 +126,8 @@ export default {
                 categoryIds: this.categoryIds,
                 countries: this.countries,
                 continent: this.continent,
-                enterpriseType: this.enterpriseType
+                enterpriseType: this.enterpriseType,
+                applicationField: this.applicationField
             };
         },
         filterQuery() {
@@ -134,7 +137,8 @@ export default {
                 countries: this.countries,
                 continent: this.continent,
                 enterpriseType: this.enterpriseType,
-                searchTop: this.searchTop
+                searchTop: this.searchTop,
+                applicationField: this.applicationField
             };
         },
         enterpriseName() {
@@ -214,6 +218,7 @@ export default {
     width: 84px;
     height: 84px;
     margin: 5px;
+    box-shadow: 0px 4px 10px 0px rgba(13, 107, 219, 0.1);
     .van-image {
         height: 84px;
     }

+ 42 - 2
src/pagesHome/Edit.vue

@@ -65,14 +65,14 @@
                 :value-class="languageOfCommunication ? '' : 'noValue'"
                 @click="chooseLanguage"
             />
-            <van-cell
+            <!-- <van-cell
                 title="邮箱"
                 :border="false"
                 is-link
                 :value="myInfo.userEmail || '未填写'"
                 :value-class="myInfo.userEmail ? '' : 'noValue'"
                 @click="change('userEmail')"
-            />
+            /> -->
         </van-cell-group>
 
         <fixed-button>
@@ -175,6 +175,46 @@ export default {
             this.show = true;
         },
         save() {
+            if (!this.myInfo.logo) {
+                this.toast('请上传头像');
+                return;
+            }
+
+            if (!this.myInfo.nickname) {
+                this.toast('请输入昵称');
+                return;
+            }
+
+            if (!this.sex) {
+                this.toast('请选择称呼');
+                return;
+            }
+
+            if (!this.myInfo.chCompanyName) {
+                this.toast('请输入公司名称');
+                return;
+            }
+
+            if (!this.myInfo.userPosition) {
+                this.toast('请填写职位');
+                return;
+            }
+
+            if (!this.myInfo.country) {
+                this.toast('请选择地址');
+                return;
+            }
+
+            if (!this.myInfo.industryId) {
+                this.toast('请选择所属行业');
+                return;
+            }
+
+            if (!this.myInfo.interestedProCateId) {
+                this.toast('请选择感兴趣的产品');
+                return;
+            }
+
             var form = { ...this.myInfo };
 
             this.$http

+ 2 - 1
src/pagesHome/FilterPage.vue

@@ -11,7 +11,7 @@
         <product-brand v-model="brand" v-if="pageType === 'product'"></product-brand>
         <product-tags v-model="tagIds" v-if="pageType === 'product'"></product-tags>
         <enterprise-type v-model="enterpriseType" v-if="pageType === 'vendor'"></enterprise-type>
-        <application v-model="applicationField" v-if="pageType === 'product'"></application>
+        <application v-model="applicationField" ></application>
 
         <div class="fixed-bottom">
             <div class="btn-list">
@@ -53,6 +53,7 @@ export default {
             this.countries = this.$mp.options.countries;
             this.continent = this.$mp.options.continent;
             this.enterpriseType = this.$mp.options.enterpriseType;
+            this.applicationField = this.$mp.options.applicationField;
         } else if (this.$mp.options.pageType === 'product') {
             this.categoryIds = this.$mp.options.categoryIds;
             this.countries = this.$mp.options.countries;

+ 7 - 1
src/pagesHome/Product.vue

@@ -59,7 +59,13 @@
                 </filter-sort-bar>
             </van-sticky>
 
-            <sort-list :empty="empty" :loading="loading" :finish="finish" :top="`44px - 172rpx + ${barHeight}px`">
+            <sort-list
+                emptyText="敬请期待"
+                :empty="empty"
+                :loading="loading"
+                :finish="finish"
+                :top="`44px - 172rpx + ${barHeight}px`"
+            >
                 <div class="product-list" v-if="showType === 'grid'">
                     <div class="clo-2" v-for="item in list" :key="item.id">
                         <product-grid :info="item"></product-grid>

+ 10 - 9
src/pagesHome/ProductList.vue

@@ -43,6 +43,9 @@
                         <product-grid :info="item"></product-grid>
                     </div>
                 </div>
+                <div class="product-list2" v-else>
+                    <product-row v-for="item in list" :key="item.id" :info="item"></product-row>
+                </div>
             </sort-list>
         </div>
     </div>
@@ -56,6 +59,7 @@ import ProductGrid from '../components/product/GridNormal';
 import ProductTagsFilter from '../components/filter/ProductTags';
 import ProductCategoryFilter from '../components/filter/ProductCategory';
 import CountryFilter from '../components/filter/Country';
+import ProductRow from '../components/product/RowNormal.vue';
 import { mapState } from 'vuex';
 export default {
     data() {
@@ -122,14 +126,6 @@ export default {
         }
         this.getData();
     },
-    onReady() {
-        this.main = wx.createSelectorQuery().select('#main');
-        this.main
-            .boundingClientRect(rect => {
-                this.searchTop = rect.top;
-            })
-            .exec();
-    },
     onReachBottom() {
         if (!this.loading && !this.finish) {
             this.page++;
@@ -143,7 +139,8 @@ export default {
         ProductTagsFilter,
         ProductCategoryFilter,
         CountryFilter,
-        SearchBar
+        SearchBar,
+        ProductRow
     },
     watch: {
         defaultCategoryId() {
@@ -192,4 +189,8 @@ export default {
         box-sizing: border-box;
     }
 }
+
+.product-list2 {
+    padding: 10px 16px;
+}
 </style>

+ 43 - 8
src/pagesImt/Connect.vue

@@ -7,21 +7,27 @@
             longitude="121.629521"
             :markers="markers"
             scale="18"
+            @callouttap="goLocation"
         >
+            <cover-view slot="callout">
+                <cover-view marker-id="1">
+                    <van-button :color="$colors.warn" size="small">去这里</van-button>
+                </cover-view>
+            </cover-view>
         </map>
 
         <div class="connect-box">
             <div class="connect-info">
                 <van-icon name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/footer_icon_dianhua.png" :size="20" />
-                <h3 class="fontNormal">025-8686-8686</h3>
+                <h3 class="fontNormal">{{ phone }}</h3>
             </div>
             <div class="connect-info">
-                <van-icon name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/footer_icon_dianhua.png" :size="20" />
-                <h3 class="fontNormal">imt86881@163.com</h3>
+                <van-icon name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/footer_icon_youjian.png" :size="20" />
+                <h3 class="fontNormal">{{ email }}</h3>
             </div>
-            <div class="connect-info">
-                <van-icon name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/footer_icon_dianhua.png" :size="20" />
-                <h3 class="fontNormal">中国(上海)自由贸易试验区富特东三路526号</h3>
+            <div class="connect-info" @click="goLocation">
+                <van-icon name="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/footer_icon_dizhi.png" :size="20" />
+                <h3 class="fontNormal link">中国(上海)自由贸易试验区富特东三路526号</h3>
             </div>
             <div class="btn">
                 <van-button :color="$colors.warn" block :radius="4" @click="takePhone">联系我们</van-button>
@@ -30,6 +36,7 @@
     </div>
 </template>
 <script>
+import { mapState } from 'vuex';
 export default {
     data() {
         return {
@@ -40,15 +47,30 @@ export default {
                     longitude: 121.629521,
                     iconPath: 'http://imt.oss-cn-hangzhou.aliyuncs.com/micro/icon_dingwei.png',
                     width: 24,
-                    height: 30
+                    height: 30,
+                    customCallout: {
+                        display: 'ALWAYS',
+                        anchorY: -10
+                    }
                 }
             ]
         };
     },
+    computed: {
+        ...mapState(['phone', 'email'])
+    },
     methods: {
         takePhone() {
             wx.makePhoneCall({
-                phoneNumber: '025-86868686' //仅为示例,并非真实的电话号码
+                phoneNumber: this.phone //仅为示例,并非真实的电话号码
+            });
+        },
+        goLocation() {
+            wx.openLocation({
+                latitude: 31.298919,
+                longitude: 121.629521,
+                name: 'imt机床展示区',
+                address: '中国(上海)自由贸易试验区富特东三路526号'
             });
         }
     }
@@ -66,6 +88,12 @@ export default {
     .connect-info {
         display: flex;
         align-items: center;
+        .van-icon {
+            margin-right: 10px;
+        }
+
+        // .link {
+        // }
     }
     .connect-info + .connect-info {
         margin-top: 18px;
@@ -79,4 +107,11 @@ export default {
         }
     }
 }
+
+.next {
+    position: absolute;
+    top: 102px;
+    left: 50%;
+    transform: translateX(-50%);
+}
 </style>

+ 20 - 8
src/pagesImt/Index.vue

@@ -8,7 +8,14 @@
 </config>
 <template>
     <div class="imt">
-        <custom-bar title="IMT平台" :pre="0" :fixed="false" :barTop="300"></custom-bar>
+        <custom-bar
+            :title="title"
+            :pre="0"
+            :dark="active === 0"
+            :topHide="active === 0"
+            :fixed="false"
+            :barTop="300"
+        ></custom-bar>
 
         <template v-if="active === 0">
             <div class="banner">
@@ -73,15 +80,15 @@
 
         <connect v-if="active === 3"></connect>
 
-        <bottom v-model="active" v-if="showBottom"></bottom>
+        <bottom v-model="active" v-show="showBottom"></bottom>
     </div>
 </template>
 <script>
 import Banner from '../components/Banner';
-import CustomBar from '../components/bar/CustomBar';
+import CustomBar from '../components/bar/CustomBar.vue';
 import Title from '../components/imt/Title';
 import Core from '../components/imt/Core';
-import Bottom from '../components/imt/Bottom';
+import Bottom from '../components/imt/Bottom.vue';
 import Advantage from './Advantage';
 import Service from './Service';
 import Connect from './Connect';
@@ -89,7 +96,6 @@ export default {
     data() {
         return {
             barTop: 100,
-            ratio: 0,
             showBottom: false,
             scrollTop: 0,
             banners: [
@@ -152,12 +158,18 @@ export default {
                     title: '特色平台',
                     sub: '权威、专业',
                     content:
-                        '瞄准科技前沿和高端产业,上海集中推出26个面积在3至5平方公里的特色产业园区,我们被评选为智能制造板块8个特色园区之一,将在上海市经信委智能制造产业推进处的专业指导下全力打造智能制造产业发展新高地。<br/>凭借着一直坚持为客户提供的长短结合的展示推广服务经验,我们获批成为中国国际进口博览会智能及高端设备板块中唯一“6天+365天”常年展示交易平台。'
+                        '瞄准科技前沿和高端产业,上海集中推出26个面积在3至5平方公里的特色产业园区,我们被评选为智能制造板块8个特色园区之一,将在上海市经信委智能制造产业推进处的专业指导下全力打造智能制造产业发展新高地。凭借着一直坚持为客户提供的长短结合的展示推广服务经验,我们获批成为中国国际进口博览会智能及高端设备板块中唯一“6天+365天”常年展示交易平台。'
                 }
             ],
             active: 0
         };
     },
+    computed: {
+        title() {
+            const list = ['IMT概况', 'IMT优势', 'IMT服务', '联系我们'];
+            return list[this.active];
+        }
+    },
     onLoad() {
         setTimeout(() => {
             this.showBottom = true;
@@ -203,7 +215,7 @@ export default {
     }
 
     .text {
-        padding: 6px 12px;
+        padding: 6px 10px;
         position: relative;
         h4 {
             color: #61edff;
@@ -230,7 +242,7 @@ export default {
     background: #ffffff;
     border-radius: 4px;
     margin: 16px 33px 0;
-    padding: 30px 12px;
+    padding: 30px 10px;
 
     .p1 {
         font-size: 14px;

+ 3 - 3
src/pagesImt/ServiceDetail.vue

@@ -30,13 +30,13 @@
             <p>{{ caseInfo.content }}</p>
         </div>
 
-        <div class="case" v-if="!cases">
+        <!-- <div class="case" v-if="!cases">
             <van-empty
                 image="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/kong_img_default.png"
                 description="暂无案例展示"
             >
             </van-empty>
-        </div>
+        </div> -->
     </div>
 </template>
 <script>
@@ -89,7 +89,7 @@ export default {
 
 <style lang="less" scoped>
 .service {
-    padding: 0 16px;
+    padding: 0 15px;
 }
 .info {
     display: flex;

+ 11 - 8
src/pagesMine/Activity.vue

@@ -4,9 +4,15 @@
 }
 </config>
 <template>
-    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px + 172rpx">
+    <sort-list
+        :empty="showListEmpty"
+        emptyText="未参加任何活动哦"
+        :loading="loading"
+        :finish="finish"
+        :top="`0px + ${barHeight}px`"
+    >
         <div class="list">
-            <block v-for="item in list" :key="item.id">
+            <block v-for="item in showList" :key="item.id">
                 <news-grid :info="item.information" userActivity></news-grid>
             </block>
         </div>
@@ -31,7 +37,7 @@ export default {
         };
     },
     computed: {
-        ...mapState(['userInfo']),
+        ...mapState(['userInfo', 'barHeight']),
         listQuery() {
             return {
                 query: { userId: this.userInfo.id }
@@ -39,11 +45,7 @@ export default {
         },
         showList() {
             return [...this.list].filter(item => {
-                if (Number(this.isEnd)) {
-                    return item.information.isEnd;
-                } else {
-                    return !item.information.isEnd;
-                }
+                return item.information;
             });
         },
         showListEmpty() {
@@ -54,6 +56,7 @@ export default {
             } else {
                 return false;
             }
+            // return true;
         }
     },
     mixins: [searchList],

+ 1 - 1
src/pagesMine/ChangePsd.vue

@@ -75,7 +75,7 @@ export default {
             }
 
             this.$http
-                .post('/user/setPasswprd', {
+                .post('/user/setPassword', {
                     password: this.password
                 })
                 .then(res => {

+ 62 - 5
src/pagesMine/Collect.vue

@@ -21,23 +21,59 @@
                     </div>
                 </div>
 
-                <van-button size="small" :color="$colors.warn" plain>编辑</van-button>
+                <div class="flex1"></div>
+                <block v-if="isEdit">
+                    <van-button size="small" v-if="chooseList.length > 0" :color="$colors.warn" @click="del" plain
+                        >删除</van-button
+                    >
+                    <van-button
+                        size="small"
+                        :color="$colors.info"
+                        @click="
+                            isEdit = false;
+                            chooseList = [];
+                        "
+                        plain
+                        >取消</van-button
+                    >
+                </block>
+                <van-button size="small" v-else :color="$colors.warn" @click="isEdit = true" plain>编辑</van-button>
             </div>
         </van-sticky>
         <sort-list
             emptyImg="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/kong_img_shouchang.png"
+            emptyText="当前暂无收藏哦~"
             :empty="empty"
             :loading="loading"
             :finish="finish"
             :top="`88rpx + ${barHeight} px`"
         >
             <div class="product-list" v-if="type === 'PRODUCT'">
-                <product-row v-for="item in list" :info="item" :key="item.id"></product-row>
+                <product-row
+                    v-for="item in list"
+                    :info="item"
+                    :key="item.id"
+                    :chooseList.sync="chooseList"
+                    :isChoose="isEdit"
+                ></product-row>
             </div>
             <div class="product-list" v-else>
-                <vendor-row v-for="item in list" :info="item" :key="item.id"></vendor-row>
+                <vendor-row
+                    v-for="item in list"
+                    :info="item"
+                    :key="item.id"
+                    :chooseList.sync="chooseList"
+                    :isChoose="isEdit"
+                ></vendor-row>
             </div>
+
+            <template slot="emptyButton">
+                <van-button block :color="$colors.warn" @click="goHome">
+                    去逛逛
+                </van-button>
+            </template>
         </sort-list>
+        <van-dialog id="van-dialog" />
     </div>
 </template>
 <script>
@@ -53,7 +89,9 @@ export default {
         return {
             url: '/collect/my',
             httpType: 'get',
-            type: 'PRODUCT'
+            type: 'PRODUCT',
+            isEdit: false,
+            chooseList: []
         };
     },
     mixins: [searchList],
@@ -87,6 +125,25 @@ export default {
                 this.type = type;
                 this.refreash();
             }
+        },
+        del() {
+            this.dialog('确认要删除吗?', true)
+                .then(() => {
+                    return this.$http.post('/collect/batchCancel', {
+                        type: this.type,
+                        ids: this.chooseList.join(','),
+                        isCollect: true
+                    });
+                })
+                .then(res => {
+                    this.toast('删除成功', 'success');
+                    this.getData();
+                })
+                .catch(e => {
+                    if (e && e.error) {
+                        this.toast(e.error);
+                    }
+                });
         }
     },
     onReachBottom() {
@@ -152,7 +209,7 @@ page {
     }
 
     .product {
-        padding: 8px 12px;
+        // padding: 8px 12px;
     }
 
     .vendor + .vendor {

+ 15 - 5
src/pagesNews/News.vue

@@ -27,7 +27,7 @@
                 </div>
             </van-sticky>
 
-            <sort-list :empty="empty" :loading="loading" :finish="finish" top="44px">
+            <sort-list :empty="empty" emptyText="敬请期待" :loading="loading" :finish="finish" top="44px">
                 <div class="list">
                     <template v-if="pageType === 'bigImg'">
                         <block v-for="item in list" :key="item.id">
@@ -62,9 +62,12 @@ export default {
             ratio: 0,
             hotActive: 0,
             main: null,
-            url: '/information/typeList',
-            httpType: 'get',
-            noPage: true,
+            url: '/information/all',
+            formType: {
+                header: {
+                    'Content-Type': 'application/json'
+                }
+            },
             scrollTop: 0
         };
     },
@@ -82,7 +85,8 @@ export default {
         },
         listQuery() {
             return {
-                type: [...this.informations][this.hotActive].key
+                query: { type: [...this.informations][this.hotActive].key, status: 'PASS' },
+                sort: 'createdAt,desc'
             };
         },
         pageType() {
@@ -119,6 +123,12 @@ export default {
                 this.searchTop = rect.top - this.barHeight;
             })
             .exec();
+    },
+    onReachBottom() {
+        if (!this.loading && !this.finish) {
+            this.page++;
+            this.getData();
+        }
     }
 };
 </script>

+ 2 - 0
src/store/index.js

@@ -2,6 +2,8 @@ import Vuex from 'vuex';
 import http from '../plugins/http';
 export default new Vuex.Store({
     state: {
+        phone: '86-21-60797117',
+        email: 'imttech@itoc.com.cn',
         sessionKey: '',
         safeAreaTop: 0,
         safeAreaBottom: 0,

+ 14 - 6
src/styles/fonts.less

@@ -5,12 +5,12 @@
 
 @font-face {
     font-family: 'iconfont'; /* project id 2026145 */
-    src: url('//at.alicdn.com/t/font_2026145_vpadufm8f6i.eot');
-    src: url('//at.alicdn.com/t/font_2026145_vpadufm8f6i.eot?#iefix') format('embedded-opentype'),
-        url('//at.alicdn.com/t/font_2026145_vpadufm8f6i.woff2') format('woff2'),
-        url('//at.alicdn.com/t/font_2026145_vpadufm8f6i.woff') format('woff'),
-        url('//at.alicdn.com/t/font_2026145_vpadufm8f6i.ttf') format('truetype'),
-        url('//at.alicdn.com/t/font_2026145_vpadufm8f6i.svg#iconfont') format('svg');
+    src: url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.eot');
+    src: url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.eot?#iefix') format('embedded-opentype'),
+        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.woff2') format('woff2'),
+        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.woff') format('woff'),
+        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.ttf') format('truetype'),
+        url('//at.alicdn.com/t/font_2026145_z9cx7wscu1f.svg#iconfont') format('svg');
 }
 .iconfont {
     font-family: 'iconfont' !important;
@@ -37,3 +37,11 @@
 .iconfont-icon-xiangqingye_iocn_vs:before {
     content: '\e61b';
 }
+
+.iconfont-icon-arrow-up-filling:before {
+    content: '\e688';
+}
+
+.iconfont-icon-arrow-down-filling:before {
+    content: '\e689';
+}

+ 16 - 2
src/utils/appState.js

@@ -1,7 +1,21 @@
 const collectType = new Map([['PRODUCT', 'chan-pin'], ['VENDOR', 'chang-shang']]);
-const BrandSortType = new Map([['COMPOSITE', 'zong-he'], ['POPULARITY', 'ren-qi']]);
+const BrandSortType = new Map([
+    ['COMPOSITE', 'zong-he'],
+    ['POPULARITY', 'ren-qi'],
+    ['RECOMMEND', 'vip-tui-jian-qi-ye']
+]);
 
-const ProductSortType = new Map([['COMPOSITE', 'zong-he'], ['POPULARITY', 'ren-qi'], ['TIME', 'shi-jian']]);
+const ProductSortType = new Map([
+    ['COMPOSITE', 'zong-he'],
+    ['POPULARITY', 'ren-qi'],
+    [
+        'TIME',
+        {
+            name: 'fa-bu-shi-jian',
+            list: ['TIME', 'TIME_SEQUENCE']
+        }
+    ]
+]);
 
 const EnterpriseType = new Map([
     ['MANUFACTURER', 'sheng-chan-shang'],

+ 1 - 1
src/utils/imtPageInfo.js

@@ -53,7 +53,7 @@ const services = [
                     'http://imt.oss-cn-hangzhou.aliyuncs.com/case/imt_fuwu_zulin_case02_b.jpg',
                     'http://imt.oss-cn-hangzhou.aliyuncs.com/case/imt_fuwu_zulin_case02_c.jpg'
                 ],
-                name: 'Index',
+                name: 'INDEX',
                 content:
                     'INDEX集团起源于德国,是全球一流的数控车床制造商。2017年,INDEX集团入驻外高桥智能制造服务产业园,成立了全新的技术中心和展厅,新的技术服务中心为两层,建筑面积近1500平方米,白绿相间的简约设计极具现代感。宽敞通透的展厅中展示了因代克斯集团最新系列产品,并配以自主研发的数控机床控制系统——Xpanel i4.0进行生产实时管理系统演示。该技术中心集合公司运营管理、结算、设备展示、演示、销售、技术支持和培训等功能,并与其位于太仓的生产基地协同,可为亚太区客户提供更加完善的服务。'
             }