panhui %!s(int64=5) %!d(string=hai) anos
pai
achega
4d91310a7a

+ 2 - 2
project.config.json

@@ -171,7 +171,7 @@
                     "id": -1,
                     "name": "商品详情",
                     "pathName": "pagesProduct/Detail",
-                    "query": "id=7038",
+                    "query": "id=579",
                     "scene": null
                 },
                 {
@@ -220,7 +220,7 @@
                     "id": -1,
                     "name": "关于展商",
                     "pathName": "pagesVendor/Detail",
-                    "query": "id=6294",
+                    "query": "id=6784",
                     "scene": null
                 },
                 {

+ 2 - 2
src/components/FixedButton.vue

@@ -23,7 +23,7 @@ export default {
 <style lang="less">
 .bottomFixed {
     height: 60px;
-
+    z-index: 200;
     .btn-list {
         position: fixed;
         background-color: #fff;
@@ -31,7 +31,7 @@ export default {
         right: 0;
         bottom: 0;
         padding: 8px 10px;
-        z-index: 99;
+        z-index: 200;
         box-shadow: 0px -1px 2px 0px rgba(0, 0, 0, 0.04);
         display: flex;
         align-items: center;

+ 2 - 2
src/components/Member.vue

@@ -3,7 +3,7 @@
         <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 class="message-content">{{ content }}</div>
         </div>
         <div class="right">
             <div class="time" v-if="info.time">{{ time }}</div>
@@ -109,7 +109,7 @@ export default {
             text-overflow: ellipsis;
         }
 
-        .message {
+        .message-content {
             font-size: 12px;
             color: #878d99;
             line-height: 17px;

+ 8 - 1
src/components/filter/Application.vue

@@ -37,7 +37,7 @@ export default {
         valueList() {
             if (this.value) {
                 return this.value.split(',').map(item => {
-                    Number(item);
+                    return Number(item);
                 });
             } else {
                 return [];
@@ -54,6 +54,13 @@ export default {
     mounted() {
         this.$http.get('/productTag/application').then(res => {
             this.list = res;
+            if (this.value && this.chooseList.length === 0) {
+                this.$nextTick(() => {
+                    this.chooseList = [...this.valueList];
+                });
+            } else if (!this.value && this.chooseList.length !== 0) {
+                this.chooseList = [];
+            }
         });
     },
     methods: {

+ 4 - 1
src/components/vendor/Application.vue

@@ -1,5 +1,8 @@
 <template>
-    <div class="application " @click="$router.push(`/brandProductList?vendorInfoId=${storeId}&applicationField=${id}`)">
+    <div
+        class="application "
+        @click="navigateTo('/pagesHome/ProductList?vendorId=' + storeId + '&applicationField=' + id)"
+    >
         <van-image :src="bgs[index % 8]" :radius="4" :width="100" :height="120" fit="cover" />
         <div class="text">{{ name }}</div>
     </div>

+ 10 - 0
src/pages/Chat.vue

@@ -44,6 +44,16 @@ export default {
             this.adminId = res;
         });
     },
+    onShow() {
+        const app = getApp();
+        if (app.globalData.initialize) {
+            this.loginMethods();
+        } else {
+            app.globalData.initializeCallback = () => {
+                this.loginMethods();
+            };
+        }
+    },
     methods: {
         loginMethods() {
             this.$http.get('/email/my').then(res => {

+ 7 - 2
src/pages/Classify.vue

@@ -18,7 +18,7 @@
         <van-sticky :offset-top="0">
             <div class="navBar" :style="narStyle">
                 <div class="title">产品分类</div>
-                <van-search :value="search" shape="round" placeholder="搜索..." />
+                <van-search :value="search" @search="confirm" shape="round" placeholder="搜索..." />
             </div>
         </van-sticky>
         <div class="content">
@@ -54,7 +54,7 @@
                     block
                     v-for="item in nowCategory.children"
                     :key="item.id"
-                    @click="navigateTo('/pagesHome/ProductList?categoryIds=' + item.id)"
+                    @click="navigateTo('/pagesHome/ProductList?categoryIds=' + item.id, false)"
                     >{{ getName(item) }}</van-button
                 >
 
@@ -112,6 +112,11 @@ export default {
     },
     onReady() {
         this.left = wx.createSelectorQuery().select('#left');
+    },
+    methods: {
+        confirm(e) {
+            this.navigateTo('/pagesHome/ProductList?search=' + e.detail, false);
+        }
     }
 };
 </script>

+ 4 - 4
src/pages/My.vue

@@ -82,19 +82,19 @@
                 is-link
             />
 
-            <van-cell
+            <!-- <van-cell
                 custom-class="my-cell"
                 title="产品需求/成交单"
                 icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(3).png"
                 is-link
-            />
+            /> -->
 
-            <van-cell
+            <!-- <van-cell
                 custom-class="my-cell"
                 title="账户与安全"
                 icon="http://imt.oss-cn-hangzhou.aliyuncs.com/micro/info_icon_collect(4).png"
                 is-link
-            />
+            /> -->
         </van-cell-group>
 
         <auth-phone ref="auth" :info="wxInfo" :show.sync="showPhone"></auth-phone>

+ 17 - 3
src/pagesHome/ProductList.vue

@@ -67,7 +67,8 @@ export default {
             tagIds: '',
             applicationField: '',
             main: null,
-            ratio: 1
+            ratio: 1,
+            vendorInfoId: ''
         };
     },
     mixins: [searchList],
@@ -84,7 +85,10 @@ export default {
                 categoryIds: this.categoryIds || '',
                 countries: this.countries,
                 tagIds: this.tagIds,
-                applicationField: this.applicationField
+                applicationField: this.applicationField,
+                query: JSON.stringify({
+                    vendorInfoId: this.vendorInfoId
+                })
             };
         },
         filterQuery() {
@@ -103,8 +107,18 @@ export default {
         console.log(options);
         if (options.categoryIds) {
             this.categoryIds = options.categoryIds;
-            this.getData();
         }
+        if (options.applicationField) {
+            this.applicationField = options.applicationField;
+        }
+        if (options.search) {
+            this.search = options.search;
+            this.searchKey = options.search;
+        }
+        if (options.vendorId) {
+            this.vendorInfoId = options.vendorId;
+        }
+        this.getData();
     },
     onReady() {
         this.main = wx.createSelectorQuery().select('#main');

+ 2 - 2
src/pagesMine/Activity.vue

@@ -1,10 +1,10 @@
 <config>
 {
-'navigationBarTitleText': '浏览记录'
+'navigationBarTitleText': '我的活动'
 }
 </config>
 <template>
-    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px">
+    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px + 172rpx">
         <div class="list">
             <block v-for="item in list" :key="item.id">
                 <news-grid :info="item" userActivity></news-grid>

+ 1 - 1
src/pagesMine/ReadRecords.vue

@@ -4,7 +4,7 @@
 }
 </config>
 <template>
-    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px">
+    <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px + 172rpx">
         <div class="product-list">
             <div class="clo-2" v-for="item in list" :key="item.id">
                 <product-grid :info="item"></product-grid>

+ 27 - 8
src/pagesProduct/Detail.vue

@@ -89,7 +89,9 @@
                             <parameter :productId="productId"></parameter>
                         </div>
                     </van-tab>
-                    <van-tab title="PDF资料">PDF资料</van-tab>
+                    <van-tab title="PDF资料" v-if="productInfo.pdf">
+                        正在打开pdf...
+                    </van-tab>
                 </van-tabs>
             </div>
 
@@ -194,6 +196,13 @@ export default {
                     return Number(item.id);
                 })
                 .includes(Number(this.productId));
+        },
+        pdf() {
+            return this.productInfo.pdf
+                ? this.productInfo.pdf.split(',').filter(item => {
+                      return item;
+                  })
+                : [];
         }
     },
     onLoad(options) {
@@ -239,16 +248,26 @@ export default {
             }
             this.hotActive = e.detail.index;
             if (e.detail.index === 2) {
-                wx.downloadFile({
-                    // 示例 url,并非真实存在
-                    url: 'https://imt.oss-cn-hangzhou.aliyuncs.com/application/2020-11-13-16-57-03rREcAPTN.pdf',
+                wx.showActionSheet({
+                    itemList: [...this.pdf].map((item, index) => {
+                        return '查看pdf文件' + (index + 1);
+                    }),
                     success: res => {
-                        const filePath = res.tempFilePath;
                         this.hotActive = 0;
-                        wx.openDocument({
-                            filePath: filePath,
-                            success: res => {}
+                        wx.downloadFile({
+                            url: this.pdf[res.tapIndex],
+                            success: res => {
+                                const filePath = res.tempFilePath;
+
+                                wx.openDocument({
+                                    filePath: filePath,
+                                    success: res => {}
+                                });
+                            }
                         });
+                    },
+                    fail(res) {
+                        console.log(res.errMsg);
                     }
                 });
             }

+ 9 - 7
src/pagesVendor/About.vue

@@ -1,6 +1,6 @@
 <template>
     <div>
-        <banner :banners="banners" :height="180" :autoplay="false"></banner>
+        <banner v-if="vendorInfo.img" :banners="banners" :height="180" :autoplay="false"></banner>
 
         <div class="auto-content">
             <div class="box" style="order:0">
@@ -33,7 +33,12 @@
                         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}`)"
+                        @click="
+                            navigateTo(
+                                '/pagesHome/ProductList?vendorId=' + vendorInfo.id + '&categoryIds=' + item.id,
+                                false
+                            )
+                        "
                     >
                         {{ getName(item) }}
                     </div>
@@ -75,9 +80,7 @@
             <van-image :src="item" fit="widthFix" />
         </block>
 
-        <fixed-button v-if="showConnect">
-            <van-button :color="$colors.warn" block>咨询展商</van-button>
-        </fixed-button>
+        <div style="height:100px"></div>
     </div>
 </template>
 <script>
@@ -85,9 +88,8 @@ 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 },
+    components: { Banner, ProductGrid, Application, Case },
     data() {
         return {
             productList: [],

+ 96 - 29
src/pagesVendor/Detail.vue

@@ -9,6 +9,7 @@
   "van-sidebar": "../native/vant/sidebar/index",
   "van-sidebar-item": "../native/vant/sidebar-item/index"
 },
+'disableScroll': true
 }
 </config>
 <template>
@@ -16,44 +17,63 @@
         <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 class="fixed-top"></div>
+        <scroll-view
+            id="scroller"
+            @scroll="onScroll"
+            style="height:calc(100vh - 71px)"
+            :scroll-y="true"
+            class="scrollView"
+            efresher-background="#0F264D"
+        >
+            <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="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 class="main" id="main">
+                <van-sticky :scroll-top="scrollTop" :offset-top="offsetTop">
+                    <van-tabs :sticky="false" :line-height="0" @change="active = $event.detail.index">
+                        <van-tab title="关于展商"> </van-tab>
+                        <van-tab title="产品"> </van-tab>
+                        <!-- <van-tab title="新闻资讯"> </van-tab> -->
+                    </van-tabs>
+                </van-sticky>
+                <about v-if="active === 0" :vendorInfo="vendorInfo" :showConnect="showConnect"></about>
+                <product v-else-if="active === 1" :vendorInfo="vendorInfo" :fixedTop="searchTop"></product>
             </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>
+        </scroll-view>
+        <fixed-button v-if="showConnect && active === 0">
+            <van-button
+                :color="$colors.warn"
+                block
+                @click="navigateTo('/pagesVendor/Connect?vendorId=' + vendorInfo.id)"
+                >咨询展商</van-button
+            >
+        </fixed-button>
     </div>
 </template>
 <script>
 import SearchBar from '../components/bar/SearchBarWithValue.vue';
+import FixedButton from '../components/FixedButton.vue';
 import collection from '../mixins/collection';
 import About from './About.vue';
 import Product from './Product.vue';
 
 export default {
-    components: { SearchBar, About, Product },
+    components: { SearchBar, About, Product, FixedButton },
     data() {
         return {
             ratio: 1,
@@ -64,14 +84,38 @@ export default {
             vendorInfo: {},
             active: 0,
             searchTop: 0,
-            showConnect: false
+            showConnect: false,
+            scrollView: null,
+            main: null,
+            scrollTop: 0,
+            offsetTop: 0
         };
     },
     mixins: [collection],
     methods: {
-        submitSearch() {},
+        submitSearch(e) {
+            console.log(this.searchKey);
+            this.navigateTo(
+                '/pagesHome/ProductList?vendorId=' + this.vendorInfo.id + '&search=' + this.searchKey,
+                false
+            );
+        },
         loginMethods() {
             this.cId = this.$mp.options.id;
+        },
+        onScroll(event) {
+            wx.createSelectorQuery()
+                .select('#scroller')
+                .boundingClientRect(res => {
+                    this.scrollTop = event.detail.scrollTop;
+                    this.offsetTop = res.top;
+                })
+                .exec();
+            if (event.detail.scrollTop < 115) {
+                this.showConnect = false;
+            } else {
+                this.showConnect = true;
+            }
         }
     },
     onLoad(options) {
@@ -116,18 +160,25 @@ export default {
     .vendor-info {
         flex-grow: 1;
         padding: 0 8px;
+        overflow: hidden;
 
         .text1 {
             font-size: 15px;
             font-weight: bold;
             color: #ffffff;
             line-height: 24px;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
         }
 
         .text2 {
             font-size: 12px;
             color: #878d99;
             line-height: 17px;
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
         }
     }
 
@@ -156,5 +207,21 @@ export default {
 .main {
     --tabs-nav-background-color: @prim;
     --tab-text-color: #ffffffaa;
+    background-color: #fff;
+}
+
+.fixed-top {
+    height: 135px;
+    position: fixed;
+    top: 71px;
+    left: 0;
+    right: 0;
+    background-color: #0f264d;
+    z-index: 0;
+}
+
+.scrollView {
+    z-index: 2;
+    position: relative;
 }
 </style>

+ 16 - 9
src/pagesVendor/Product.vue

@@ -1,25 +1,24 @@
 <template>
-    <div class="productPage" style="height: calc(100vh - 71px - 44px);">
-        <div class="left-side">
+    <div class="productPage" style="min-height: calc(100vh - 71px - 44px);">
+        <scroll-view :scroll-top="scrollTop" :scroll-y="true" class="left-side" v-if="menus.length > 0">
             <van-sidebar :active-key="activeKey" @change="changeCustomCate">
                 <van-sidebar-item :title="getName(item)" :key="item.id" v-for="item in menus" />
             </van-sidebar>
-        </div>
+        </scroll-view>
 
         <div class="right">
-            <scroll-view :scroll-y="true" :scroll-x="false" style="height:calc(100vh - 71px - 44px);width:100%">
+            <sort-list :empty="empty" :loading="loading" :finish="finish" top="0px">
                 <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>
+            </sort-list>
         </div>
     </div>
 </template>
 <script>
 import searchList from '../mixins/searchList';
 import ProductRow from '../components/product/Row';
+import SortList from '../components/SortList.vue';
 export default {
     name: 'product',
     data() {
@@ -42,7 +41,10 @@ export default {
         listQuery() {
             return {
                 productSort: this.sort,
-                customCateId: this.customCateId
+                customCateId: this.customCateId,
+                query: JSON.stringify({
+                    vendorInfoId: this.vendorInfo.id
+                })
             };
         },
         customCateId() {
@@ -73,7 +75,8 @@ export default {
         }
     },
     components: {
-        ProductRow
+        ProductRow,
+        SortList
     }
 };
 </script>
@@ -109,6 +112,10 @@ export default {
     }
 }
 
+.list-row {
+    background-color: #fff;
+}
+
 .right {
     flex-grow: 1;
 }