yangc 7 éve
szülő
commit
e3a7e625b9

+ 57 - 73
components/mobile/Home.vue

@@ -1,63 +1,60 @@
 <template>
-  <div>
-    <scroll :data="purchaseManListData" class="home" :pullup="true" @scrollToEnd="scrollToEnd">
-      <div v-if="!showMainSearch">
-        <div class="header">
-          <div v-swiper:mySwiper="swiperOption">
-            <div class="swiper-wrapper">
-              <div class="swiper-slide">
-                <img class="home-bg" src="/images/mobile/@2x/applyPurchase/home/app-banner_01.jpg" alt="">
-              </div>
-              <div class="swiper-slide">
-                <img class="home-bg" src="/images/mobile/@2x/applyPurchase/home/app-banner_02.jpg" alt="">
-              </div>
+  <div class="home">
+    <div v-if="!showMainSearch">
+      <div class="header">
+        <div v-swiper:mySwiper="swiperOption">
+          <div class="swiper-wrapper">
+            <div class="swiper-slide">
+              <img class="home-bg" src="/images/mobile/@2x/applyPurchase/home/app-banner_01.jpg" alt="">
+            </div>
+            <div class="swiper-slide">
+              <img class="home-bg" src="/images/mobile/@2x/applyPurchase/home/app-banner_02.jpg" alt="">
             </div>
-            <div class="swiper-pagination swiper-pagination-bullets"></div>
           </div>
-          <div class="search-content">
-            <input type="text" placeholder="请输入您要查找的型号、品牌或店铺" @click="onHomeSearchClick()">
-            <span>
+          <div class="swiper-pagination swiper-pagination-bullets"></div>
+        </div>
+        <div class="search-content">
+          <input type="text" placeholder="请输入您要查找的型号、品牌或店铺" @click="onHomeSearchClick()">
+          <span>
           <i class="iconfont icon-sousuo"></i>
         </span>
-            <img src="/images/mobile/@2x/applyPurchase/home/phone.png" alt="" @click="showStoreInfo = true">
-          </div>
-        </div>
-        <ul class="link-list">
-          <li>
-            <nuxt-link to="/mobile/supplier">
-              <img src="/images/mobile/@2x/home/supplier.png" alt="">
-              <span>供应商</span>
-            </nuxt-link>
-          </li>
-          <li>
-            <a @click="goOpportunity">
-              <img src="/images/mobile/@2x/home/seek.png" alt="">
-              <span>我的商机</span>
-            </a>
-          </li>
-          <li>
-            <nuxt-link to="/mobile/shop">
-              <img src="/images/mobile/@2x/home/store.png" alt="">
-              <span>店铺列表</span>
-             <!-- <i></i>-->
-            </nuxt-link>
-          </li>
-          <li>
-            <nuxt-link to="/mobile/brand/brandCenter/A">
-              <img src="/images/mobile/@2x/home/brand.png" alt="">
-              <span>品牌墙</span>
-            </nuxt-link>
-          </li>
-        </ul>
-        <div class="seek-title">
-          <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
-          <span>最新求购信息</span>
-          <nuxt-link to="/mobile/applyPurchase/list">查看更多 <img src="/images/mobile/@2x/applyPurchase/home/arrow-right.png" alt=""></nuxt-link>
+          <img src="/images/mobile/@2x/applyPurchase/home/phone.png" alt="" @click="showStoreInfo = true">
         </div>
-        <seek-list :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
-        <Loading v-show="this.page < this.allPage"></Loading>
       </div>
-    </scroll>
+      <ul class="link-list">
+        <li>
+          <nuxt-link to="/mobile/supplier">
+            <img src="/images/mobile/@2x/home/supplier.png" alt="">
+            <span>供应商</span>
+          </nuxt-link>
+        </li>
+        <li>
+          <a @click="goOpportunity">
+            <img src="/images/mobile/@2x/home/seek.png" alt="">
+            <span>我的商机</span>
+          </a>
+        </li>
+        <li>
+          <nuxt-link to="/mobile/shop">
+            <img src="/images/mobile/@2x/home/store.png" alt="">
+            <span>店铺列表</span>
+            <!-- <i></i>-->
+          </nuxt-link>
+        </li>
+        <li>
+          <nuxt-link to="/mobile/brand/brandCenter/A">
+            <img src="/images/mobile/@2x/home/brand.png" alt="">
+            <span>品牌墙</span>
+          </nuxt-link>
+        </li>
+      </ul>
+      <div class="seek-title">
+        <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
+        <span>最新求购信息</span>
+        <nuxt-link to="/mobile/applyPurchase/list">查看更多 <img src="/images/mobile/@2x/applyPurchase/home/arrow-right.png" alt=""></nuxt-link>
+      </div>
+      <seek-list :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
+    </div>
     <div class="mobile-modal" v-if="showStoreInfo">
       <div class="mobile-modal-box">
         <div class="mobile-modal-header">联系方式<i @click="showStoreInfo = false" class="icon-guanbi iconfont"></i></div>
@@ -77,8 +74,7 @@
 <script>
   import SeekList from './applyPurchase/SeekList.vue'
   import MainSearch from '~/components/mobile/search/MainSearch.vue'
-  import { RemindBox, LoginBox, Loading } from '~components/mobile/common'
-  import Scroll from '~components/common/scroll/scroll'
+  import { RemindBox, LoginBox } from '~components/mobile/common'
   export default {
     data () {
       return {
@@ -113,9 +109,7 @@
       SeekList,
       MainSearch,
       RemindBox,
-      LoginBox,
-      Scroll,
-      Loading
+      LoginBox
     },
     mounted: function () {
       this.$nextTick(() => {
@@ -153,14 +147,11 @@
       }
     },
     methods: {
-      scrollToEnd() {
-        this.getMoreSearch()
-      },
       scroll: function () {
-        // let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        // if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
-        //   this.getMoreSearch()
-        // }
+         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
+         if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.page < this.allPage) {
+           this.getMoreSearch()
+         }
       },
       onHomeSearchClick () {
         this.showMainSearch = true
@@ -197,15 +188,8 @@
 </script>
 <style lang="scss">
   .home {
-    /*padding-bottom: 1rem;*/
+    padding-bottom: 1rem;
     background: #f3f3f7;
-    position: absolute;
-    bottom: 1rem;
-    width: 100%;
-    left: 0;
-    right: 0;
-    top: 0;
-    overflow: hidden;
     .header {
       height: 3.26rem;
       position: relative;

+ 3 - 2
components/mobile/MobileFooter.vue

@@ -42,6 +42,7 @@
 <script>
   import { scrollTo } from '~utils/scroll'
   import {LoginBox, RemindBox} from '~components/mobile/common'
+  import { startWith } from '~utils/baseUtils'
 //  import PublishSeek from './applyPurchase/PublishSeek.vue'
   export default{
     name: 'MobileFooter',
@@ -71,9 +72,9 @@
           return 'shops'
         } else if (path === '/mobile/user') {
           return 'user'
-        } else if (path === '/mobile/center/user') {
+        } else if (startWith(path, '/mobile/center/user')) {
           return 'userCenter'
-        } else if (path === '/mobile/center/vendor') {
+        } else if (startWith(path, '/mobile/center/vendor')) {
           return 'vendorCenter'
         } else {
           return ''

+ 7 - 7
components/mobile/applyPurchase/SayPrice.vue

@@ -92,13 +92,13 @@
     },
     watch: {
       showSayPriceBox: function (val, old) {
-        // if (val) {
-        //   document.body.style.position = 'fixed'
-        //   document.body.style.left = '0'
-        //   document.body.style.right = '0'
-        // } else {
-//        document.body.style.position = 'relative'
-        // }
+         if (val) {
+           document.body.style.position = 'fixed'
+           document.body.style.left = '0'
+           document.body.style.right = '0'
+         } else {
+          document.body.style.position = 'static'
+         }
         this.resetSayPrice()
       }
     },

+ 0 - 51
components/mobile/common/PullDown.vue

@@ -1,51 +0,0 @@
-<template>
-  <div class="loading" v-show="isSearchingMore">
-    <img src="/images/all/loading.gif" alt="">
-  </div>
-</template>
-<script>
-  export default {
-    data () {
-      return {
-        isSearchingMore: false,
-        searchLists: [],
-        page: 1
-      }
-    },
-    props: ['searchMore', 'allPage', 'count'],
-    mounted: function () {
-      let _this = this
-      _this.$nextTick(function () {
-        window.addEventListener('scroll', function () {
-          _this.scroll()
-        }, false)
-      })
-    },
-    methods: {
-      scroll: function () {
-        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchingMore && this.page < this.allPage) {
-          this.getMore()
-        }
-      },
-      getMore: function () {
-        if (!this.isSearchingMore) {
-          this.page++
-          this.isSearchingMore = true
-          this.searchMore(this.page, this.count)
-        }
-      }
-    }
-  }
-</script>
-<style lang="scss" scoped>
-  .loading {
-    text-align: center;
-    background: #fff;
-    >img {
-      width: .64rem;
-      height: .64rem;
-      margin: .2rem 0;
-    }
-  }
-</style>

+ 0 - 0
components/common/scroll/scroll.vue → components/mobile/common/scroll.vue


+ 8 - 10
pages/mobile/center/vendor/product.vue

@@ -282,12 +282,10 @@
         }
       },
       searchSeek: function () {
-        if (this.activeType === 'provider') {
-          this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
-          this.GetEnterpriseListData = null
-          this.GetEnterpriseListData = []
-          this.seekPage = 1
-        }
+        this.GetEnterpriseListData.splice(0, this.GetEnterpriseListData.length)
+        this.GetEnterpriseListData = null
+        this.GetEnterpriseListData = []
+        this.seekPage = 1
         this.reloadData()
       },
       reloadData: function () {
@@ -389,18 +387,21 @@
             this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
             this.EnterprisePage = res.data.totalPages
             this.isSearchSearchingMore = false
+            console.log(this.GetEnterpriseListData)
           })
         } else if (this.providerType === 'person') {
           this.GetPersonList().then(res => {
             this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
             this.EnterprisePage = res.data.totalPages
             this.isSearchSearchingMore = false
+            console.log(this.GetEnterpriseListData)
           })
         } else if (this.providerType === 'onLine') {
           this.GetOnlineList().then(res => {
             this.GetEnterpriseListData = this.GetEnterpriseListData.concat(res.data.content)
             this.EnterprisePage = res.data.totalPages
             this.isSearchSearchingMore = false
+            console.log(this.GetEnterpriseListData)
           })
         }
       },
@@ -448,10 +449,7 @@
         return ''
       },
       cnmpType() { // 类目
-        if (this.chooseItem.kinden) {
-          return this.chooseItem.kinden
-        }
-        return ''
+        return this.chooseItem.kind || this.chooseItem.kinden || '-'
       },
       cnmpBand() { // 品牌
         if (this.chooseItem.pbranden) {

+ 1 - 1
pages/mobile/shop/index.vue

@@ -54,7 +54,7 @@
 <script>
   import {RemindBox, Loading, LoginBox} from '~components/mobile/common'
   export default {
-    layout: 'mobile',
+    layout: 'mobileNoHeader',
     data () {
       return {
         page: 1,

+ 9 - 9
pages/mobile/user/storeinfo.vue

@@ -18,12 +18,12 @@
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.storeName || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <input v-model="storeInfo.storeName" type="text"/>
                   </div>
                 </li>
                 <li class="clearfix" :class="{border:  storeState !== 'look'}">
-                  <div class="name pull-left" :class="{update: storeState !== 'look'}">简介:</div>
+                  <div class="name pull-left" :class="{update: storeState !== 'look'}">主营产品:</div>
                   <div class="text pull-left clearfix" v-if="storeState === 'look'">
                     {{Islook ? dealWithText(storeInfo.description) : dealWithText()}}
                     <a class="pull-right" @click="dealWithText2('open')" v-show="Islook">
@@ -38,11 +38,11 @@
                   </div>
                 </li>
                 <li class="clearfix" :class="{border:  storeState !== 'look'}">
-                  <div class="name pull-left" :class="{update: storeState !== 'look'}">企业地址:</div>
+                  <div class="name pull-left" :class="{update: storeState !== 'look'}">店铺地址:</div>
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.address || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <textarea v-model="storeInfo.enterprise.address" maxlength="50" ref="addTextarea"></textarea>
                     <!--<input v-model="storeInfo.enterprise.address" type="text" maxlength="50"/>-->
                   </div>
@@ -52,7 +52,7 @@
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.enTel || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <input v-model="storeInfo.enterprise.enTel" type="text" maxlength="20"/>
                   </div>
                 </li>
@@ -61,7 +61,7 @@
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.enFax || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <input v-model="storeInfo.enterprise.enFax" type="text" maxlength="20"/>
                   </div>
                 </li>
@@ -70,7 +70,7 @@
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.enPhone || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <input v-model="storeInfo.enterprise.enPhone" type="text" maxlength="11"/>
                   </div>
                 </li>
@@ -79,7 +79,7 @@
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.enWeixin || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <input v-model="storeInfo.enterprise.enWeixin" type="text" maxlength="20"/>
                   </div>
                 </li>
@@ -88,7 +88,7 @@
                   <div class="text pull-left" v-if="storeState === 'look'">
                     {{storeInfo.enterprise.enQQ || '暂无信息'}}
                   </div>
-                  <div v-else class="text pull-left">
+                  <div class="text pull-left" v-else>
                     <input v-model="storeInfo.enterprise.enQQ" type="text" maxlength="11"/>
                   </div>
                 </li>