Ver Fonte

求购搜索提示及买卖家页面

yangc há 7 anos atrás
pai
commit
276f9957a5

+ 4 - 5
assets/scss/mobileCenter.scss

@@ -9,11 +9,10 @@
     height: 1.8rem;
     line-height: 1.8rem;
     img {
-      height: 1.22rem;
-      margin-left: .15rem;
-      margin-right: .52rem;
+      max-height: 1.8rem;
+      margin: 0 auto;
     }
-    .s-title {
+    /*.s-title {
       font-size: .42rem;
       color: #3f84f6;
       line-height: .38rem;
@@ -26,7 +25,7 @@
         font-size: .28rem;
         color: #999;
       }
-    }
+    }*/
   }
   .seek-operation {
     height: 2.09rem;

+ 1 - 0
assets/scss/mobileCommon.scss

@@ -415,4 +415,5 @@ html {
   bottom: .98rem;
   width: 100%;
   background: #f1f3f6;
+  overflow-y: auto;
 }

+ 6 - 4
components/mobile/MobileHeader.vue

@@ -169,11 +169,13 @@
         } else if (this.startWith(val, '/mobile/shop')) {
           title = '店铺列表'
 //          this.rightIcon = 'phone'
-        } else if (this.startWith(val, '/mobile/center')) {
-          if (this.$route.query.type === 'saler') {
-            title = '卖家中心'
+        } else if (this.startWith(val, '/mobile/center/vendor/product')) {
+          if (this.$route.query.providerType === 'enterprise') {
+            title = '企业产品库'
+          } else if (this.$route.query.providerType === 'person') {
+            title = '个人产品库'
           } else {
-            title = '买家中心'
+            title = '在售产品'
           }
 //          this.rightIcon = 'phone'
         } else if (this.startWith(val, '/mobile/search')) {

+ 8 - 8
components/mobile/applyPurchase/PublishSeek.vue

@@ -99,14 +99,14 @@
     },
     watch: {
       showSayPriceBox: function (val, old) {
-        if (val) {
-          this.emptyForm()
-          document.body.style.position = 'fixed'
-          document.body.style.left = '0'
-          document.body.style.right = '0'
-        } else {
-          document.body.style.position = 'static'
-        }
+        this.emptyForm()
+//        if (val) {
+//          document.body.style.position = 'fixed'
+//          document.body.style.left = '0'
+//          document.body.style.right = '0'
+//        } else {
+//          document.body.style.position = 'static'
+//        }
       }
     },
     mounted () {

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

@@ -298,11 +298,11 @@
 <style lang="scss" scoped>
   .mobile-modal {
     .mobile-modal-box {
-      top: 5%;
+      top: 10%;
       left: 3%;
       right: 3%;
       width: 7rem;
-      bottom: 3%;
+      bottom: 10%;
       margin: 0 auto;
       .say-price {
         background: #f3f3f3;

+ 4 - 3
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -211,11 +211,12 @@
 <style lang="scss" scoped>
   .mobile-modal {
     .mobile-modal-box {
-      top: 5%;
+      top: 10%;
       left: 3%;
       right: 3%;
-      bottom: 5%;
-      width: auto;
+      width: 7rem;
+      bottom: 10%;
+      margin: 0 auto;
       .say-price-info {
         background: #f3f3f3;
         padding: .18rem 0 0 0;

+ 36 - 22
components/mobile/applyPurchase/SeekList.vue

@@ -33,7 +33,7 @@
               <span class="date">{{item.endDate | date}}</span>
             </div>
           </div>
-          <div class="fr">
+          <div class="fr" :class="{'no-btn': !isSelfSeek(item) && !canSayPrice(item) && !canSeeInfo(item)}">
             <p v-if="item.remainingTime > 0">剩余&nbsp;:
               <span v-if="getDay(item.remainingTime) > 0" v-text="getDay(item.remainingTime)"></span>
               <i v-if="getDay(item.remainingTime) > 0">&nbsp;天&nbsp;</i>
@@ -42,18 +42,15 @@
             </p>
             <p class="over-deadline" v-else>已截止</p>
             <!--<a v-if="!userType && item.quoted == 1">已报价</a>-->
-            <a v-if="!userType && item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && (user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU  && !item.inquiry.enterprise)))" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
-            <a v-if="!item.newId && (!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((item.inquiry && item.inquiry.enterprise && user.data.enterprise && (item.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && item.userUU == user.data.userUU)))))" @click="goSayPrice(item.itemId || item.id, index)">我要报价</a>
+            <a v-if="isSelfSeek(item)" class="self-publish" @click="onRemind('此为贵公司的求购')">我要报价</a>
+            <a v-if="canSayPrice(item)" @click="goSayPrice(item.itemId || item.id, index)">我要报价</a>
             <!--<a v-if="item.newId" class="self-publish" @click="onRemind('您已报价')">我要报价</a>-->
-            <a v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || item.quoted == 1 || item.newId" @click="goSayPriceInfo(item.newId || item.quteId || item.id, item.agreed, index)">查看报价</a>
+            <a v-if="canSeeInfo(item)" @click="goSayPriceInfo(item.newId || item.quteId || item.id, item.agreed, index)">查看报价</a>
           </div>
         </div>
       </li>
     </ul>
-    <div class="none-state" v-if="!purchaseManListData || purchaseManListData.length == 0 && !isDataChange">
-      <img src="/images/mobile/@2x/car@2x.png">
-      <p v-text="'抱歉,暂无求购信息'"></p>
-    </div>
+    <empty-status v-if="!purchaseManListData || purchaseManListData.length == 0 && !isDataChange" :type="isSearch ? 'search' : 'collect'" :text="isSearch ? `抱歉,暂无与“${keyword}”匹配的求购信息` : '抱歉,暂无求购信息'" :showLink="true"></empty-status>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
     <say-price :showSayPriceBox="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
     <say-price-info v-if="showSayPriceInfoBox" :agreed="agreed" @cancelSayPriceInfoAction="onSayPriceInfoCancel" :userType="userType"></say-price-info>
@@ -61,7 +58,7 @@
   </div>
 </template>
 <script>
-import { LoginBox, RemindBox } from '~components/mobile/common'
+import { LoginBox, RemindBox, EmptyStatus } from '~components/mobile/common'
 import { SayPrice, SayPriceInfo } from '~components/mobile/applyPurchase'
 export default {
   data() {
@@ -80,9 +77,10 @@ export default {
     LoginBox,
     SayPrice,
     RemindBox,
-    SayPriceInfo
+    SayPriceInfo,
+    EmptyStatus
   },
-  props: ['userType', 'seekType', 'purchaseManList', 'isDataChange'],
+  props: ['userType', 'seekType', 'purchaseManList', 'isDataChange', 'isSearch', 'keyword'],
   filters: {
     date: function(date) {
       if (date) {
@@ -197,6 +195,15 @@ export default {
     onRemind: function(str) {
       this.remindText = str
       this.timeoutCount++
+    },
+    isSelfSeek: function (item) {
+      return !this.userType && item.remainingTime > 0 && (!item.quoted || item.quoted !== 1) && (this.user.logged && ((item.inquiry && item.inquiry.enterprise && this.user.data.enterprise && (item.inquiry.enterprise.uu === this.user.data.enterprise.uu)) || (!this.user.data.enterprise.uu && item.userUU === this.user.data.userUU && !item.inquiry.enterprise)))
+    },
+    canSayPrice: function (item) {
+      return !item.newId && (!(this.userType === 'saler' && this.seekType && this.seekType !== 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted !== 1) && !(this.user.logged && ((item.inquiry && item.inquiry.enterprise && this.user.data.enterprise && (item.inquiry.enterprise.uu === this.user.data.enterprise.uu)) || (!this.user.data.enterprise.uu && item.userUU === this.user.data.userUU)))))
+    },
+    canSeeInfo: function (item) {
+      return ((!this.userType || this.userType === 'buyer') && (this.seekType && this.seekType !== 'wait')) || (this.userType === 'saler' && this.seekType && this.seekType !== 'wait') || item.quoted === 1 || item.newId
     }
   }
 }
@@ -204,7 +211,7 @@ export default {
 <style lang="scss" scoped>
   .seek-list {
     padding: .13rem .12rem 0;
-    background: #fff;
+    background: #f1f3f6;
 
     li {
       border: 1px solid #e0e0e4;
@@ -212,17 +219,19 @@ export default {
       margin: auto;
       margin-bottom: .2rem;
       max-width: 7.3rem;
+      background: #fff;
       > p {
-        font-size: .32rem;
+        font-size: .28rem;
         color: #3a3a3a;
-        background: #f8f7fa;
+        font-weight: bold;
+        /*background: #f8f7fa;*/
         height: .92rem;
         line-height: .92rem;
 
         span {
           display: block;
           width: 6.9rem;
-          border-bottom: 1px dashed #9f9f9f;
+          border-bottom: 1px solid #d3d3d3;
           margin: 0 auto;
         }
 
@@ -258,6 +267,11 @@ export default {
           width: 2.2rem;
           padding: .9rem 0 0 0;
 
+          &.no-btn {
+            padding-top: 0;
+            line-height: 3.18rem;
+          }
+
           p {
             font-size: .28rem;
             text-align: center;
@@ -279,15 +293,15 @@ export default {
           }
           a {
             display: block;
-            width: 1.64rem;
-            height: .58rem;
-            line-height: .58rem;
+            width: 1.7rem;
+            height: .47rem;
+            line-height: .47rem;
             text-align: center;
-            font-size: .32rem;
-            color: #e62f36;
-            border: 1px solid #ea494f;
+            font-size: .28rem;
+            color: #fff;
+            background: #008bf7;
             margin: .34rem auto 0;
-            border-radius: .06rem;
+            border-radius: .05rem;
 
             &.self-publish {
               background: rgb(204, 203, 203);

+ 12 - 7
components/mobile/center/Seek.vue

@@ -4,19 +4,19 @@
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <p>{{seekType === 'wait' ? '待报价' : '已报价'}}</p>
     </div>
-    <div class="mobile-content">
+    <div class="mobile-fix-content" id="mobileFixContent">
       <div class="search-content">
-        <input type="text" v-model="seekKeyword" placeholder="型号/品牌/类目/规格/公司" @keyup.13="onSearch">
+        <input type="text" v-model="seekKeyword" :placeholder="`型号/品牌${userType == 'buyer' ? '' : '/类目/规格/公司'}`" @keyup.13="onSearch">
         <span @click="onSearch"><i class="iconfont icon-sousuo"></i></span>
       </div>
-      <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData"></seek-list>
-      <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+      <seek-list :keyword="remindKeyword" :isSearch="isSearch" :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData"></seek-list>
+      <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
     </div>
   </div>
 </template>
 <script>
   import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
-  import { PullUp } from '~components/mobile/common'
+  import { PullUp, EmptyStatus } from '~components/mobile/common'
   export default {
     layout: 'mobileNoHeader',
     middleware: 'authenticated',
@@ -26,13 +26,16 @@
         purchaseManListData: [],
         page: 1,
         count: 10,
-        isChange: false
+        isChange: false,
+        isSearch: false,
+        remindKeyword: ''
       }
     },
     props: ['userType'],
     components: {
       SeekList,
-      PullUp
+      PullUp,
+      EmptyStatus
     },
     watch: {
       'purchase.data': {
@@ -64,6 +67,8 @@
     },
     methods: {
       onSearch: function () {
+        this.isSearch = true
+        this.remindKeyword = this.seekKeyword
         this.page = 1
         this.isChange = true
         this.reloadData()

+ 44 - 0
components/mobile/common/EmptyStatus.vue

@@ -0,0 +1,44 @@
+<template>
+  <div class="com-none-state" v-else>
+    <img :src="getImg()">
+    <p v-text="text"></p>
+    <nuxt-link to="/" v-if="showLink">返回首页</nuxt-link>
+  </div>
+</template>
+<script>
+  export default {
+    props: {
+      // 提示语
+      text: {
+        default: '暂无信息',
+        type: String
+      },
+      // 空状态类型,控制图片展示
+      type: {
+        default: 'collect',
+        type: String
+      },
+      // 是否展示返回首页
+      showLink: {
+        default: true,
+        type: Boolean
+      }
+    },
+    methods: {
+      getImg () {
+        if (this.type === 'collect') {
+          return '/images/mobile/@2x/empty-collect.png'
+        } else if (this.type === 'search') {
+          return '/images/mobile/@2x/search-empty.png'
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .com-none-state {
+    background: transparent;
+    padding: 1.5rem .5rem;
+    word-break: break-all;
+  }
+</style>

+ 16 - 4
components/mobile/common/PullUp.vue

@@ -3,19 +3,31 @@
 </template>
 <script>
   export default {
-    props: ['searchMore', 'allPage', 'page'],
+    props: ['searchMore', 'allPage', 'page', 'fixId'],
     mounted () {
       let _this = this
       _this.$nextTick(function () {
-        window.addEventListener('scroll', function () {
+        let obj = this.fixId ? document.getElementById(this.fixId) : window
+        obj.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.searchMore && this.page < this.allPage) {
+        let scrolled = 0
+        let height = 0
+//        console.log(document.getElementById(this.fixId).scrollHeight)
+//        console.log(document.getElementById(this.fixId).scrollTop + window.screen.availHeight + '-------')
+        if (this.fixId) {
+          let obj = document.getElementById(this.fixId)
+          height = obj.scrollHeight
+          scrolled = obj.scrollTop - 88
+        } else {
+          height = document.body.scrollHeight
+          scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
+        }
+        if (Math.ceil(scrolled + window.screen.availHeight) >= height && !this.searchMore && this.page < this.allPage) {
           this.getMore()
         }
       },

+ 2 - 1
components/mobile/common/index.js

@@ -3,4 +3,5 @@ import RemindBox from './RemindBox.vue'
 import LoginBox from './LoginBox.vue'
 import userHeader from './userHeader.vue'
 import PullUp from './PullUp.vue'
-export { Loading, RemindBox, LoginBox, userHeader, PullUp }
+import EmptyStatus from './EmptyStatus.vue'
+export { Loading, RemindBox, LoginBox, userHeader, PullUp, EmptyStatus }

+ 1 - 1
components/mobile/store/StoreDetail.vue

@@ -41,7 +41,7 @@
         </li>
         <li>
           <div>店铺地址:</div>
-          <div v-if="store.enterprise.enAddress">{{store.enterprise.enAddress}}</div>
+          <div v-if="store.enterprise.address">{{store.enterprise.address}}</div>
           <div v-else><span>-</span></div>
         </li>
       </ul>

+ 1 - 1
components/supplier/resource.vue

@@ -228,7 +228,7 @@
     methods: {
       // 格式化字符串长度
       spliceString (str, length) {
-        return spliceStr(str, length)
+        return str && str.length ? spliceStr(str, length) : '暂无信息'
       },
       // 跳转到器件详情页面
       jumpDetail (id) {

+ 1 - 1
nuxt.config.js

@@ -1,7 +1,7 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
 // b2c后台
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://192.168.253.121:9090/platform-b2c')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://api.usoftmall.com/' : 'http://10.1.51.124:8080/platform-b2c')
 // 公共询价
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 // 公共物料

+ 1 - 1
pages/help/home.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <help-header></help-header>
-  <div id="main">
+    <div id="main">
     <div class="container" style="padding: 0; width: 1190px;">
       <div style="display: inline-block; width: 100%; margin: 0 auto">
         <div class="left">

+ 25 - 22
pages/mobile/applyPurchase/list/businessOpportunity.vue

@@ -3,7 +3,7 @@
     <div class="mobile-header">
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <div class="search-content">
-        <input type="text" v-model="seekKeyword" placeholder="型号/品牌/类目/规格/公司" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
+        <input type="text" v-model="seekKeyword" placeholder="型号/品牌/类目/规格/公司" @keyup.13="searchSeek">
         <span @click="searchSeek">
         <i class="iconfont icon-sousuo"></i>
         </span>
@@ -14,23 +14,25 @@
       <span>我的商机</span>
     </div>
     <seek-list v-if="purchaseManListData && purchaseManListData.length" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
-    <div class="com-none-state" v-else>
-      <img src="/images/mobile/@2x/car@2x.png">
-      <p>上传物料至个人物料库,可获得更多的商机哦!</p>
-      <nuxt-link to="/">返回首页</nuxt-link>
-    </div>
+
+    <empty-status :type="isSearch ? 'search' : 'collect'"
+                  :text="isSearch ? `抱歉,暂无与“${remindKeyword}”匹配的求购信息`: '上传物料至个人物料库,可获得更多的商机哦!'"
+                  :showLink="true"
+                  v-else
+    ></empty-status>
     <loading v-show="isSearchSearchingMore"></loading>
     <div v-if="purchaseManList && false"></div>
   </div>
 </template>
 <script>
   import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
-  import {Loading} from '~components/mobile/common'
+  import {Loading, EmptyStatus} from '~components/mobile/common'
   export default {
     layout: 'mobile',
     components: {
       SeekList,
-      Loading
+      Loading,
+      EmptyStatus
     },
     data () {
       return {
@@ -41,7 +43,9 @@
         showSeekSearch: true,
         seekKeyword: '',
         isChange: false,
-        isDataChange: false
+        isDataChange: false,
+        isSearch: false,
+        remindKeyword: ''
       }
     },
     mounted: function () {
@@ -88,16 +92,16 @@
           this.$refs.searchSeekInput.blur()
         }
       },
-      blur: function() {
-        // setTimeout(() => {
-        this.$store.dispatch('mobile/SetInputGetFocus', false)
-        // }, 300)
-      },
-      inputGetFocus: function() {
-        setTimeout(() => {
-          this.$store.dispatch('mobile/SetInputGetFocus', true)
-        }, 300)
-      },
+//      blur: function() {
+//        // setTimeout(() => {
+//        this.$store.dispatch('mobile/SetInputGetFocus', false)
+//        // }, 300)
+//      },
+//      inputGetFocus: function() {
+//        setTimeout(() => {
+//          this.$store.dispatch('mobile/SetInputGetFocus', true)
+//        }, 300)
+//      },
       getMoreSearch: function () {
         this.page++
         this.isSearchSearchingMore = true
@@ -106,10 +110,9 @@
       reloadData: function () {
         this.$store.dispatch('applyPurchase/loadVendorPushList', {pageNumber: this.page, pageSize: this.size, sorting: {'releaseDate': 'DESC'}, keyword: this.seekKeyword, enuu: this.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, useruu: this.user.data.userUU})
       },
-      goLastPage: function () {
-        window.history.back(-1)
-      },
       searchSeek: function () {
+        this.isSearch = true
+        this.remindKeyword = this.seekKeyword
         this.page = 1
         this.isChange = true
         this.reloadData()

+ 8 - 17
pages/mobile/applyPurchase/list/index.vue

@@ -3,7 +3,7 @@
     <div class="mobile-header">
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <div class="search-content">
-        <input type="text" v-model="seekKeyword" :placeholder="user.logged ? '型号/品牌/类目/规格/公司' : '型号/品牌/类目/规格'" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
+        <input type="text" v-model="seekKeyword" :placeholder="user.logged ? '型号/品牌/类目/规格/公司' : '型号/品牌/类目/规格'" @keyup.13="searchSeek">
         <span @click="searchSeek">
         <i class="iconfont icon-sousuo"></i>
         </span>
@@ -13,8 +13,8 @@
       <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
       <span>最新求购信息</span>
     </div>
-    <seek-list :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
-    <loading v-show="isSearchSearchingMore"></loading>
+    <seek-list :isSearch="isSearch" :keyword="remindKeyword" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
+    <!--<loading v-show="isSearchSearchingMore"></loading>-->
     <div v-if="purchaseManList && false"></div>
   </div>
 </template>
@@ -36,7 +36,9 @@
         showSeekSearch: true,
         seekKeyword: '',
         isChange: false,
-        isDataChange: false
+        isDataChange: false,
+        isSearch: false,
+        remindKeyword: ''
       }
     },
     mounted: function () {
@@ -83,16 +85,6 @@
           this.$refs.searchSeekInput.blur()
         }
       },
-      blur: function() {
-        // setTimeout(() => {
-        this.$store.dispatch('mobile/SetInputGetFocus', false)
-        // }, 300)
-      },
-      inputGetFocus: function() {
-        setTimeout(() => {
-          this.$store.dispatch('mobile/SetInputGetFocus', true)
-        }, 300)
-      },
       getMoreSearch: function () {
         this.page++
         this.isSearchSearchingMore = true
@@ -101,10 +93,9 @@
       reloadData: function () {
         this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.page, pageSize: this.size, sorting: {'releaseDate': 'DESC'}, keyword: this.seekKeyword, enUU: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null, isLogin: this.user.logged ? '1' : '0'})
       },
-      goLastPage: function () {
-        window.history.back(-1)
-      },
       searchSeek: function () {
+        this.isSearch = true
+        this.remindKeyword = this.seekKeyword
         this.page = 1
         this.isChange = true
         this.reloadData()

+ 13 - 6
pages/mobile/center/user/collect/component.vue

@@ -4,9 +4,9 @@
       <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
       <p>器件收藏</p>
     </div>
-    <div class="mobile-content">
+    <div class="mobile-fix-content" id="mobileFixContent">
       <ul v-if="compList && compList.length">
-        <li v-for="comp in compList">
+        <li :key="comp.componentid" v-for="comp in compList" @click="goUrl('/mobile/brand/componentDetail/' + comp.componentinfo.uuid)">
           <div class="fl">
             <p>型号:<span v-text="comp.componentinfo.code"></span></p>
             <p>品牌:<span v-text="comp.componentinfo.brand.nameCn"></span></p>
@@ -19,14 +19,15 @@
           </div>
         </li>
       </ul>
+      <empty-status :type="'collect'" :showLink="true" :text="'抱歉,暂无器件收藏'" v-else></empty-status>
     </div>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
-    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+    <pull-up :fixId="'mobileFixContent'" :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
     <publish-supplier-seek :product="componentSeekObj" :showPublishBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="onRemind"></publish-supplier-seek>
   </div>
 </template>
 <script>
-  import { RemindBox, PullUp } from '~components/mobile/common'
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
   import { PublishSupplierSeek } from '~components/mobile/applyPurchase'
   export default {
     middleware: 'authenticated',
@@ -82,7 +83,8 @@
     components: {
       RemindBox,
       PullUp,
-      PublishSupplierSeek
+      PublishSupplierSeek,
+      EmptyStatus
     },
     methods: {
       onRemind: function (str) {
@@ -118,12 +120,16 @@
         this.componentSeekObj.kind = item.componentinfo.kind.nameCn
         this.componentSeekObj = JSON.parse(JSON.stringify(this.componentSeekObj))
         this.showPublishBox = true
+      },
+      goUrl: function (url) {
+        console.log(url)
+        this.$router.push(url)
       }
     }
   }
 </script>
 <style lang="scss" scoped>
-  .mobile-content {
+  .mobile-fix-content {
     ul {
       width: 7.1rem;
       margin: 0 auto;
@@ -133,6 +139,7 @@
         border: 1px solid #ccc;
         margin: .25rem 0 0 0;
         position: relative;
+        background: #fff;
         .fl {
           width: 4.71rem;
           color: #666;

+ 5 - 3
pages/mobile/center/user/collect/store.vue

@@ -5,7 +5,7 @@
       <p>店铺关注</p>
     </div>
     <div class="mobile-content">
-      <div class="shop-list" v-bind:key="item.id" v-for="item in storeList" @click="goStoreDetail(item.storeInfo.uuid)">
+      <div v-if="storeList.length" class="shop-list" v-bind:key="item.id" v-for="item in storeList" @click="goStoreDetail(item.storeInfo.uuid)">
         <h3>{{item.storeName}}</h3>
         <div class="list-item">
           <div class="item-img">
@@ -20,6 +20,7 @@
           </div>
         </div>
       </div>
+      <empty-status v-if="!storeList.length" :type="'collect'" :showLink="true" :text="'抱歉,暂无店铺关注'"></empty-status>
     </div>
     <div class="mobile-modal" v-if="showStoreInfo">
       <div class="mobile-modal-box">
@@ -37,7 +38,7 @@
   </div>
 </template>
 <script>
-  import { RemindBox, PullUp } from '~components/mobile/common'
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
   export default {
     middleware: 'authenticated',
     layout: 'mobileNoHeader',
@@ -85,7 +86,8 @@
     },
     components: {
       RemindBox,
-      PullUp
+      PullUp,
+      EmptyStatus
     },
     methods: {
       onRemind: function (str) {

+ 1 - 5
pages/mobile/center/user/index.vue

@@ -6,11 +6,7 @@
     </div>
     <div class="mobile-fix-content">
       <div class="seek-banner block-wrap">
-        <img src="/images/mobile/center/user/seek-banner.jpg" alt="">
-        <p class="s-title inline-block">我要求购&nbsp;&nbsp;<span>满足你所需</span>
-        <br/>
-        <span class="s-text">让订单飞起来</span>
-        </p>
+        <img src="/images/mobile/center/adv.png" alt="">
       </div>
       <div class="block-wrap seek-operation">
         <p><i></i>我的求购</p>

+ 7 - 11
pages/mobile/center/vendor/index.vue

@@ -6,27 +6,23 @@
     </div>
     <div class="mobile-fix-content">
       <div class="seek-banner block-wrap">
-        <img src="/images/mobile/center/user/seek-banner.jpg" alt="">
-        <p class="s-title inline-block">我要求购&nbsp;&nbsp;<span>满足你所需</span>
-          <br/>
-          <span class="s-text">让订单飞起来</span>
-        </p>
+        <img src="/images/mobile/center/adv.png" alt="">
       </div>
       <div class="block-wrap seek-operation">
         <p><i></i>产品管理</p>
         <ul>
-          <li>
+          <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=enterprise">
             <img src="/images/mobile/center/vendor/material.png" alt="">
             <p>企业产品库</p>
-          </li>
-          <li>
+          </nuxt-link>
+          <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=person">
             <img src="/images/mobile/center/vendor/material-person.png" alt="">
             <p>个人产品库</p>
-          </li>
-          <li>
+          </nuxt-link>
+          <nuxt-link tag="li" to="/mobile/center/vendor/product?providerType=onLine">
             <img src="/images/mobile/center/vendor/onsale.png" alt="">
             <p>在售产品</p>
-          </li>
+          </nuxt-link>
         </ul>
       </div>
       <div class="block-wrap seek-operation">

+ 84 - 45
pages/mobile/center/vendor/product.vue

@@ -1,15 +1,15 @@
 <template>
   <div class="user-content">
     <div class="provider">
-      <div class="seek">
+      <!--<div class="seek">
         <ul class="seek-type" >
           <li :class="{active: providerType == 'enterprise'}" style="width: 33.3%" @click="switchprovide('enterprise')"><div>企业产品库</div></li>
           <li :class="{active: providerType == 'person'}" style="width: 33.3%" @click="switchprovide('person')"><div>个人产品库</div></li>
           <li :class="{active: providerType == 'onLine'}" style="width: 33.3%" @click="switchprovide('onLine')"><div>在售产品</div></li>
         </ul>
-      </div>
+      </div>-->
       <div class="search-content" style="border-bottom: 1px solid #f5f5f5;padding-bottom: 0.25rem">
-        <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek" ref="searchSeekInput" @focus="inputGetFocus()" @blur="blur()">
+        <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek">
         <span @click="searchSeek" >
           <i class="iconfont icon-sousuo"></i>
           </span>
@@ -49,12 +49,19 @@
             <div class="text">
               {{item.code}}
             </div>
-            <div class="pms">
-              <!--{{(storeInfo.uuid != 'undefind' && item.storeid == storeInfo.uuid && storeInfo.storeName.indexOf('优软测试二') < 0 && storeInfo.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'}}-->
-              {{(shopuuid.uuid != 'undefind' && item.storeid == shopuuid.uuid && shopuuid.storeName.indexOf('优软测试二') < 0 && shopuuid.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'}}
-            </div>
+           <!-- <div class="pms">
+              {{item.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}
+            </div>-->
+            <img class="store-type" v-if="item.storeid === '33069557578d44e69bd91ad12d28a8d4'" src="/images/mobile/product/consignment.png" alt="">
+            <img class="store-type" src="/images/mobile/product/self.png" alt="" v-else >
           </div>
           <div class="middle">
+            <div class="list list-long">
+              <div class="fl">
+                <div class="name">规格:</div>
+                <div class="text">{{item.spec || '-'}}</div>
+              </div>
+            </div>
             <div class="list">
               <div class="fl">
                 <div class="name">类目(产品名称):</div>
@@ -78,7 +85,7 @@
 
             <div class="list">
               <div class="fl">
-                <div class="name">包装数:</div>
+                <div class="name">最小包装数:</div>
                 <div class="text">{{item.minPackQty}}</div>
               </div>
               <div class="fr">
@@ -93,7 +100,7 @@
                 <div class="text">{{item.packaging || '无包装信息'}}</div>
               </div>
               <div class="fr">
-                <div class="name">起订量:</div>
+                <div class="name">最小起订量:</div>
                 <div class="text" style="color: #f31919">{{item.minBuyQty}}</div>
               </div>
             </div>
@@ -121,10 +128,11 @@
             </div>
 
           </div>
-          <div class="labelinfo">
+          <!--<div class="labelinfo">
             <div class="labelicon">标签</div>
             <div class="labeltext">{{item.tag}}</div>
-          </div>
+          </div>-->
+          <div class="label-text">{{item.tag || '暂无标签信息'}}</div>
         </div>
       </div>
     </div>
@@ -149,16 +157,23 @@
                   <div class="fl">
                     <div class="name">
                       <div class="pms">
-                        {{(shopuuid.uuid != 'undefind' && item.storeid == shopuuid.uuid && shopuuid.storeName.indexOf('优软测试二') < 0 && shopuuid.storeName.indexOf('优软商城') < 0) ? '自营' : '寄售'}}</div>
+                        {{item.storeid === '33069557578d44e69bd91ad12d28a8d4' ? '寄售' : '自营'}}
+                      </div>
                     </div>
                   </div>
                   <div class="fr">
                     <div class="textinfo" v-if="item.breakUp">可拆卖</div>
                   </div>
                 </div>
+                <div class="list list-long">
+                  <div class="fl">
+                    <div class="name">规格:</div>
+                    <div class="text">{{item.spec || '-'}}</div>
+                  </div>
+                </div>
                 <div class="list">
                   <div class="fl">
-                    <div class="name">包装数量:</div>
+                    <div class="name">最小包装数:</div>
                     <div class="text">{{item.minPackQty}}</div>
                   </div>
                   <div class="fr">
@@ -185,7 +200,7 @@
                     <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
                   </div>
                   <div class="fr">
-                    <div class="name">起订量:</div>
+                    <div class="name">最小起订量:</div>
                     <div class="text" style="color: #f31919">{{item.minBuyQty}}</div>
                   </div>
                 </div>
@@ -229,13 +244,12 @@
       <p>暂无数据</p>
       <nuxt-link to="/">返回首页</nuxt-link>
     </div>
-    <loading v-show="isSearchSearchingMore"></loading>
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 
 <script>
-  import { RemindBox, Loading } from '~components/mobile/common'
+  import { RemindBox } from '~components/mobile/common'
   export default {
     layout: 'mobile',
     middleware: 'authenticated',
@@ -244,7 +258,7 @@
       return {
         GetEnterpriseListData: [],
         seekPage: 1,
-        providerType: 'enterprise',
+        providerType: this.$route.query.providerType,
         showMoreinfn: false,
         showDelete: false,
         isSearchSearchingMore: false,
@@ -260,9 +274,9 @@
       scroll: function () {
         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
 
-        if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
-          this.$refs.searchSeekInput.blur()
-        }
+//        if (this.$refs.searchSeekInput && this.$store.state.mobile.InputGetFocus) {
+//          this.$refs.searchSeekInput.blur()
+//        }
         if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.seekPage < this.EnterprisePage) {
           this.getMoreSearch()
         }
@@ -279,16 +293,16 @@
       reloadData: function () {
         this.getResourceProvidor()
       },
-      blur: function() {
-        setTimeout(() => {
-          this.$store.dispatch('mobile/SetInputGetFocus', false)
-        }, 300)
-      },
-      inputGetFocus: function() {
-        setTimeout(() => {
-          this.$store.dispatch('mobile/SetInputGetFocus', true)
-        }, 300)
-      },
+//      blur: function() {
+//        setTimeout(() => {
+//          this.$store.dispatch('mobile/SetInputGetFocus', false)
+//        }, 300)
+//      },
+//      inputGetFocus: function() {
+//        setTimeout(() => {
+//          this.$store.dispatch('mobile/SetInputGetFocus', true)
+//        }, 300)
+//      },
       getMoreSearch: function () {
         this.seekPage++
         this.isSearchSearchingMore = true
@@ -458,8 +472,7 @@
       this.getResourceProvidor()
     },
     components: {
-      RemindBox,
-      Loading
+      RemindBox
     }
   }
 </script>
@@ -827,10 +840,9 @@
     }
   }
   .providerList {
-    border-top: 1px solid #e0e0e4;
-    border-bottom: 1px solid #e0e0e4;
-    margin-bottom: 0.24rem;
+    border-top: .31rem solid #f1f3f7;
     .top {
+      position: relative;
       &.top2 {
         .text {
           width: 5.4rem;
@@ -848,6 +860,13 @@
           float: right;
           margin-top: 0.25rem;
         }
+        .store-type {
+          width: .77rem;
+          height: .77rem;
+          position: absolute;
+          right: 0;
+          top: 0;
+        }
       }
       .icon {
         width: 0.6rem;
@@ -879,7 +898,8 @@
         white-space: nowrap;
       }
       padding: 0 0.24rem;
-      background: #f5f9fd;
+      /*background: #f5f9fd;*/
+      border-bottom: 1px solid #d3d3d3;
       height: 0.9rem;
       line-height: 0.9rem;
       color: #0067e7;
@@ -1012,6 +1032,11 @@
         text-overflow: ellipsis;
         white-space: nowrap;
       }
+      &.list-long {
+        .fl {
+          width: 100% !important;
+        }
+      }
       .name {
         color: #666;
         font-size: 0.3rem;
@@ -1024,11 +1049,13 @@
       }
       .table {
         width: 5.5rem;
-        margin-bottom: 0px;
-        margin-top: -.1rem;
+        margin-bottom: 0;
+        margin-top: 0;
         li {
-          height: 0.6rem;
-          line-height: 0.6rem;
+          height: 0.43rem;
+          line-height: 0.43rem;
+          border-left: .01rem solid #c5c5c5;
+          font-size: .28rem;
           &::after {
             clear: both;
             display: block;
@@ -1039,10 +1066,12 @@
           div {
             text-align: center;
             width: 50%;
-            float: left
+            float: left;
+            border-right: .01rem solid #c5c5c5;
+            border-bottom: .01rem solid #c5c5c5;
           }
           &:nth-child(odd) {
-            background: #f7f7f7;
+            background: #ddd;
             color: #666;
             font-size: 0.28rem;
           }
@@ -1055,8 +1084,8 @@
             color: #f31919;
           }
           &.title {
-            font-size: 0.3rem;
-            color: #666;
+            font-size: 0.28rem;
+            color: #333;
           }
         }
       }
@@ -1092,6 +1121,16 @@
       /*vertical-align: middle;*/
     }
   }
+  .label-text {
+    padding: .09rem .21rem;
+    border-radius: .22rem;
+    background: #ddd;
+    font-size: .26rem;
+    color: #666;
+    display: inline-block;
+    margin-left: .22rem;
+    margin-bottom: .25rem;
+  }
   .deleteKuang {
     position: fixed;
     background: rgba(0,0,0,0.5);
@@ -1214,7 +1253,7 @@
         width: 6.4rem;
         margin: 0.1rem auto;
         background: #fff;
-        padding: 0.2rem 0rem;
+        padding: 0.2rem 0;
         .list {
           margin-bottom: 0.18rem;
         }

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

@@ -219,7 +219,7 @@
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.enFax || this.storeInfo.enterprise.enFax === '' || !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
+        if (this.storeInfo.enterprise.enFax && this.storeInfo.enterprise.enFax !== '' && !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
           this.collectResult = '请输入正确的传真'
           this.timeoutCount++
           return false
@@ -229,17 +229,17 @@
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.enPhone || this.storeInfo.enterprise.enPhone === '' || !/^1[3|4|5|6|7|8|9][0-9]{9}$/.test(this.storeInfo.enterprise.enPhone)) {
+        if (this.storeInfo.enterprise.enPhone && this.storeInfo.enterprise.enPhone !== '' && !/^1[3|4|5|6|7|8|9][0-9]{9}$/.test(this.storeInfo.enterprise.enPhone)) {
           this.collectResult = '请输入正确的手机号码'
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.enWeixin || this.storeInfo.enterprise.enWeixin === '' || !/^[0-9a-zA-Z]{6,20}$/.test(this.storeInfo.enterprise.enWeixin)) {
+        if (this.storeInfo.enterprise.enWeixin && this.storeInfo.enterprise.enWeixin !== '' && !/^[0-9a-zA-Z]{6,20}$/.test(this.storeInfo.enterprise.enWeixin)) {
           this.collectResult = '请输入正确的微信号'
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.enQQ || this.storeInfo.enterprise.enQQ === '' || !/^[1-9][0-9]{4,10}$/.test(this.storeInfo.enterprise.enQQ)) {
+        if (this.storeInfo.enterprise.enQQ && this.storeInfo.enterprise.enQQ !== '' && !/^[1-9][0-9]{4,10}$/.test(this.storeInfo.enterprise.enQQ)) {
           this.collectResult = '请输入正确的QQ号'
           this.timeoutCount++
           return false

BIN
static/images/mobile/center/adv.png


BIN
static/images/mobile/product/consignment.png


BIN
static/images/mobile/product/self.png