Browse Source

新增分享求购

shenjj 7 years ago
parent
commit
e6e6420845
100 changed files with 5736 additions and 2200 deletions
  1. 17 14
      .eslintrc.js
  2. 10 3
      Dockerfile
  3. 0 22
      README.md
  4. 12 8
      app.html
  5. 2 2
      assets/scss/common.scss
  6. 129 9
      assets/scss/mobileCommon.scss
  7. 0 1
      assets/scss/reset.scss
  8. 6 6
      assets/scss/variables.scss
  9. 665 597
      components/applyPurchase/ApplyInfo.vue
  10. 919 418
      components/applyPurchase/BatchPublish.vue
  11. 85 77
      components/applyPurchase/PublishApply.vue
  12. 5 3
      components/applyPurchase/SayPrice.vue
  13. 3 73
      components/common/buyOrCar/buyComponent.vue
  14. 4 1
      components/common/loading/Loading.vue
  15. 1 1
      components/default/Footer.vue
  16. 1 1
      components/default/Header.vue
  17. 89 0
      components/error/error.vue
  18. 3 0
      components/error/index.js
  19. 12 12
      components/home/Advert.vue
  20. 2 0
      components/home/News.vue
  21. 15 11
      components/home/floor/FloorList.vue
  22. 40 6
      components/main/Search.vue
  23. 2 2
      components/main/index.js
  24. 66 0
      components/main/vendorHeader.vue
  25. 133 246
      components/mobile/Home.vue
  26. 288 0
      components/mobile/HomeOld.vue
  27. 58 14
      components/mobile/MobileFooter.vue
  28. 24 6
      components/mobile/MobileHeader.vue
  29. 453 0
      components/mobile/applyPurchase/PublishSeek.vue
  30. 400 0
      components/mobile/applyPurchase/SayPrice.vue
  31. 300 0
      components/mobile/applyPurchase/SayPriceInfo.vue
  32. 284 0
      components/mobile/applyPurchase/SeekList.vue
  33. 4 0
      components/mobile/applyPurchase/index.js
  34. 19 1
      components/mobile/common/LoginBox.vue
  35. 2 2
      components/mobile/common/RemindBox.vue
  36. 1 20
      components/mobile/share/store/StoreHeader.vue
  37. 123 7
      components/product/brand/BrandComponent.vue
  38. 4 9
      components/register-saler/Register.vue
  39. 330 303
      components/register-saler/register/StepFirst.vue
  40. 2 2
      components/register-saler/register/StepThird.vue
  41. 31 5
      components/store/BaseInfo.vue
  42. 3 73
      components/store/CommodityInfo.vue
  43. 3 71
      components/store/RecommendProduct.vue
  44. 35 3
      components/store/common/StoreHeader.vue
  45. 42 12
      layouts/main.vue
  46. 18 4
      nuxt.config.js
  47. 2 1
      package.json
  48. 1 0
      pages/applyPurchase/_id.vue
  49. 14 6
      pages/applyPurchase/result.vue
  50. 4 1
      pages/index.vue
  51. 19 0
      pages/mobile/applyPurchase/list/_id.vue
  52. 139 0
      pages/mobile/applyPurchase/list/index.vue
  53. 19 0
      pages/mobile/applyPurchase/sayPrice/_id.vue
  54. 456 0
      pages/mobile/share/purChase/_uuid.vue
  55. 326 93
      pages/mobile/user/index.vue
  56. 2 6
      pages/product/brand/_code.vue
  57. 53 33
      pages/product/component/_uuid.vue
  58. 1 1
      pages/product/kind/_id.vue
  59. 1 4
      pages/register-saler/index.vue
  60. 6 7
      pages/vendor/index.vue
  61. 10 1
      plugins/axios.js
  62. 14 0
      plugins/mixin.js
  63. 22 0
      plugins/vue-filter.js
  64. 1 1
      post.sh
  65. 1 1
      server.js
  66. BIN
      static/images/404-details.png
  67. BIN
      static/images/all/banner-cuxiao001.jpg
  68. BIN
      static/images/all/select-icon-full.png
  69. BIN
      static/images/applyPurchase/batch-icon.png
  70. BIN
      static/images/applyPurchase/link-buyer.png
  71. BIN
      static/images/applyPurchase/select2.png
  72. BIN
      static/images/floor/banner01.jpg
  73. BIN
      static/images/floor/banner02.jpg
  74. BIN
      static/images/mobile/@2x/applyPurchase/add-btn.png
  75. BIN
      static/images/mobile/@2x/applyPurchase/currency-arrow-down.png
  76. BIN
      static/images/mobile/@2x/applyPurchase/currency-arrow-up.png
  77. BIN
      static/images/mobile/@2x/applyPurchase/home/app-banner_01.jpg
  78. BIN
      static/images/mobile/@2x/applyPurchase/home/app-banner_02.jpg
  79. BIN
      static/images/mobile/@2x/applyPurchase/home/arrow-right.png
  80. BIN
      static/images/mobile/@2x/applyPurchase/home/brand.png
  81. BIN
      static/images/mobile/@2x/applyPurchase/home/home-bg.png
  82. BIN
      static/images/mobile/@2x/applyPurchase/home/phone.png
  83. BIN
      static/images/mobile/@2x/applyPurchase/home/seek-footer.png
  84. BIN
      static/images/mobile/@2x/applyPurchase/home/seek-title.png
  85. BIN
      static/images/mobile/@2x/applyPurchase/home/seek.png
  86. BIN
      static/images/mobile/@2x/applyPurchase/home/shop.png
  87. BIN
      static/images/mobile/@2x/applyPurchase/say-price-accept.png
  88. BIN
      static/images/mobile/@2x/applyPurchase/say-price-check.png
  89. BIN
      static/images/mobile/@2x/applyPurchase/say-price-default.png
  90. BIN
      static/images/mobile/@2x/applyPurchase/sub-btn.png
  91. BIN
      static/images/mobile/@2x/purChase/Isend.png
  92. BIN
      static/images/mobile/@2x/purChase/Issend.png
  93. BIN
      static/images/mobile/@2x/purChase/banner.png
  94. BIN
      static/images/mobile/@2x/purChase/code.png
  95. BIN
      static/images/mobile/@2x/purChase/codebg.png
  96. BIN
      static/images/mobile/@2x/purChase/money_icon.png
  97. BIN
      static/images/mobile/@2x/purChase/purChase_bg.png
  98. BIN
      static/images/mobile/@2x/purChase/time.png
  99. BIN
      static/images/store/common/goIn.png
  100. BIN
      static/images/vendor/edit.png

+ 17 - 14
.eslintrc.js

@@ -1,16 +1,19 @@
 module.exports = {
-	root: true,
-	parser: 'babel-eslint',
-	env: {
-		browser: true,
-		node: true
-	},
-	extends: 'standard',
-	// required to lint *.vue files
-	plugins: [
-		'html'
-	],
-	// add your custom rules here
-	rules: {},
-	globals: {}
+  root: true,
+  parser: 'babel-eslint',
+  env: {
+    browser: true,
+    node: true
+  },
+  extends: 'standard',
+  // required to lint *.vue files
+  plugins: [
+    'html'
+  ],
+  // add your custom rules here
+  rules: {
+    "space-before-function-paren": [0, "ignore"],
+    "indent": 'off'
+  },
+  globals: {}
 }

+ 10 - 3
Dockerfile

@@ -1,4 +1,5 @@
-FROM 10.10.100.200:5000/node-webpack:0.0.1
+#FROM 10.10.100.200:5000/node-webpack:0.0.1
+FROM 10.10.100.200:5000/node-yarn:8.10-alpine
 
 RUN mkdir -p /app
 WORKDIR /app
@@ -7,7 +8,13 @@ COPY . /app
 
 RUN chmod +x run.sh
 
-RUN cnpm install
-RUN npm run build
+RUN npm install -g node-gyp
+RUN yarn
+
+RUN export SASS_BINARY_PATH=linux_musl-x64-57_binding.node
+RUN export PATH=$PATH:$SASS_BINARY_PATH
+
+#RUN cnpm install
+#RUN npm run build
 
 CMD [ "/app/run.sh" ]

+ 0 - 22
README.md

@@ -1,22 +0,0 @@
-# mall-web-ssr
-
-> mall web project
-
-## Build Setup
-
-``` bash
-# install dependencies
-$ npm install # Or yarn install
-
-# serve with hot reload at localhost:3000
-$ npm run dev
-
-# build for production and launch server
-$ npm run build
-$ npm start
-
-# generate static project
-$ npm run generate
-```
-
-For detailed explanation on how things work, checkout the [Nuxt.js docs](https://github.com/nuxt/nuxt.js).

+ 12 - 8
app.html

@@ -1,13 +1,13 @@
 <!DOCTYPE html>
 <html {{ HTML_ATTRS }}>
+
 <head>
-  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
-  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
-  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css"/>
+  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" />
+  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" />
+  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css" />
   <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>-->
-  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_crpyz8n3b4qxs9k9.css">
-  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css"/>
-  {{ HEAD }}
+  <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_fhw1qsxh5yfa8aor.css">
+  <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css" /> {{ HEAD }}
   <script>
     var _hmt = _hmt || [];
     var _paq = _paq || [];
@@ -54,6 +54,7 @@
         var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
         g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
       <!-- End Piwik Code -->
+/*
       if (/(iPhone|iPad|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone)/ig.test(w.navigator.userAgent) || w.location.pathname.indexOf('mobile/share') > -1) {
         var docEl = d.documentElement
         var resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize'
@@ -71,12 +72,15 @@
         w.addEventListener(resizeEvt, recalc, false)
         d.addEventListener('DOMContentLoaded', recalc, false)
       }
+*/
     })(window, document)
   </script>
   <script type="text/javascript">
   </script>
 </head>
+
 <body {{ BODY_ATTRS }}>
-{{ APP }}
+  {{ APP }}
 </body>
-</html>
+
+</html>

+ 2 - 2
assets/scss/common.scss

@@ -1,7 +1,7 @@
 // scroll
 ::-webkit-scrollbar {
-  width: .5rem;
-  height: .5rem;
+  width: 6px;
+  height: 6px;
   background: hsla(0, 0%, 100%, 0.6);
 }
 

+ 129 - 9
assets/scss/mobileCommon.scss

@@ -1,7 +1,14 @@
+
 html {
   overflow-y: scroll;
   -webkit-text-size-adjust: 100%;
   -ms-text-size-adjust: 100%;
+  font-size: 75px;
+}
+@media screen and (max-width: 750px){
+  html{
+    font-size: calc(100vw / 750 * 100);
+  }
 }
 
 html * {
@@ -17,6 +24,11 @@ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fiel
   padding: 0;
 }
 
+/* 设置顶层fontSize */
+// html {
+//   font-size: calc(100vw / 750 * 100) !important;
+// }
+
 input, select, textarea {
   font-size: 100%;
 }
@@ -94,16 +106,18 @@ ins, a {
 .mobile-modal {
   position: fixed;
   top: 0;
-  width: 100%;
-  height: 100%;
+  bottom: 0;
+  left: 0;
+  right: 0;
   z-index: 999;
-  background: rgba(0,0,0,.3);
+  background: rgba(0,0,0,.4);
   .mobile-modal-box {
-    position: fixed;
-    width: 5.92rem;
+    position: absolute;
+    /*width: 5.92rem;*/
     font-size: .28rem;
     top: 27%;
     left: 11%;
+    right: 11%;
     z-index: 1000;
     .mobile-modal-header {
       line-height: .96rem;
@@ -112,8 +126,8 @@ ins, a {
       text-align: center;
       font-size: .32rem;
       position: relative;
-      border-top-left-radius: .1rem;
-      border-top-right-radius: .1rem;
+      border-top-left-radius: .07rem;
+      border-top-right-radius: .07em;
       i {
         position: absolute;
         right: -.25rem;
@@ -125,8 +139,8 @@ ins, a {
       background: #fff;
       color: #333;
       padding: 0 .54rem;
-      border-bottom-left-radius: .1rem;
-      border-bottom-right-radius: .1rem;
+      border-bottom-left-radius: .07rem;
+      border-bottom-right-radius: .07rem;
       div {
         padding: .2rem 0;
         line-height: .4rem;
@@ -190,6 +204,11 @@ input {
   -webkit-appearance: none;
   -moz-appearance: none;
   appearance: none;
+  outline: none;
+  -webkit-box-shadow: none;
+  -moz-box-shadow: none;
+  box-shadow: none;
+  border: none;
 }
 
 /*loading优先级*/
@@ -199,4 +218,105 @@ input {
 
 .mobile-content {
   padding-top: .88rem !important;
+  margin-bottom: 1rem;
+}
+
+/*求购title*/
+.seek-title {
+  height: .96rem;
+  line-height: .96rem;
+  text-align: center;
+  position: relative;
+  border-bottom: .02rem solid rgb(219, 219, 219);
+  > img {
+    width: .36rem;
+    height: .38rem;
+    margin-right: .16rem;
+    vertical-align: middle;
+    margin-bottom: .16rem;
+  }
+  > span {
+    font-size: .35rem;
+    color: #666;
+  }
+  > a {
+    position: absolute;
+    right: .1rem;
+    top: 0;
+    font-size: .24rem;
+    color: #999;
+    margin-right: .1rem;
+    img {
+      width: .25rem;
+      height: .25rem;
+      margin-bottom: .04rem;
+    }
+  }
+}
+
+/*search*/
+.search-content {
+  padding-top: .15rem;
+  input {
+    width: 6.48rem;
+    height: .58rem;
+    line-height: .58rem;
+    border-radius: .14rem;
+    margin: 0 0 0 .11rem;
+    font-size: .26rem;
+    padding: 0 0 0 .21rem;
+  }
+  span {
+    display: inline-block;
+    height: .58rem;
+    line-height: .58rem;
+    position: relative;
+    top: .04rem;
+    width: .68rem;
+    color: #376ff3;
+    border-left: .02rem solid #376ff3;
+    margin-left: -.68rem;
+    text-align: center;
+    i {
+      font-size: .31rem;
+    }
+  }
+  img {
+    width: .44rem;
+    height: .44rem;
+    float: right;
+    margin-right: .2rem;
+    margin-top: .1rem;
+  }
+}
+/*报价info*/
+.base-info {
+  //width: 7.17rem;
+  margin: 0 auto .18rem;
+  background: #fff;
+  padding: .1rem .29rem;
+  .content-line {
+    height: .46rem;
+    line-height: .46rem;
+    font-size: .28rem;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    span {
+      color: #666;
+    }
+  }
+}
+
+.say-price-btn {
+  display: block;
+  width: 6.7rem;
+  height: .74rem;
+  line-height: .74rem;
+  text-align: center;
+  color: #fff !important;
+  background: #3f84f6;
+  border-radius: .08rem;
+  font-size: .32rem;
+  margin: 0 auto;
 }

+ 0 - 1
assets/scss/reset.scss

@@ -3,7 +3,6 @@
   -moz-box-sizing: border-box;
   box-sizing: border-box;
 }
-
 body {
   margin: 0;
   padding: 0;

+ 6 - 6
assets/scss/variables.scss

@@ -51,12 +51,12 @@ $font-family: "Microsoft YaHei",'微软雅黑',serif;
 //Typography
 $font-size-small: 12px;
 $font-size: 14px;
-$font-size-large: 1.2rem;
-$font-size-h1: 2rem;
-$font-size-h2: 1.75rem;
-$font-size-h3: 1.5rem;
-$font-size-h4: 1.2rem;
-$font-size-h5: 1rem;
+$font-size-large: 12px;
+$font-size-h1: 20px;
+$font-size-h2: 17.5px;
+$font-size-h3: 15px;
+$font-size-h4: 12px;
+$font-size-h5: 10px;
 $font-size-h6: $font-size-small;
 
 $line-height: 1.2;

+ 665 - 597
components/applyPurchase/ApplyInfo.vue

@@ -9,95 +9,110 @@
       </div>
     </div>
     <div class="apply-info-list">
-      <p>
-        <span>发布时间
-          <a href="javascript:void(0)" @click="sortListByParam('releaseDate')">
-            <!--<i class=" fa fa-long-arrow-up" :class="{active: sorting.releaseDate == 'ASC'}"></i>-->
-            <!--<i class=" fa fa-long-arrow-down" :class="{active: sorting.releaseDate == 'DESC'}"></i>-->
-          </a>
+      <p class="list-title">
+        <span class="list-title-item">买家/发布时间
+          <!--<a href="javascript:void(0)" @click="sortListByParam('releaseDate')">
+            <i class=" fa fa-long-arrow-up" :class="{active: sorting.releaseDate == 'ASC'}"></i>
+            <i class=" fa fa-long-arrow-down" :class="{active: sorting.releaseDate == 'DESC'}"></i>
+          </a>-->
         </span>
-        <span>买家</span>
-        <span>型号</span>
-        <span>品牌</span>
-        <span>已报价
-          <a href="javascript:void(0)" @click="sortListByParam('offerAmount')">
-            <!--<i class=" fa fa-long-arrow-up" :class="{active: sorting.offerAmount == 'ASC'}"></i>-->
-            <!--<i class=" fa fa-long-arrow-down" :class="{active: sorting.offerAmount == 'DESC'}"></i>-->
-          </a>
+        <span class="list-title-item">产品信息</span>
+        <span class="list-title-item">已报价
+          <!--<a href="javascript:void(0)" @click="sortListByParam('offerAmount')">
+            <i class=" fa fa-long-arrow-up" :class="{active: sorting.offerAmount == 'ASC'}"></i>
+            <i class=" fa fa-long-arrow-down" :class="{active: sorting.offerAmount == 'DESC'}"></i>
+          </a>-->
         </span>
-        <span>截止时间
-          <a href="javascript:void(0)" @click="sortListByParam('deadline')">
-            <!--<i class=" fa fa-long-arrow-up" :class="{active: sorting.deadline == 'ASC'}"></i>-->
-            <!--<i class=" fa fa-long-arrow-down" :class="{active: sorting.deadline == 'DESC'}"></i>-->
-          </a>
+        <span class="list-title-item">截止时间
+          <!--<a href="javascript:void(0)" @click="sortListByParam('deadline')">
+            <i class=" fa fa-long-arrow-up" :class="{active: sorting.deadline == 'ASC'}"></i>
+            <i class=" fa fa-long-arrow-down" :class="{active: sorting.deadline == 'DESC'}"></i>
+          </a>-->
         </span>
-        <span>操作</span>
       </p>
       <ul v-if="purchaseManList.content && purchaseManList.content.length">
-        <li v-for="(purchaseMan, index) in purchaseManList.content" :class="{'active': purchaseMan.active}">
-          <div>{{purchaseMan.date| date}}</div>
-          <div v-if="purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{purchaseMan.inquiry.enterprise.enName | enterpriseFilter}}</div>
-          <div v-else>{{purchaseMan.userName | userNameFilter}}</div>
-          <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode || '-'}}</div>
-          <div :title="purchaseMan.inbrand">{{purchaseMan.inbrand || '-'}}</div>
-          <div class="number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10"><span :style="purchaseMan.offerAmount > 10 ? 'color: #ff9a00': ''">{{purchaseMan.offerAmount || 0}}</span>&nbsp;条</div>
-          <div class="date-content">
-            <div v-if="purchaseMan.remainingTime > 0">
-              <span>剩余&nbsp;</span>
-              <span v-if="getDay(purchaseMan.remainingTime) > 0" v-text="getDay(purchaseMan.remainingTime)"></span>
-              <i v-if="getDay(purchaseMan.remainingTime) > 0">&nbsp;天&nbsp;</i>
-              <span v-if="getDay(purchaseMan.remainingTime) <= 0" v-text="getHours(purchaseMan.remainingTime)"></span>
-              <i v-if="getDay(purchaseMan.remainingTime) <= 0" >&nbsp;小时</i>
-            </div>
-            <span v-if="!purchaseMan.remainingTime || purchaseMan.remainingTime <= 0">已截止</span>
-          </div>
-          <div class="btn-content">
-            <!--<a @click="setLinkBoxIndex(index)">联系买家</a>-->
-            <!--判断该求购是自己的-->
-            <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt=""></div>
-            <div v-else>
-              <a title="该求购已截止" v-if="!purchaseMan.remainingTime || purchaseMan.remainingTime <= 0" style="background: #cccbcb;" @click="sayPriceStop">我要报价</a>
-              <a title="此为贵公司的求购" v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && (user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" style="background: #cccbcb;" @click="sayPriceSeft">我要报价</a>
-              <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && !(user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" @click="sayPrice(purchaseMan, index)">我要报价</a>
-            </div>
+        <li v-for="(purchaseMan, index) in purchaseManList.content" :class="{'active': purchaseMan.active}" :key="index" ref="purchaseManList">
+          <div class="il-item il-left">
+            <div class="item" v-if="purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName" :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</div>
+            <div class="item" v-else :title="user.logged ? purchaseMan.userName : null">{{[purchaseMan.userName, user] | userNameFilter}}</div>
+            <div>{{purchaseMan.date| date}}</div>
           </div>
-          <div class="expand-content">
-            <div>
-              封装:{{purchaseMan.encapsulation || '-'}}
+          <div class="il-item il-center">
+            <div class="il-box-large il-box">
+              <div :title="purchaseMan.prodTitle | nullFilter" class="fl item size-middle">
+                <span>类目:</span>
+                <div class="content">{{(purchaseMan.prodTitle || '-') | nullFilter}}</div>
+              </div>
+              <div :title="purchaseMan.cmpCode" class="fl item">
+                <span>型号:</span>
+                <div class="content">{{purchaseMan.cmpCode || '-'}}</div>
+              </div>
+              <div :title="purchaseMan.inbrand" class="fl item bottom size-middle">
+                <span>品牌:</span>
+                <div class="content">{{purchaseMan.inbrand || '-'}}</div>
+              </div>
+              <div :title="purchaseMan.spec" class="fl item bottom">
+                <span>规格:</span>
+                <div class="content">{{purchaseMan.spec || '-'}}</div>
+              </div>
             </div>
-            <div>
-              采购数量:<span>{{purchaseMan.needquantity || '-'}}</span><span v-if="purchaseMan.needquantity">个</span>
-            </div>
-            <div>
-              单价预算:<span>{{purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'}}</span>
-            </div>
-            <div>
-              生产日期:{{purchaseMan.produceDate || '-'}}
+            <div class="il-box-small il-box">
+              <div :title="purchaseMan.encapsulation" class="item">
+                <span>封装:</span>{{purchaseMan.encapsulation || '-'}}</div>
+              <div :title="purchaseMan.produceDate" class="item">
+                <span>生产日期:</span>{{purchaseMan.produceDate || '-'}}</div>
+              <div :title="purchaseMan.needquantity" class="item">
+                <span>采购数量:</span>{{purchaseMan.needquantity || '-'}}</div>
+              <div :title="purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'" class="item">
+                <span>单价预算:</span>{{purchaseMan.unitPrice ? (purchaseMan.currency == 'RMB' ? '¥' : '$') + purchaseMan.unitPrice : '-'}}</div>
             </div>
           </div>
-          <!--<div class="say-price">
-            <div>报价</div>
-            <div>
-              <i>*</i>单价
-              <select v-if="!purchaseMan.currency" v-model="sayPriceObj.currency">
-                <option value="RMB">¥</option>
-                <option value="USD">$</option>
-              </select>
-              <div v-if="purchaseMan.currency" v-text="purchaseMan.currency == 'RMB' ? '¥' : '$'"></div>
-              <input type="number" v-model="sayPriceObj.unitPrice" class="form-control" @blur="onUnitPriceBlur" @input="onUnitPriceChange">
+          <div class="il-item number-content"><img src="/images/applyPurchase/hot-fire.png" alt="" v-if="purchaseMan.offerAmount > 10">
+            <span :style="purchaseMan.offerAmount > 10 ? 'color: #ff9a00': ''">{{purchaseMan.offerAmount || 0}}</span>&nbsp;条</div>
+          <div class="il-item il-right">
+            <div class="date-content">
+              <div v-if="purchaseMan.remainingTime > 0">
+                <span>剩余&nbsp;</span>
+                <span v-if="getDay(purchaseMan.remainingTime) > 0" v-text="getDay(purchaseMan.remainingTime)"></span>
+                <i v-if="getDay(purchaseMan.remainingTime) > 0">&nbsp;天&nbsp;</i>
+                <span v-if="getDay(purchaseMan.remainingTime) <= 0" v-text="getHours(purchaseMan.remainingTime)"></span>
+                <i v-if="getDay(purchaseMan.remainingTime) <= 0">&nbsp;小时</i>
+              </div>
+              <span v-if="!purchaseMan.remainingTime || purchaseMan.remainingTime <= 0">已截止</span>
             </div>
-            <div>
-              <i>*</i>交期&nbsp;
-              <input type="number" v-model="sayPriceObj.minDay" @blur="onMinDayInput" @input="onMinDayChange" class="form-control">&nbsp;-&nbsp;<input type="number" v-model="sayPriceObj.maxDay" @blur="onMaxDayInput" @input="onMaxDayChange" class="form-control">&nbsp;天
+            <div class="btn-content">
+              <!--<a @click="setLinkBoxIndex(index)">联系买家</a>-->
+              <!--判断该求购是自己的-->
+              <div class="is-say-price" v-if="purchaseMan.remainingTime > 0 && purchaseMan.quoted == 1">已报价 <img src="/images/applyPurchase/green-check.png" alt=""></div>
+              <div v-else>
+                <a title="该求购已截止" v-if="!purchaseMan.remainingTime || purchaseMan.remainingTime <= 0" style="background: #cccbcb;" @click="sayPriceStop">我要报价</a>
+                <a title="此为贵公司的求购" v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && (user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" style="background: #cccbcb;" @click="sayPriceSeft">我要报价</a>
+                <a v-if="purchaseMan.remainingTime > 0 && (!purchaseMan.quoted || purchaseMan.quoted != 1) && !(user.logged && ((purchaseMan.inquiry.enterprise && user.data.enterprise && (purchaseMan.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseMan.userUU == user.data.userUU  && !purchaseMan.inquiry.enterprise)))" @click="sayPrice(purchaseMan, index)">我要报价</a>
+              </div>
             </div>
-            <div>
-              生产日期&nbsp;<input v-model="sayPriceObj.produceDate" @input="onProduceDateChange" type="text" class="form-control">
+            <div class="sharecode">
+              <div class="sharecodeR"></div>
+              <div class="sharecodeL" @mouseover="setShowShare(!showShare, index, purchaseMan.id)">
+                <div class="sharecodeT">求<br/>购<br/>分<br/>享</div>
+                <div class="sharecodeBtn" @mouseout="hideShowShare(!showShare, index, purchaseMan.id)">
+                  <img src="/images/mobile/@2x/purChase/code.png" />
+                </div>
+              </div>
+
             </div>
-            <div>
-              <span @click="cancelSayPrice(purchaseMan)">取消</span>
-              <span @click="commitSayPrice(purchaseMan)">提交</span>
+            <div class="sharescancodekuang">
+              <div class="sharescancode icon-style" ref="sharescancode" @mouseover="showShowShare(!showShare, index, purchaseMan.id)" @mouseout="hideShowShare(!showShare, index, purchaseMan.id)">
+                <div class="share">
+                  <div>
+                    <div class="title">求购分享</div>
+                    <canvas :class="'qrccode-canvas_'+index" width="98" height="98"></canvas>
+                    <input :value="url" readonly>
+                    <span :class="'copyLink_'+index" :data-clipboard-text="url">复制链接</span>
+                  </div>
+                </div>
+              </div>
             </div>
-          </div>-->
+          </div>
         </li>
       </ul>
       <div class="empty" v-else>
@@ -105,21 +120,19 @@
         <span>暂无搜索结果</span>
       </div>
     </div>
-    <say-price :current="currentSayPriceIndex"
-               :purchase="purchaseManList"
-               @cancelSayPriceAction="cancelSayPrice"
-               @resetListAction="resetList"
-               @sayPriceIndexAction="setIndex(index)"
-    ></say-price>
-    <page :total="totalCount" :page-size="pageSize"
-          :current="nowPage" v-on:childEvent="listenPage"></page>
+
+    <say-price :current="currentSayPriceIndex" :purchase="purchaseManList" @cancelSayPriceAction="cancelSayPrice" @resetListAction="resetList" @sayPriceIndexAction="setIndex(index)"></say-price>
+    <page :total="totalCount" :page-size="pageSize" :current="nowPage" v-on:childEvent="listenPage"></page>
     <div class="com-del-box link-saler-box" v-if="linkBoxIndex > -1">
       <div class="title">
         <i @click="setLinkBoxIndex(-1)"></i>
       </div>
       <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与买家在线沟通!</p>
-        <p>买家联系电话:<span v-text="purchaseManList.content[linkBoxIndex].userTel"></span></p>
+        <p>
+          <i class="fa fa-exclamation-circle"></i>抱歉,暂时无法与买家在线沟通!</p>
+        <p>买家联系电话:
+          <span v-text="purchaseManList.content[linkBoxIndex].userTel"></span>
+        </p>
         <div>
           <a @click="setLinkBoxIndex(-1)">我知道了</a>
         </div>
@@ -128,178 +141,315 @@
   </div>
 </template>
 <script>
-  import Page from '~components/common/page/pageComponent.vue'
-  import SayPrice from './SayPrice.vue'
-  export default {
-    data () {
-      return {
-        pageSize: 10,
-        nowPage: 1,
-        keyWord: '',
-        sorting: {},
-        currentSayPriceIndex: -1,
-        linkBoxIndex: -1
-      }
+import Page from '~components/common/page/pageComponent.vue'
+import SayPrice from './SayPrice.vue'
+import { checkNullStr } from '~utils/baseUtils'
+import Clipboard from 'clipboard'
+let QRCode = require('qrcode')
+export default {
+  data() {
+    return {
+      pageSize: 10,
+      nowPage: 1,
+      keyWord: '',
+      sorting: {},
+      currentSayPriceIndex: -1,
+      linkBoxIndex: -1,
+      showShare: false,
+      url: '',
+      Timer: {}
+    }
+  },
+  phone: function(str) {
+    return str ? str.substring(0, 3) + '****' + str.substring(7, 11) : '-'
+  },
+  filters: {
+    date: function(date) {
+      const d = new Date(Number(date))
+      const year = d.getFullYear()
+      const monthTemp = d.getMonth() + 1
+      const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+      const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
+      const minutes =
+        d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
+      const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+      return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
     },
-    components: {
-      Page,
-      SayPrice
+    phone: function(str) {
+      return str ? str.substring(0, 3) + '****' + str.substring(7, 11) : '-'
     },
-    filters: {
-      date: function (date) {
-        const d = new Date(Number(date))
-        const year = d.getFullYear()
-        const monthTemp = d.getMonth() + 1
-        const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
-        const hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
-        const minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes() + ' '
-        const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
-        return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes
-      },
-      phone: function (str) {
-        return str.substring(0, 3) + '****' + str.substring(7, 11)
-      },
-      enterpriseFilter (str) {
-        return str ? str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str : '-'
-      },
-      userNameFilter (str) {
-        return str ? str.substring(0, 1) + '**' : '-'
+    enterpriseFilter([str, user]) {
+      if (!user.logged) {
+        return str
+          ? str.length > 4
+            ? str.substring(0, 2) +
+              '**' +
+              str.substring(str.length - 2, str.length)
+            : str
+          : '-'
+      } else {
+        return str || '-'
       }
     },
-    computed: {
-      purchaseManList () {
-        return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
-      },
-      totalCount () {
-        return this.purchaseManList.totalElements
-      },
-      user () {
-        return this.$store.state.option.user
+    userNameFilter([str, user]) {
+      if (!user.logged) {
+        return str ? str.substring(0, 1) + '**' : '-'
+      } else {
+        return str || '-'
       }
     },
-    methods: {
-      setIndex: function (index) {
-        this.currentSayPriceIndex = index
-      },
-      getDay: function (timeStamp) {
-        return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
-      },
-      getHours: function (timeStamp) {
-        return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
-      },
-      listenPage: function (page) {
-        this.nowPage = page
-        this.resetList()
-      },
-      sayPrice: function (purchaseMan, index) {
-//        let _this = this
-//        for (let i = 0; i < this.purchaseManList.content.length; i++) {
-//          _this.purchaseManList.content[i].active = false
-//        }
-        if (this.user.logged) {
-          if (this.user.data.enterprise.uu) {
-            if (this.user.data.enterprise.isVendor && this.user.data.enterprise.isVendor !== '1690') {
-//              this.resetSayPrice()
-              purchaseMan.active = true
-              this.currentSayPriceIndex = index
-            } else {
-              this.$message.error('抱歉,您需开通卖家功能才可报价')
-            }
-          } else {
-            this.$message.error('个人账户暂不可报价')
-          }
+    nullFilter(str) {
+      return checkNullStr(str) ? str : '-'
+    }
+  },
+  components: { Page, SayPrice },
+  computed: {
+    storeInfo() {
+      return this.$store.state.shop.storeInfo.store.data
+    },
+    purchaseManList() {
+      return this.$store.state.applyPurchase.purchaseManList.purchaseManList
+        .data
+    },
+    totalCount() {
+      return this.purchaseManList.totalElements
+    },
+    user() {
+      return this.$store.state.option.user
+    }
+  },
+  methods: {
+    copyurl(index) {
+      let _this = this
+      _this.clipboard = new Clipboard('.copyLink_' + index)
+      _this.clipboard.on('success', e => {
+        // _this.clipboard.destroy()
+        e.clearSelection()
+        _this.$message.success('已复制到剪切板')
+      })
+      _this.clipboard.on('error', e => {
+        _this.$message.error('浏览器不支持自动复制,请手动复制')
+        _this.clipboard.destroy()
+      })
+      document.addEventListener('click', function() {
+        // _this.showShare = false
+      })
+    },
+    loadQRcode: function(id, index) {
+      let canvas = document.getElementsByClassName('qrccode-canvas_' + index)[0]
+      var opts = {
+        width: '122'
+      }
+      this.url =
+        window.location.protocol +
+        '//' +
+        window.location.host +
+        '/mobile/share/purChase/' +
+        id
+      QRCode.toCanvas(canvas, this.url, opts, error => {
+        if (error) {
+          console.log(error)
         } else {
-          this.$router.push('/auth/login?returnUrl=' + window.location.href)
+          console.log('QRcode success')
+        }
+      })
+      this.copyurl(index)
+    },
+    setShowShare: function(flag, index, id) {
+      clearTimeout(this.Timer[index] ? this.Timer[index] : '')
+      this.$refs.sharescancode[index].style.display = 'block'
+      this.$refs.purchaseManList[index].onmouseout = () => {
+        if (this.Timer[index] !== 'undefined') {
+          clearTimeout(this.Timer[index])
         }
-      },
-      cancelSayPrice: function () {
-        this.purchaseManList.content[this.currentSayPriceIndex].active = false
-        this.currentSayPriceIndex = -1
-      },
-      resetList: function () {
-        this.currentSayPriceIndex = -1
-        this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.nowPage, pageSize: this.pageSize, keyword: this.keyWord, sorting: !this.sorting || JSON.stringify(this.sorting) === '{}' ? {releaseDate: 'DESC'} : this.sorting, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
-      },
-      searchList: function () {
-        this.nowPage = 1
-        this.resetList()
-      },
-      sayPriceStop: function () {
-        this.$message.error('该求购已截止')
-      },
-      sayPriceSeft: function () {
-        this.$message.error('此为贵公司的求购')
-      },
-      sortListByParam: function (param) {
-        if (this.sorting[param]) {
-          if (this.sorting[param] === 'ASC') {
-            this.$set(this.sorting, param, 'DESC')
+        this.Timer[index] = setTimeout(() => {
+          this.$refs.sharescancode[index].style.display = 'none'
+        }, 300)
+      }
+
+      this.loadQRcode(id, index)
+      this.showShare = flag
+    },
+    showShowShare(flag, index, id) {
+      clearTimeout(this.Timer[index] ? this.Timer[index] : '')
+    },
+    hideShowShare(flag, index, id) {
+      clearTimeout(this.Timer[index] ? this.Timer[index] : '')
+      this.Timer[index] = setTimeout(() => {
+        this.$refs.sharescancode[index].style.display = 'none'
+      }, 300)
+    },
+    setIndex: function(index) {
+      this.currentSayPriceIndex = index
+    },
+    getDay: function(timeStamp) {
+      return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
+    },
+    getHours: function(timeStamp) {
+      return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
+    },
+    listenPage: function(page) {
+      this.nowPage = page
+      this.resetList()
+    },
+    sayPrice: function(purchaseMan, index) {
+      //        let _this = this
+      //        for (let i = 0; i < this.purchaseManList.content.length; i++) {
+      //          _this.purchaseManList.content[i].active = false
+      //        }
+      if (this.user.logged) {
+        if (this.user.data.enterprise.uu) {
+          if (
+            this.user.data.enterprise.isVendor &&
+            this.user.data.enterprise.isVendor !== '1690'
+          ) {
+            //              this.resetSayPrice()
+            purchaseMan.active = true
+            this.currentSayPriceIndex = index
           } else {
-            this.$delete(this.sorting, param)
+            this.$message.error('抱歉,您需开通卖家功能才可报价')
           }
         } else {
-          this.sorting = {}
-          this.$set(this.sorting, param, 'ASC')
+          this.$message.error('个人账户暂不可报价')
         }
-        this.nowPage = 1
-        this.resetList()
-      },
-      setLinkBoxIndex: function (index) {
-        if (!this.user.logged) {
-          this.$router.push('/auth/login?returnUrl=' + window.location.href)
+      } else {
+        this.$router.push('/auth/login?returnUrl=' + window.location.href)
+      }
+    },
+    cancelSayPrice: function() {
+      this.purchaseManList.content[this.currentSayPriceIndex].active = false
+      this.currentSayPriceIndex = -1
+    },
+    resetList: function() {
+      this.currentSayPriceIndex = -1
+      this.$store.dispatch('applyPurchase/loadPurchaseManList', {
+        pageNumber: this.nowPage,
+        pageSize: this.pageSize,
+        keyword: this.keyWord,
+        sorting:
+          !this.sorting || JSON.stringify(this.sorting) === '{}'
+            ? { releaseDate: 'DESC' }
+            : this.sorting,
+        enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null
+      })
+    },
+    searchList: function() {
+      this.nowPage = 1
+      this.resetList()
+    },
+    sayPriceStop: function() {
+      this.$message.error('该求购已截止')
+    },
+    sayPriceSeft: function() {
+      this.$message.error('此为贵公司的求购')
+    },
+    sortListByParam: function(param) {
+      if (this.sorting[param]) {
+        if (this.sorting[param] === 'ASC') {
+          this.$set(this.sorting, param, 'DESC')
         } else {
-          this.linkBoxIndex = index
+          this.$delete(this.sorting, param)
         }
+      } else {
+        this.sorting = {}
+        this.$set(this.sorting, param, 'ASC')
+      }
+      this.nowPage = 1
+      this.resetList()
+    },
+    setLinkBoxIndex: function(index) {
+      if (!this.user.logged) {
+        this.$router.push('/auth/login?returnUrl=' + window.location.href)
+      } else {
+        this.linkBoxIndex = index
       }
     }
   }
+}
 </script>
 <style lang="scss" scoped>
-  .apply-info {
-    width: 1190px;
-    margin: 0 auto;
-    .apply-info-title {
-      border-bottom: 1px solid #3975f4;
-      >p {
+.apply-info {
+  width: 1190px;
+  margin: 0 auto;
+  .apply-info-title {
+    border-bottom: 1px solid #3975f4;
+    > p {
+      display: inline-block;
+      width: 156px;
+      height: 33px;
+      line-height: 33px;
+      color: #fff;
+      background: #3975f4;
+      font-size: 18px;
+      text-align: center;
+      border: {
+        top-left-radius: 3px;
+        top-right-radius: 3px;
+      }
+      margin: 0;
+    }
+    > span {
+      color: #999;
+      margin-left: 16px;
+    }
+    > div {
+      float: right;
+      height: 32px;
+      line-height: 32px;
+      > input {
+        width: 241px;
+        height: 32px;
+        line-height: 32px;
+        font-size: 13px;
+        border: {
+          top-right-radius: 0;
+          bottom-right-radius: 0;
+        }
+      }
+      > span {
         display: inline-block;
-        width: 156px;
-        height: 33px;
-        line-height: 33px;
+        width: 69px;
         color: #fff;
         background: #3975f4;
-        font-size: 18px;
         text-align: center;
+        margin: 0 6px 0 -1px;
+        /*vertical-align: middle;*/
         border: {
-          top-left-radius: 3px;
           top-right-radius: 3px;
+          bottom-right-radius: 3px;
         }
-        margin: 0;
+        cursor: pointer;
       }
-      >span {
-        color: #999;
-        margin-left: 16px;
+      > a {
+        background: #ffa200;
+        color: #fff;
+        width: 79px;
+        border-radius: 3px;
+        text-align: center;
+        display: inline-block;
       }
-      >div {
+      > div {
         float: right;
-        height: 32px;
-        line-height: 32px;
-        >input {
+        height: 33px;
+        line-height: 33px;
+        > input {
           width: 241px;
-          height: 32px;
-          line-height: 32px;
+          height: 33px;
+          line-height: 33px;
           font-size: 13px;
           border: {
             top-right-radius: 0;
             bottom-right-radius: 0;
           }
         }
-        >span {
+        > span {
           display: inline-block;
           width: 69px;
           color: #fff;
           background: #3975f4;
           text-align: center;
           margin: 0 6px 0 -1px;
+          height: 33px;
           /*vertical-align: middle;*/
           border: {
             top-right-radius: 3px;
@@ -307,96 +457,166 @@
           }
           cursor: pointer;
         }
-        >a {
-          background: #ffa200;
-          color: #fff;
-          width: 79px;
-          border-radius: 3px;
-          text-align: center;
-          display: inline-block;
+        &:nth-child(2) {
+          width: 106px;
+        }
+        &:nth-child(3) {
+          width: 200px;
+        }
+        &:nth-child(4) {
+          width: 174px;
+        }
+        &:nth-child(5) {
+          width: 152px;
+        }
+        &:nth-child(6) {
+          width: 158px;
+        }
+        &:nth-child(7) {
+          width: 180px;
+          margin-left: 30px;
         }
       }
     }
-    .apply-info-list {
-      >p {
-        background: #ededed;
-        height: 40px;
-        line-height: 40px;
-        margin: 9px 0 0 0;
-        span {
-          display: inline-block;
-          text-align: center;
-          a {
-            i {
-              color: #333;
-              &.active {
-                color: #5078cb;
-              }
-            }
-          }
-          &:nth-child(1) {
-            width: 186px;
-          }
-          &:nth-child(2) {
-            width: 106px;
-          }
-          &:nth-child(3) {
-            width: 200px;
-          }
-          &:nth-child(4) {
-            width: 174px;
-          }
-          &:nth-child(5) {
-            width: 152px;
-          }
-          &:nth-child(6) {
-            width: 158px;
-          }
-          &:nth-child(7) {
-            width: 180px;
-            margin-left: 30px;
+
+    .empty {
+      text-align: center;
+      height: 200px;
+      line-height: 200px;
+      border: 1px solid #e8e8e8;
+      margin-bottom: 10px;
+      span {
+        color: #999;
+        margin-left: 10px;
+      }
+    }
+  }
+  .apply-info-list {
+    .list-title {
+      background: #e2ebff;
+      height: 40px;
+      line-height: 40px;
+      margin: 9px 0 0 0;
+      .list-title-item {
+        display: inline-block;
+        text-align: center;
+        .fa {
+          color: #333;
+          &.active {
+            color: #5078cb;
           }
         }
+        &:nth-child(1) {
+          margin-left: 76px;
+        }
+        &:nth-child(2) {
+          margin-left: 345px;
+        }
+        &:nth-child(3) {
+          margin-left: 399px;
+        }
+        &:nth-child(4) {
+          margin-left: 71px;
+        }
       }
-      >ul {
-        margin-bottom: 29px;
-        > li {
-          position: relative;
-          min-height: 61px;
-          line-height: 61px;
-          border: 1px solid #ededed;
-          >div {
-            overflow-x: hidden;
+    }
+    > ul {
+      margin-bottom: 29px;
+      > li {
+        position: relative;
+        border: 1px solid #ededed;
+        &.active {
+          border: 1px solid #4290f7;
+          box-shadow: 2px 4px 5px 0 rgb(205, 221, 252);
+        }
+        &:hover {
+          border: 1px solid #4290f7;
+          box-shadow: 2px 4px 5px 0 rgb(205, 221, 252);
+          .il-item.il-right .sharecode {
+            display: block;
+          }
+        }
+        .il-item {
+          height: 120px;
+          display: inline-block;
+          text-align: center;
+          color: #3c3c3c;
+          padding-top: 16px;
+          vertical-align: middle;
+          .item {
+            display: inline-block;
+            overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;
-            display: inline-block;
-            text-align: center;
-            color: #3c3c3c;
-            vertical-align: middle;
-            &:nth-child(1) {
-              width: 186px;
-            }
-            &:nth-child(2) {
-              width: 106px;
+            span {
+              color: #999;
             }
-            &:nth-child(3) {
-              width: 200px;
-            }
-            &:nth-child(4) {
-              width: 174px;
+          }
+          &.il-left {
+            width: 236px;
+            padding: 16px 10px 0;
+            div {
+              display: block;
+              &:last-child {
+                margin-top: 37px;
+                color: #666;
+              }
             }
-            &:nth-child(5) {
-              width: 152px;
+          }
+          &.il-center {
+            text-align: left;
+            width: 654px;
+            .il-box {
+              display: inline-block;
+              float: left;
+              span {
+                color: #999;
+              }
             }
-            &:nth-child(6) {
-              width: 158px;
+            .il-box-large {
+              width: 482px;
+              .fl {
+                width: 284px;
+                line-height: 19px;
+                word-break: break-all;
+                white-space: unset;
+                &.bottom {
+                  margin-top: 14px;
+                }
+                .content {
+                  display: inline-block;
+                  width: 220px;
+                  overflow: hidden;
+                  vertical-align: middle;
+                  height: 38px;
+                }
+                span {
+                  float: left;
+                }
+                &.size-middle {
+                  width: 136px;
+                  margin-right: 37px;
+                  .content {
+                    width: 86px;
+                  }
+                }
+              }
             }
-            &:nth-child(7) {
-              width: 180px;
-              margin-left: 32px;
-              float: right;
+            .il-box-small {
+              width: 151px;
+              margin-left: 12px;
+              .item {
+                color: #020202;
+                width: 151px;
+                margin-bottom: 6px;
+              }
             }
-            &.date-content {
+          }
+          &.il-right {
+            width: 100px;
+            .date-content {
+              margin-top: 14px;
+              margin-bottom: 17px;
               span {
                 &:first-child {
                   font-size: 12px;
@@ -408,20 +628,8 @@
                 font-style: normal;
               }
             }
-            &.number-content {
-              span {
-                color: #5392f9;
-                &.active {
-                  color: #ff9a00;
-                }
-              }
-              >img {
-                margin-bottom: 5px;
-                margin-right: 2px;
-              }
-            }
-            &.btn-content {
-              >div a {
+            .btn-content {
+              > div a {
                 display: inline-block;
                 width: 71px;
                 height: 28px;
@@ -431,10 +639,10 @@
                 border-radius: 3px;
                 cursor: pointer;
                 /*  &:first-child {
-                    background: #ffa200;
-                    float: left;
-                    margin-top: 19px;
-                  }*/
+                      background: #ffa200;
+                      float: left;
+                      margin-top: 19px;
+                    }*/
               }
               .is-say-price {
                 display: inline-block;
@@ -443,314 +651,174 @@
                 img {
                   margin-bottom: 2px;
                 }
-                .say-price-history {
-                  position: absolute;
-                  top: 53px;
-                  right: 11px;
-                  line-height: normal;
-                  width: 198px;
-                  height: 0;
-                  background: #fff;
-                  border: 1px solid #fab89a;
-                  z-index: 1;
-                  overflow: hidden;
-                  transition: height 1s;
-                  -moz-transition: height 1s; /* Firefox 4 */
-                  -webkit-transition: height 1s; /* Safari 和 Chrome */
-                  -o-transition: height 1s; /* Opera */
-                  opacity: 0;
-                  p {
-                    color: #020202;
-                    font-weight: bold;
-                    margin: 0;
-                    &.price-title {
-                      background: #fee6db;
-                      height: 28px;
-                      line-height: 28px;
-                    }
-                    &.price-level {
-                      margin: 6px 0;
-                      text-align: left;
-                    }
-                  }
-                  > div {
-                    padding: 9px 12px;
-                    > div {
-                      display: inline-block;
-                      text-align: left;
-                      &:nth-child(1) {
-                        float: left;
-                      }
-                      &:nth-child(2) {
-                        margin-left: 32px;
-                      }
-                      span {
-                        color: #020202;
-                        margin: 0;
-                        &.red-text {
-                          color: #f62d37;
-                        }
-                      }
-                      &.pre-line {
-                        display: block;
-                        padding: 13px 0;
-                        border-bottom: 1px dashed #fee6db;
-                      }
-                    }
-                    ul {
-                      li {
-                        color: #333;
-                        height: 22px;
-                        line-height: 22px;
-                        padding: 0 6px;
-                        &:nth-child(odd) {
-                          background: #f6f5f4;
-                        }
-                        span {
-                          color: #333;
-                          display: inline-block;
-                          text-align: left;
-                          width: 50%;
-                          margin: 0;
-                        }
-                        &:last-child {
-                          span {
-                            color: #4290f7;
-                          }
-                        }
-                      }
-                    }
-                  }
-                }
-                &:hover {
-                  .say-price-history {
-                    opacity: 1;
-                    /* animation: expand 1s infinite;
-                     -webkit-animation: expand 1s infinite; !*Safari and Chrome*!
-                     animation-iteration-count: 1;
-                     -webkit-animation-iteration-count: 1;*/
-                    height: 210px;
-                  }
-                }
-                /* @keyframes expand {
-                   from {bottom: 58px}
-                   to {bottom: auto}
-                 }
-                 @-webkit-keyframes expand {
-                   from {bottom: 58px}
-                   to {bottom: auto}
-                 }*/
               }
             }
-          }
-          .expand-content {
-            display: none;
-            position: absolute;
-            top: 63px;
-            justify-content: space-between;
-            padding: 0 236px 0 36px;
-            background: #fffbf0;
-            height: 48px;
-            line-height: 48px;
-            color: #020202;
-            div {
-              display: inline-block;
-              span {
-                color: #f71026;
-              }
+            .sharescancodekuang {
+              // width: 100%;
+              // height: 220px;
+              // position: absolute;
+              // top: 115px;
+              // left: 0px;
+              // background: rgba(0, 0, 0, 0);
             }
-          }
-          &:hover {
-            border-top: 1px solid #4290f7;
-            border-left: 1px solid #4290f7;
-            border-right: 1px solid #4290f7;
-            .expand-content {
-              display: flex;
-              width: 1190px;
-              z-index: 1;
-              border-bottom: 1px solid #4290f7;
-              border-left: 1px solid #4290f7;
-              border-right: 1px solid #4290f7;
-              left: -1px;
-            }
-          }
-          .say-price {
-            background-color: #e7eef9;
-            height: 64px;
-            line-height: 64px;
-            display: none;
-            >div {
-              display: inline-block;
-              position: relative;
-              height: 64px;
-              line-height: 64px;
-              input {
-                border-radius: 3px;
+            .sharescancode {
+              position: absolute;
+              background: url('/images/mobile/@2x/purChase/codebg.png');
+              width: 248px;
+              height: 207px;
+              top: 115px;
+              right: 0px;
+              z-index: 98;
+              display: none;
+              line-height: 14px;
+              canvas {
+                display: block;
+                text-align: center;
+                margin: 0 auto;
+                line-height: 14px;
               }
-              &:nth-child(1) {
-                width: 282px;
-                background: url('/images/applyPurchase/say-price.png')no-repeat;
+              .title {
+                color: #3c7cf5;
+                font-size: 16px;
+                margin: 21px auto;
+                margin-bottom: 0px;
                 text-align: center;
-                margin-right: 44px;
+                line-height: 14px;
               }
-              &:nth-child(2) {
-                margin-right: 39px;
-                input {
-                  width: 118px;
-                  height: 26px;
-                  border: 1px solid #5392f9;
-                }
-                select {
-                  position: absolute;
-                  top: 19px;
-                  width: 32px;
-                  height: 26px;
-                  background: url('/images/applyPurchase/arrow-down.png')no-repeat right center;
-                  -webkit-box-shadow: none;
-                  -moz-box-shadow: none;
-                  box-shadow: none;
-                  border: {
-                    left: none;
-                    top: none;
-                    bottom: none;
-                    right: 1px solid #5392f9;
-                    bottom-left-radius: 4px;
-                    top-left-radius: 4px;
-                  }
-                  color: #5392f9;
-                  font: small-caption;
-                  padding-left: 8px;
-                  & + input {
-                    padding-left: 34px;
-                  }
-                }
-                div {
-                  position: absolute;
-                  top: 19px;
-                  left: 38px;
-                  width: 32px;
-                  height: 26px;
-                  line-height: 26px;
-                  text-align: center;
-                  border: {
-                    left: none;
-                    top: none;
-                    bottom: none;
-                    right: 1px solid #5392f9;
-                    bottom-left-radius: 4px;
-                    top-left-radius: 4px;
-                  }
-                  color: #5392f9;
-                  & + input {
-                    padding-left: 34px;
-                  }
-                }
+              div input {
+                display: inline-block;
+                width: 140px;
+                overflow: hidden;
+                height: 35px;
+                vertical-align: middle;
+                margin-left: 14px;
+                line-height: 35px;
               }
-              &:nth-child(3) {
-                margin-right: 37px;
-                input {
-                  width: 32px;
-                  height: 26px;
-                  padding: 0 0 0 6px;
-                }
+              div span {
+                display: inline-block;
+                color: #fff;
+                background: #4290f7;
+                height: 36px;
+                line-height: 36px;
+                width: 70px;
+                font-style: normal;
+                vertical-align: middle;
+                cursor: pointer;
               }
-              &:nth-child(4) {
-                margin-right: 132px;
-                input {
-                  width: 118px;
-                  height: 26px;
-                }
+            }
+            .sharecode {
+              position: absolute;
+              right: 0;
+              top: 0;
+              height: 120px;
+              z-index: 99;
+              display: none;
+              .sharecodeR {
+                width: 4px;
+                height: 120px;
+                background: #4290f7;
+                float: right;
               }
-              &:nth-child(5) {
-                span {
-                  width: 71px;
-                  height: 28px;
-                  line-height: 28px;
-                  text-align: center;
-                  display: inline-block;
-                  cursor: pointer;
-                  &:first-child {
-                    background: #dedddd;
-                    margin-right: 10px;
-                  }
-                  &:last-child {
-                    background: #fa4701;
-                    color: #fff;
-                  }
-                }
+              .sharecodeL {
+                float: right;
+                margin-right: 1px;
               }
-              i {
-                color: #e41515;
-                position: relative;
-                top: 2px;
-                right: 3px;
+              .sharecodeT {
+                padding-top: 5px;
+                margin-top: 10px;
+                width: 28px;
+                height: 68px;
+                background-color: #3c7cf5;
+                border-radius: 2px;
+                color: #ffffff;
+                font-size: 14px;
+                word-wrap: break-word;
+                white-space: pre-wrap;
+                line-height: 14px;
+              }
+              .sharecodeBtn {
+                width: 28px;
+                height: 28px;
+                margin-top: 4px;
+                &::after {
+                  content: ' ';
+                  clear: both;
+                  display: inline;
+                  visibility: hidden;
+                }
+                img {
+                  float: left;
+                }
               }
             }
           }
-          &.active {
-            border: 1px solid #4290f7;
-            .expand-content {
-              display: flex;
-              width: 1190px;
-              z-index: 1;
-              border: 1px solid #4290f7;
-              left: -1px;
-              border-top: none;
-            }
-            /*.say-price {*/
-            /*display: block;*/
-            /*}*/
+          i {
+            color: #e41515;
+            position: relative;
+            top: 2px;
+            right: 3px;
           }
         }
-      }
-      .empty{
-        text-align: center;
-        height: 200px;
-        line-height: 200px;
-        border: 1px solid #e8e8e8;
-        margin-bottom: 10px;
-        span {
-          color: #999;
-          margin-left: 10px;
+        .number-content {
+          margin-left: 56px;
+          line-height: 120px;
+          padding-top: 0;
+          width: 77px;
+          margin-right: 34px;
+          span {
+            color: #5392f9;
+            &.active {
+              color: #ff9a00;
+            }
+          }
+          > img {
+            margin-bottom: 5px;
+            margin-right: 2px;
+          }
         }
+        /*.say-price {*/
+        /*display: block;*/
+        /*}*/
       }
     }
-    .page-wrap {
-      text-align: right;
-      float: none;
+  }
+  .page-wrap {
+    text-align: right;
+    float: none;
+  }
+
+  .link-saler-box {
+    width: 289px;
+    height: auto;
+    min-height: auto;
+    border-radius: 2px;
+    .title {
+      background-color: #4290f7;
+      height: 22px;
+      line-height: 22px;
+      margin-bottom: 20px;
     }
-    .link-saler-box {
-      width: 289px;
-      height: auto;
-      min-height: auto;
-      border-radius: 2px;
-      .title {
-        background-color: #4290f7;
-        height: 22px;
-        line-height: 22px;
-        margin-bottom: 20px;
-      }
-      .content {
-        p {
-          line-height: 20px;
-          padding-top: 0;
-          i {
-            color: #4290f7;
-            margin-right: 4px;
-          }
-          span {
-            color: #f62d37;
-          }
+    .content {
+      p {
+        line-height: 20px;
+        padding-top: 0;
+        i {
+          color: #4290f7;
+          margin-right: 4px;
         }
-        div {
-          a {
-            width: 78px;
-            background: #4290f7;
-            margin: 18px 0 13px 0;
-            border-radius: 2px;
-          }
+        span {
+          color: #f62d37;
+        }
+      }
+      div {
+        a {
+          width: 78px;
+          background: #4290f7;
+          margin: 18px 0 13px 0;
+          border-radius: 2px;
         }
       }
     }
   }
+}
 </style>

File diff suppressed because it is too large
+ 919 - 418
components/applyPurchase/BatchPublish.vue


+ 85 - 77
components/applyPurchase/PublishApply.vue

@@ -59,6 +59,18 @@
             </select>
             <input type="number" class="form-control" :class="{'error': !validObj.unitPrice}" v-model="applyObj.unitPrice" @blur="checkUnitPrice" @input="onUnitPriceInput" />
           </div>
+          <div class="form-item">
+           <span>
+              类目:
+            </span>
+            <input type="text" class="form-control" v-model="applyObj.prodTitle" @input="onProdTitleInput"/>
+          </div>
+          <div class="form-item">
+           <span>
+              规格:
+            </span>
+            <input type="text" class="form-control" :class="{'error': !validObj.spec}" v-model="applyObj.spec" @blur="checkSpec" @input="onSpecInput"/>
+          </div>
           <div class="form-item">
            <span>
               封装:
@@ -143,49 +155,7 @@
   </div>
 </template>
 <script>
-  let getRealLen = function (str) {
-    let len = 0
-    for (let i = 0; i < str.length; i++) {
-      if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
-        len += 2
-      } else {
-        len++
-      }
-    }
-    return len
-  }
-  let cutOutString = function (str, length) {
-    for (let i = 1; i <= str.length; i++) {
-      if (getRealLen(str.substr(0, i)) > length) {
-        str = str.substr(0, i - 1)
-        break
-      }
-    }
-    return str
-  }
-  let formatDate = function (date, fmt) {
-    if (typeof date === 'string') {
-      date = new Date(Date.parse(date.replace(/-/g, '/')))
-    }
-    let o = {
-      'M+': date.getMonth() + 1, // 月份
-      'd+': date.getDate(), // 日
-      'h+': 23, // 小时
-      'm+': 59, // 分
-      's+': 59, // 秒
-      'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
-      'S': date.getMilliseconds() // 毫秒
-    }
-    if (/(y+)/.test(fmt)) {
-      fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
-    }
-    for (let k in o) {
-      if (new RegExp('(' + k + ')').test(fmt)) {
-        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
-      }
-    }
-    return fmt
-  }
+  import { getRealLen, cutOutString, formatDate, checkNullStr } from '~utils/baseUtils'
   export default {
     data () {
       return {
@@ -194,6 +164,8 @@
           brand: '',
           unitPrice: '',
           currency: 'RMB',
+          prodTitle: '',
+          spec: '',
           encapsulation: '',
           produceDate: '',
           amount: '',
@@ -206,7 +178,8 @@
 //          encapsulation: true,
 //          produceDate: true,
           amount: true,
-          deadline: true
+          deadline: true,
+          spec: true
         },
         pickerOptions: {
           disabledDate (time) {
@@ -268,6 +241,7 @@
               inquiry.enUU = this.user.data.enterprise.uu
             }
             let date = new Date()
+            let currency = this.applyObj.unitPrice ? this.applyObj.currency : null
             inquiry.recorderUU = this.user.data.userUU
             inquiry.code = 'MALL' + date.getTime()
             inquiry.date = date
@@ -282,16 +256,19 @@
             inquiryItem.userTel = this.user.data.userTel
             inquiryItem.needquantity = this.applyObj.amount
             inquiryItem.inbrand = this.applyObj.brand
-            inquiryItem.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
-            inquiryItem.cmpCode = (this.applyObj.code).toUpperCase()
+            inquiryItem.currency = currency
+            inquiryItem.cmpCode = this.applyObj.code.toUpperCase()
             inquiryItem.unitPrice = this.applyObj.unitPrice
             inquiryItem.produceDate = this.applyObj.produceDate
             inquiryItem.date = date
             inquiryItem.endDate = this.applyObj.deadline
             inquiryItem.encapsulation = this.applyObj.encapsulation
+            inquiryItem.spec = this.applyObj.spec
+            inquiryItem.prodTitle = this.applyObj.prodTitle
             let inquiryItems = []
             inquiryItems.push(inquiryItem)
             inquiry.inquiryItems = inquiryItems
+            inquiry.currency = this.applyObj.unitPrice ? this.applyObj.currency : null
             this.$http.post('/inquiry/buyer/save', inquiry)
               .then(response => {
                 this.$message.success('发布成功')
@@ -304,11 +281,7 @@
                 this.$message.error('发布失败')
               })
           } else {
-            if (!this.validObj.code) {
-              this.$message.error('型号不能为空')
-            } else if (!this.validObj.brand) {
-              this.$message.error('品牌不能为空')
-            } else if (!this.validObj.deadline) {
+            if (!this.validObj.deadline) {
               this.$message.error('截止日期不能为空')
             } else if (!this.validObj.amount) {
               this.$message.error('请输入正确的数值')
@@ -319,30 +292,48 @@
         }
       },
       getSimilarCode: function () {
-        this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
-          .then(response => {
-            this.similarCode = response.data
-            this.showSimilarCodeList = response.data.length > 0
-          })
+        if (this.applyObj.code) {
+          this.$http.get('/search/similarComponents', {params: {keyword: this.applyObj.code}})
+            .then(response => {
+              this.similarCode = response.data
+              this.showSimilarCodeList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarCodeList = false
+        }
       },
       getSimilarBrand: function () {
-        this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
-          .then(response => {
-            this.similarBrand = response.data
-            this.showSimilarBrandList = response.data.length > 0
-          })
+        if (this.applyObj.brand) {
+          this.$http.get('/search/similarBrands', {params: {keyword: this.applyObj.brand}})
+            .then(response => {
+              this.similarBrand = response.data
+              this.showSimilarBrandList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarBrandList = false
+        }
       },
       checkCode: function () {
-        this.validObj.code = this.applyObj.code && this.applyObj.code !== ''
+        let nullStrFlag = checkNullStr(this.applyObj.code)
+        this.validObj.code = this.applyObj.code && this.applyObj.code !== '' && nullStrFlag
         if (!this.validObj.code) {
-          this.$message.error('型号不能为空')
+          if (!nullStrFlag) {
+            this.$message.error('型号输入不合法')
+          } else {
+            this.$message.error('型号不能为空')
+          }
         }
         return this.validObj.code
       },
       checkBrand: function () {
-        this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== ''
+        let nullStrFlag = checkNullStr(this.applyObj.brand)
+        this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== '' && nullStrFlag
         if (!this.validObj.brand) {
-          this.$message.error('品牌不能为空')
+          if (!nullStrFlag) {
+            this.$message.error('品牌输入不合法')
+          } else {
+            this.$message.error('品牌不能为空')
+          }
         }
         return this.validObj.brand
       },
@@ -353,12 +344,20 @@
         }
         return this.validObj.unitPrice
       },
+      checkSpec: function () {
+        let nullStrFlag = checkNullStr(this.applyObj.spec)
+        this.validObj.spec = nullStrFlag
+        if (!nullStrFlag) {
+          this.$message.error('规格输入不合法')
+        }
+        return this.validObj.spec
+      },
       checkAmount: function () {
         this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
         return this.validObj.amount
       },
       checkAll: function () {
-        return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount()
+        return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkUnitPrice() && this.checkAmount() && this.checkSpec()
       },
       checkDeadline: function () {
         this.validObj.deadline = Boolean(this.applyObj.deadline)
@@ -391,6 +390,16 @@
           this.applyObj.encapsulation = cutOutString(this.applyObj.encapsulation, 20)
         }
       },
+      onProdTitleInput: function () {
+        if (this.applyObj.prodTitle && getRealLen(this.applyObj.prodTitle) > 40) {
+          this.applyObj.prodTitle = cutOutString(this.applyObj.prodTitle, 40)
+        }
+      },
+      onSpecInput: function () {
+        if (this.applyObj.spec && getRealLen(this.applyObj.spec) > 100) {
+          this.applyObj.spec = cutOutString(this.applyObj.spec, 100)
+        }
+      },
       onCodeChange: function () {
         this.applyObj.code = this.applyObj.code.trim()
         if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
@@ -423,9 +432,8 @@
           }
         } else if (this.applyObj.brand && getRealLen(this.applyObj.brand) > 50) {
           this.applyObj.brand = cutOutString(this.applyObj.brand, 50)
-        } else {
-          this.getSimilarBrand()
         }
+        this.getSimilarBrand()
       },
       onAmountInput: function () {
         if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
@@ -445,7 +453,7 @@
         if (!this.user.logged) {
           this.$router.push('/auth/login?returnUrl=' + window.location.href)
         } else if (data.success) {
-          window.open('/applyPurchase/' + data.data)
+          window.location.href = '/applyPurchase/' + data.data
         } else {
           this.$message.error(data.message)
         }
@@ -547,16 +555,16 @@
         float: left;
         height: 100%;
         p {
-          padding-top: 18px;
-          font-size: 26px;
+          padding-top: 8px;
+          font-size: 22px;
           color: #3975f4;
-          margin-bottom: 7px;
+          margin-bottom: 4px;
         }
         >div {
           text-align: left;
           margin-left: 14px;
           .form-item {
-            margin-bottom: 5px;
+            margin-bottom: 3px;
             position: relative;
             span {
               width: 80px;
@@ -616,8 +624,8 @@
             input {
               font-size: 12px;
               width: 111px;
-              height: 20px;
-              line-height: 20px;
+              height: 18px;
+              line-height: 18px;
               border-radius: 2px;
               padding: 0 3px;
               box-shadow: none;
@@ -652,8 +660,8 @@
         color: #fff;
         position: relative;
         h1 {
-          font-size: 26px;
-          margin: 22px 0 0 0;
+          font-size: 22px;
+          margin: 11px 0 0 0;
         }
         h2 {
           font-size: 16px;

+ 5 - 3
components/applyPurchase/SayPrice.vue

@@ -140,7 +140,7 @@
           purchaseMan.leadtime = this.sayPriceObj.leadtime
           purchaseMan.replies = this.sayPriceObj.replies
           purchaseMan.vendUU = this.user.data.enterprise.uu
-          purchaseMan.vendorUserUU = this.user.data.userUU
+          purchaseMan.vendUserUU = this.user.data.userUU
           purchaseMan.qutoApp = 'MALL'
           if (!purchaseMan.currency) {
             purchaseMan.currency = this.sayPriceObj.currency
@@ -219,8 +219,8 @@
         }
       },
       onReplyLapQtyBlur: function (index) {
-        let lapQty = this.sayPriceObj.replies[index].lapQty
-        let limitDownObj = this.getLimitDownQty()
+        let lapQty = Number(this.sayPriceObj.replies[index].lapQty)
+        let limitDownObj = Number(this.getLimitDownQty())
         if (!lapQty || lapQty < 1) {
           this.sayPriceObj.replies[index].lapQty = ''
           this.$message.error('输入值必须为正整数')
@@ -285,6 +285,8 @@
     width: 476px;
     top: 30%;
     left: 33%;
+    bottom: 3%;
+    overflow-y: auto;
     /*-webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
     /*-moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);*/
     /*box-shadow: 0 5px 15px rgba(0,0,0,.5);*/

+ 3 - 73
components/common/buyOrCar/buyComponent.vue

@@ -6,6 +6,7 @@
 </template>
 
 <script>
+  import { enidfilter } from '~utils/baseUtils'
   export default {
     props: ['item', 'disabledFlag'],
     methods: {
@@ -30,19 +31,17 @@
                 minPackQty: this.item.minPackQty
               }])
                 .then(response => {
-          //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
                   if (response.data.success) {
                     if (response.data.message) {
                       this.$message({
                         message: response.data.message,
                         type: 'success'
                       })
-                      let _self = this
                       window.setTimeout(function () {
-                        window.location.href = '/user#/order/pay/' + _self.enidfilter(response.data.data.orderid)
+                        window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
                       }, 1000)
                     } else {
-                      window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
+                      window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
                     }
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
@@ -58,7 +57,6 @@
                   }
                 })
             } else {
-              // this.$store.dispatch('user/addCar', {uuid: item.uuid, batchCode: item.batchCode, number: item.minBuyQty})
               this.$http.post('trade/cart/add', {
                 uuid: this.item.uuid,
                 batchCode: this.item.batchCode,
@@ -94,74 +92,6 @@
             }
           }
         }
-        // window.location.href = 'user#/order/pay/' + this.enidfilter(this.buy_info.orderid)
-      },
-      enidfilter: function (str) {
-        if (str) {
-          let encryptStr = '' // 最终返回的加密后的字符串
-          // 产生三位随机数
-          let num = ''
-          for (let i = 0; i < 3; i++) {
-            num += Math.floor(Math.random() * 10)
-          }
-          encryptStr += num // 产生3位随机数
-
-          // 16位加密
-          let tempspit = ''
-          let strspit = str.toString().toLowerCase()
-          if (strspit.match(/^[-+]?\d*$/) === null) { // 非整数字符,对每一个字符都转换成16进制,然后拼接
-            /**
-             * Unicode汉字、英文字母、数字的unicode范围
-             *汉字:[0x4e00,0x9fa5](或十进制[19968,40869])
-             *数字:[0x30,0x39](或十进制[48, 57])
-             *小写字母:[0x61,0x7a](或十进制[97, 122])
-             *大写字母:[0x41,0x5a](或十进制[65, 90]
-             * 'a'的Unicode编码:'&#97;',charCodeAt()的值是97
-             * '码'的Unicode编码:'\u7801', new String('码').charCodeAt()的值是30721,30721的16进制表示是7801
-             */
-            let s = strspit.split('')
-            for (let i = 0; i < s.length; i++) {
-              s[i] = s[i].charCodeAt() // 先转换成Unicode编码
-              s[i] = s[i].toString(16)
-              // 因为在服务器是每两位当做一个字符进行解析的,所以这里每个字符的Unicode编码范围必须在0——255之间。数字和大小写满足该要求,特殊字符则不一定,如果后续有特殊字符的要求,需要重写编码器和解码器
-              if (s[i].length === 1) {
-                s[i] = '0' + s[i]
-              }
-              tempspit = tempspit + s[i]
-            }
-            tempspit = tempspit + '{' + 1 // 1代表字符
-          } else { // 数字直接转换成16进制
-            strspit = parseInt(strspit)
-              .toString(16)
-            tempspit = strspit + '{' + 0 // 0代表纯数字
-          }
-
-          let temp = tempspit.split('{') // 对要加密的字符转换成16进制
-          let numLength = temp[0].length // 转换后的字符长度
-          numLength = numLength.toString(16) // 字符长度换算成16进制
-          if (numLength.length === 1) { // 如果是1,补一个0
-            numLength = '0' + numLength
-          } else if (numLength.length > 3) { // 转换后的16进制字符长度如果大于2位数,则返回,不支持
-            return ''
-          }
-          encryptStr += numLength
-          if (temp[1] === '0') {
-            encryptStr += 0
-          } else if (temp[1] === '1') {
-            encryptStr += 1
-          }
-          encryptStr += temp[0]
-          if (encryptStr.length < 20) { // 如果小于20位,补上随机数
-            // 产生三位随机数
-            let numtwo = ''
-            for (let i = 0; i < 20 - encryptStr.length; i++) {
-              numtwo += Math.floor(Math.random() * 10)
-            }
-            let ran = numtwo // 产生3位随机数
-            encryptStr += ran
-          }
-          return encryptStr
-        }
       }
     }
   }

+ 4 - 1
components/common/loading/Loading.vue

@@ -1,5 +1,5 @@
 <template lang="html">
-  <div class="loading" v-if="loading">
+  <div class="loading" v-show="loading" id="loading">
     <img src="/images/all/loading.gif" alt="">
   </div>
 </template>
@@ -33,4 +33,7 @@
     position: relative;
     top: 40%;
   }
+  .loading.in {
+    display: block !important;
+  }
 </style>

+ 1 - 1
components/default/Footer.vue

@@ -44,7 +44,7 @@
       <ul class="footer-notice list-unstyled">
         <li>客服电话:400-830-1818</li>
         <li>公司地址:深圳市南山区英唐大厦一楼</li>
-        <li>©2016 深圳市优软科技有限公司 粤ICP备15112126号-3</li>
+        <li>©2016 深圳市优软科技有限公司 粤ICP备15112126号-4</li>
       </ul>
       <div class="footer-credit">
         <a href="javascript:void(0)"><img src="/images/credit/1.jpg" /></a>

+ 1 - 1
components/default/Header.vue

@@ -226,7 +226,7 @@
   @import '~assets/scss/mixins';
   @import '~assets/scss/variables';
 
-  $nav-height: 36px;
+  $nav-height: 38px;
 
   .header {
     height: $nav-height;

+ 89 - 0
components/error/error.vue

@@ -0,0 +1,89 @@
+<template>
+  <div class="Content404">
+    <div class="image404">
+      <div class="bottomText">
+        <div class="title">
+          <template v-if="title=== '产品'">
+            抱歉!您查看的{{title}}
+            <span>不存在</span>,可能已
+            <span>下架</span>或
+            <span>被转移</span>......
+          </template>
+          <template v-else>
+            抱歉!您查看的{{title}}
+            <span>不存在</span>......
+          </template>
+        </div>
+        <div class="infotext" v-if="title==='店铺' || title==='器件' || title==='类目'">您可以逛逛:
+          <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
+          <span>|</span>
+          <nuxt-link :to="{ path: '/provider/factories'}">原厂专区</nuxt-link>
+          <span>|</span>
+          <nuxt-link :to="{ path: '/provider/home'}">代理经销</nuxt-link>
+        </div>
+
+        <div class="infotext" v-else-if="title==='品牌'">您可以逛逛:
+          <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
+          <span>|</span>
+          <nuxt-link :to="{ path: '/product/brand/brandList/ABC'}">品牌中心</nuxt-link>
+          <span>|</span>
+          <nuxt-link :to="{ path: '/provider/factories'}">原厂专区</nuxt-link>
+        </div>
+
+        <div class="infotext" v-else-if="title==='品牌'">您可以逛逛:
+          <nuxt-link :to="{ path: '/'}">商城首页</nuxt-link>
+          <span>|</span>
+          <nuxt-link :to="{ path: '/product/home'}">代理分销</nuxt-link>
+          <span>|</span>
+          <nuxt-link :to="{ name: 'store-uuid', params: { uuid: '33069557578d44e69bd91ad12d28a8d4' }}">库存寄售</nuxt-link>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    title: {
+      type: String,
+      default: ''
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.Content404 {
+  background: #fff;
+  text-align: center;
+  .image404 {
+    position: relative;
+    background: url('/images/404-details.png') top center no-repeat;
+    height: 500px;
+    position: relative;
+    text-align: center;
+    margin: 0 auto;
+    color: #666;
+    font-weight: bold;
+    font-size: 24px;
+    .bottomText {
+      position: absolute;
+      width: 100%;
+      bottom: 70px;
+      .title span {
+        color: #fd7022;
+      }
+      .infotext {
+        margin-top: 25px;
+        color: #959494;
+        font-size: 14px;
+        span {
+          margin: 0 6px;
+        }
+      }
+    }
+  }
+}
+</style>

+ 3 - 0
components/error/index.js

@@ -0,0 +1,3 @@
+import ErrorPage from './error.vue'
+
+export { ErrorPage }

+ 12 - 12
components/home/Advert.vue

@@ -25,26 +25,26 @@
           url: 'http://www.usoftmall.com/store/worldshine',
           img: '/images/adverts/1.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/adtracon',
-          img: '/images/adverts/2.jpg'
+          url: 'https://www.usoftmall.com/store/d2dd2e6fb752434396c58448a91ac85b',
+          img: 'https://dfs.ubtob.com/group1/M00/62/22/CgpkyFp6yqCAOX_SAAAXCY1rKvQ451.jpg'
         }, {
           url: 'http://www.usoftmall.com/store/compa',
           img: '/images/adverts/3.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/corestaff',
-          img: '/images/adverts/4.jpg'
+          url: 'https://www.usoftmall.com/store/9e8d68432e8a43b59e10f623a4946378',
+          img: 'https://dfs.ubtob.com/group1/M00/61/FD/CgpkyFpgcaiAYBj8AAA4_ERd5ds479.png'
         }, {
-          url: 'http://www.usoftmall.com/store/chipled',
-          img: '/images/adverts/5.jpg'
+          url: 'https://www.usoftmall.com/store/d53e5fea4f5c4432802e3e3673985029',
+          img: 'https://dfs.ubtob.com/group1/M00/88/2D/CgpkyFqvflSAJkX4AAA-iLkJ9wM609.png'
         }, {
-          url: 'http://www.usoftmall.com/store/opd',
-          img: '/images/adverts/6.jpg'
+          url: 'https://www.usoftmall.com/store/1669779299694c53a898897f87460ec7',
+          img: 'https://dfs.ubtob.com/group1/M00/2E/BD/CgpkyFlsFsKAJws_AAAcqAKgSlI228.png'
         }, {
-          url: 'http://www.usoftmall.com/store/jrxy',
-          img: '/images/adverts/7.jpg'
+          url: 'https://www.usoftmall.com/store/ff8d0fe60f5e4fcf8cdccce1ca71ec3d',
+          img: 'https://dfs.ubtob.com/group1/M00/87/FB/CgpkyFqflhaAdMC0AADLt1xhsxk699.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/hbt',
-          img: '/images/adverts/8.jpg'
+          url: 'https://www.usoftmall.com/store/bf0090954cfd4f96bb2ff47f3ed6eb09',
+          img: 'https://dfs.ubtob.com/group1/M00/88/59/CgpkyFramdyAA_EaAABuHeBKg18053.jpg'
         }, {
           url: 'http://www.usoftmall.com/store/yjycoin',
           img: '/images/adverts/9.jpg'

+ 2 - 0
components/home/News.vue

@@ -57,6 +57,8 @@
 </script>
 <style lang="scss" scoped>
   .news {
+    width: 100%;
+    margin: 0 auto;
     height: 280px;
     width: 100%;
     margin: 0 auto;

+ 15 - 11
components/home/floor/FloorList.vue

@@ -6,7 +6,7 @@
       <div v-if="purchaseManListData && false"></div>
       <div class="banner">
         <ul class="seek-banner">
-          <li><a href="/store/33069557578d44e69bd91ad12d28a8d4" target="_blank"><img src="/images/all/banner-cuxiao001.png" alt=""></a></li>
+          <li><a href="/store/33069557578d44e69bd91ad12d28a8d4" target="_blank"><img src="/images/all/banner-cuxiao001.jpg" alt=""></a></li>
           <li>
             <div class="banner-cuxiao">
               <div class="wrap">
@@ -23,8 +23,8 @@
                   <li v-for="(purchaseMan, index) in purchaseManList.content" :style="'top: -' + 32 * timerIndex + 'px'">
                     <div>{{purchaseMan.date | date}}</div>
                     <div>
-                      <span v-if="purchaseMan.inquiry && purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{purchaseMan.inquiry.enterprise.enName | enterpriseFilter}}</span>
-                      <span v-else>{{purchaseMan.userName | userNameFilter}}</span>
+                      <span :title="user.logged ? purchaseMan.inquiry.enterprise.enName : null" v-if="purchaseMan.inquiry && purchaseMan.inquiry.enterprise && purchaseMan.inquiry.enterprise.enName">{{[purchaseMan.inquiry.enterprise.enName, user] | enterpriseFilter}}</span>
+                      <span :title="user.logged ? purchaseMan.userName : null" v-else>{{[purchaseMan.userName, user] | userNameFilter}}</span>
                     </div>
                     <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode}}</div>
                     <div>
@@ -76,7 +76,7 @@
                 backGroundColor: '',
                 body: '',
                 hrefUrl: '/store/33069557578d44e69bd91ad12d28a8d4',
-                pictureUrl: '/images/floor/banner1.jpg',
+                pictureUrl: '/images/floor/banner01.jpg',
                 size: 'large'
               }
             ]
@@ -87,7 +87,7 @@
                 backGroundColor: '',
                 body: '',
                 hrefUrl: '/store/33069557578d44e69bd91ad12d28a8d4',
-                pictureUrl: '/images/floor/banner2.jpg',
+                pictureUrl: '/images/floor/banner02.jpg',
                 size: 'large'
               }
             ]
@@ -121,15 +121,19 @@
         const day = (new Date(date).getDate() - now)
         return day <= 0 ? '今天' : day + '天前'
       },
-      enterpriseFilter (str) {
-        if (str) {
-          return str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str
+      enterpriseFilter ([str, user]) {
+        if (!user.logged) {
+          return str ? str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str : '-'
         } else {
-          return '-'
+          return str || '-'
         }
       },
-      userNameFilter (str) {
-        return str ? str.substring(0, 1) + '**' : '-'
+      userNameFilter ([str, user]) {
+        if (!user.logged) {
+          return str ? str.substring(0, 1) + '**' : '-'
+        } else {
+          return str || '-'
+        }
       }
     },
     computed: {

+ 40 - 6
components/main/Search.vue

@@ -1,7 +1,7 @@
 <template>
-  <div class="search-box">
+  <div class="search-box" :class="{'search-box2': !SelectItem}">
     <div class="input-group">
-      <select @change="onSelectTypeChange" class="form-control select-type select-adder">
+      <select @change="onSelectTypeChange" class="form-control select-type select-adder" v-if="SelectItem">
         <option value="">产品</option>
         <option value="">店铺</option>
       </select>
@@ -12,11 +12,11 @@
              @keyup.40="onSelectChange(1)"
              @keyup.38="onSelectChange(-1)"
              @keyup.13="onSearch()"/>
-      <span class="input-group-btn" @click="onSearch()">
-        <button class="btn btn-primary search-btn" type="button">搜&nbsp;索</button>
+      <span class="input-group-btn" @click="onSearch()" style="z-index: 10">
+        <button class="btn btn-primary search-btn" type="button" :class="{'Isblue':!SelectItem}">搜&nbsp;索</button>
       </span>
     </div>
-    <ul class="association" v-show="showAssociate && searchType == 'product'"
+    <ul class="association" :class="{'association2': !SelectItem}" v-show="showAssociate && searchType == 'product'"
         @mouseenter="associate.focus=true" @mouseleave="associate.focus=false">
       <li v-if="similarKeywords.data.component && similarKeywords.data.component.length > 0" class="similar-title">型号:</li>
       <li v-for="(k, index) in similarKeywords.data.component" class="item"
@@ -34,7 +34,7 @@
           @click.stop.prevent="onAssociateClick(k.nameCn)">{{ k.nameCn }}
       </li>
     </ul>
-    <div class="search-hot">
+    <div class="search-hot" v-if="SelectItem">
       <ul class="list-untyled">
         <li class="item item-first">热门搜索</li>
         <li class="item" v-for="w in hotBrand" v-if="ifFloorsHotSearchInValid">
@@ -53,6 +53,12 @@
 <script>
   export default {
     name: 'search-box',
+    props: {
+      SelectItem: {
+        type: Boolean,
+        default: true
+      }
+    },
     data () {
       return {
         keyword: '',
@@ -227,6 +233,26 @@
       width: 79px;
       border-radius: 0;
     }
+
+    .Isblue{
+      vertical-align: middle;
+      display: inline-block;
+      text-align: center;
+      width: 72px;
+      border-left: 0;
+      background: #d3e1fc;
+      color: #5078cb;
+      text-align: center;
+      font-size: 14px;
+      position: absolute;
+      right: 0;
+      top: 0;
+      &:hover {
+        background: #d2272d;
+        color: #fff;
+        transition: all .3s;
+      }
+    }
     .search-hot ul{
       line-height: 12px;
     }
@@ -286,5 +312,13 @@
         cursor: default;
       }
     }
+    .association2 {
+      left: 2px;
+      right: 71px
+    }
+  }
+
+  .search-box2 {
+    width: 442px;
   }
 </style>

+ 2 - 2
components/main/index.js

@@ -1,4 +1,4 @@
 import MainHeader from './Header.vue'
 import MainNav from './Nav.vue'
-
-export { MainHeader, MainNav }
+import VendorHeader from './vendorHeader.vue'
+export { MainHeader, MainNav, VendorHeader }

+ 66 - 0
components/main/vendorHeader.vue

@@ -0,0 +1,66 @@
+<template>
+  <div class="user_header clearfix">
+    <div class="container">
+      <!--Logo商标-->
+      <div class="user_header-brand pull-left">
+        <nuxt-link :to="'/'">
+          <img src="/images/vendor/logo.png" class="mall-logo"/>
+          <!-- <div class="mall-slogan">
+            <p>For the World<br/>为世界电子产业创造价值</p>
+          </div> -->
+        </nuxt-link>
+      </div>
+      <!--搜索-->
+      <div class="user_header-search">
+        <search-box :SelectItem="false"></search-box>
+      </div>
+      <!--统计-->
+      <!-- <div class="header-count pull-right">
+        <count-box></count-box>
+      </div> -->
+    </div>
+  </div>
+</template>
+<script>
+import SearchBox from './Search.vue'
+import CountBox from './count/Box.vue'
+
+export default {
+  name: 'home-header',
+  components: {
+    SearchBox,
+    CountBox
+  }
+}
+</script>
+<style lang="scss" scoped>
+@import '~assets/scss/variables';
+
+.user_header {
+  width: 100%;
+  margin: 0px auto;
+  height: 80px;
+  background: #5078cb;
+  .user_header-brand {
+    .mall-logo {
+      margin-top: 15px;
+    }
+
+    .mall-slogan {
+      line-height: 20px;
+      font-weight: bold;
+      color: $primary;
+      border-left: 1px solid $primary;
+      padding-left: 12px;
+      margin-left: 118px;
+      margin-top: 20px;
+    }
+  }
+
+  .user_header-search {
+    margin-top: 20px;
+    margin-left: 75px;
+    float: right
+  }
+}
+</style>

+ 133 - 246
components/mobile/Home.vue

@@ -1,288 +1,175 @@
 <template>
-  <div class="home">
+  <div>
+    <div class="home" 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>
+          <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/shop">
+            <img src="/images/mobile/@2x/applyPurchase/home/shop.png" alt="">
+            <span>店铺列表</span>
+            <i></i>
+          </nuxt-link>
+        </li>
+        <li>
+          <nuxt-link to="/mobile/brand/brandCenter/ABCD">
+            <img src="/images/mobile/@2x/applyPurchase/home/brand.png" alt="">
+            <span>品牌列表</span>
+            <i></i>
+          </nuxt-link>
+        </li>
+        <li>
+          <nuxt-link to="/mobile/applyPurchase/list">
+            <img src="/images/mobile/@2x/applyPurchase/home/seek.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="purchaseManList"></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>
         <div class="mobile-modal-content">
-          <div>商家地址:深圳市南山区英唐大厦6楼</div>
-         <!-- <div class="content-line link-url">在线咨询</div>-->
+          <div>商家地址:深圳市南山区英唐大厦1楼</div>
+          <!-- <div class="content-line link-url">在线咨询</div>-->
           <div>致电:<a href="tel:4008301818" target="_blank" class="content-line link-url">4008301818</a></div>
           <div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>
         </div>
       </div>
     </div>
-    <div v-if="!showMainSearch">
-      <div class="home-header" :style="'background:url(' + bgUrl + ')no-repeat center center/100% 6.14rem'">
-        <!--<a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>-->
-        <div class="home-search">
-          <!--<ul>-->
-          <!--<li :class="activeType=='model'?'active':''" @click="activeType='model'"><span>型号</span></li>-->
-          <!--<li :class="activeType=='brand'?'active':''" @click="activeType='brand'"><span>品牌</span></li>-->
-          <!--<li :class="activeType=='shops'?'active':''" @click="activeType='shops'"><span>商家</span></li>-->
-          <!--</ul>-->
-          <div class="home-input">
-            <input type="text" placeholder="请输入您要查找的型号或品牌"
-                   @click="onHomeSearchClick()"/>
-            <i class="iconfont icon-sousuo"></i>
-          </div>
-          <!--<p style="color:#e45803;line-height:.4rem;margin-top:.1rem;width:4.2rem;margin-left:1rem;">搜品牌、搜现货 、搜好店 、搜规格书 就上优软商城</p>-->
-        </div>
-      </div>
-      <div class="home-main">
-        <nuxt-link to="/mobile/shop" class="home-main-content">
-          <div>
-            <img src="/images/mobile/@2x/home/shopbrand@2x.png">
-          </div>
-          <p>店铺列表</p>
-        </nuxt-link>
-        <nuxt-link to="/mobile/brand/brandCenter/ABCD" class="home-main-content">
-          <div>
-            <!--<i class="icon-pinpai iconfont"></i>-->
-            <img src="/images/mobile/@2x/home/brand@2x.png" alt="">
-          </div>
-          <!--<h2>
-            {{numbrand[0]}}
-          </h2>-->
-          <p>品牌列表</p>
-        </nuxt-link>
-        <a @click="goCollect" class="home-main-content">
-          <div>
-            <img src="/images/mobile/@2x/home/storebrand@2x.png">
-          </div>
-          <p>我的收藏</p>
-        </a>
-        <a @click="showStoreInfo = true" class="home-main-content">
-          <div>
-            <img src="/images/mobile/@2x/home/phonebrand@2x.png">
-          </div>
-          <p>联系我们</p>
-        </a>
-        <!--<a class="home-main-content">
-          <div>
-            <i class="icon-xinghao iconfont"></i>
-          </div>
-          <h2>
-            {{numbrand[1]}}
-          </h2>
-          <p>型号</p>
-        </a>
-        <a class="home-main-content">
-          <div>
-            <i class="icon-biaoguigeshuomingshu iconfont"></i>
-          </div>
-          <h2>
-            {{numbrand[2]}}
-          </h2>
-          <p>规格书</p>
-        </a>-->
-      </div>
-    </div>
-    <main-search v-else @cancelSearchAction="onCancelSearch"></main-search>
-    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
+    <main-search v-if="showMainSearch" @cancelSearchAction="onCancelSearch"></main-search>
   </div>
 </template>
-
 <script>
+  import SeekList from './applyPurchase/SeekList.vue'
   import MainSearch from '~/components/mobile/search/MainSearch.vue'
-  import {LoginBox} from '~components/mobile/common'
   export default {
-    name: 'home',
     data () {
       return {
-        activeType: 'model',
-        showMainSearch: false,
         showStoreInfo: false,
-        isMore: false,
-        isShow: false,
-        len: 0,
-        bgUrl: '/images/mobile/@2x/home/background@2x.png',
-        showLoginBox: false
+        showMainSearch: false,
+        swiperOption: {
+          autoplay: 3000,
+          initialSlide: 0,
+          pagination: '.swiper-pagination',
+          // 解决点击分页器后图片就不能轮播的问题
+          autoplayDisableOnInteraction: false,
+          paginationClickable: true,
+          mousewheelControl: false,
+          effect: 'fade',
+          lazyLoading: true,
+          loop: true,
+          prevButton: '.swiper-button-prev',
+          nextButton: '.swiper-button-next'
+        }
       }
     },
     components: {
-      MainSearch,
-      LoginBox
+      SeekList,
+      MainSearch
+    },
+    computed: {
+      purchaseManList () {
+        return this.$store.state.applyPurchase.purchaseManList.purchaseHomeList.data.content
+      }
     },
     methods: {
       onHomeSearchClick () {
         this.showMainSearch = true
         this.$store.dispatch('searchData/getSearchHistory')
       },
-      matNumber (num) {
-        if (num > 99999999) {
-          this.isShow = true
-          let str2 = num.toString()
-          num = Math.floor(num / 100000000)
-          if (parseInt(str2.charAt(str2.length - 8)) > 8) {
-            num = num + 1
-          }
-          num += '亿'
-        }
-        if (num > 9999) {
-          this.isMore = true
-          let str = num.toString()
-          num = Math.floor(num / 10000)
-          if (parseInt(str.charAt(str.length - 4)) > 4) {
-            num = num + 1
-          }
-          num += '万'
-        } else {
-          num += '个'
-        }
-        return num
-      },
-      forNum (numbers) {
-        let num = []
-        for (let i = 0; i < numbers.length; i++) {
-          num.push(this.matNumber(numbers[i].count))
-        }
-        return num
-      },
       onCancelSearch: function () {
         this.showMainSearch = false
-      },
-      goCollect: function () {
-        if (this.user.logged) {
-          this.$router.push('/mobile/user')
-        } else {
-          this.showLoginBox = true
-        }
-      },
-      goLastPage: function () {
-        window.history.back(-1)
-      }
-    },
-    computed: {
-      numbrand () {
-        return this.forNum(this.counts)
-      },
-      counts () {
-        return this.$store.state.product.common.counts.data
-      },
-      user () {
-        return this.$store.state.option.user
       }
     }
   }
 </script>
-
-<style lang="scss" scoped>
-  .home{
-    font-size: .28rem;
-    background: #f7fbff;
-    position: fixed;
-    top: 0;
-    bottom: .98rem;
-    width: 100%;
-    overflow-y: auto;
-    .home-header{
-      width:100%;
-      height:6.12rem;
-      >a{
-        font-size:.28rem;
-        color:#fff;
+<style lang="scss">
+  .home {
+    padding-bottom: 1rem;
+    .header {
+      height: 3.26rem;
+      position: relative;
+      .home-bg {
+        height: 3.26rem;
+        width: 100%;
+      }
+      .search-content {
         position: absolute;
-        left: .1rem;
-        top: .2rem;
-        i{
-          font-size: .48rem;
-          margin-right: -.1rem;
-          color: #666;
-        }
+        top: 0;
+        width: 100%;
+      }
+      .swiper-container {
+        height: 3.26rem;
+        position: absolute;
+        top: 0;
+        width: 100%;
+        z-index: 0;
+      }
+      .swiper-pagination-fraction, .swiper-pagination-custom, .swiper-container-horizontal > .swiper-pagination-bullets {
+        bottom: .1rem !important;
       }
-      .home-search{
-        width:6rem;
-        line-height: .3rem;
-        margin:0 auto;
+      .swiper-container-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet {
+        width: .16rem !important;
+        height: .16rem !important;
+        margin: 0 .2rem;
+      }
+    }
+    .link-list {
+      background: #f3f3f7;
+      height: 1.36rem;
+      li {
+        position: relative;
+        display: inline-block;
+        width: 33.3%;
         text-align: center;
-        padding-top: 1.74rem;
-        ul{
-          display:inline-flex;
-        li{
-          flex:1;
-          text-align:center;
-          >span{
-             display:inline-block;
-             width:.72rem;
-             line-height:.33rem;
-             height:.33rem;
-             background: #fff;
-             color:#000;
-             border-radius: .05rem .05rem 0 0 ;
-           }
-          }
-          li.active span{
-              background: #3c7cf5;
-              color:#fff;
-              cursor:pointer;
-          }
+        float: left;
+        height: 1.36rem;
+        img {
+          width: .63rem;
+          height: .63rem;
+          margin-top: .2rem;
+        }
+        span {
+          font-size: .22rem;
+          color: #666;
+          display: block;
+          margin-top: .15rem;
         }
-        .home-input{
-          width: 6rem;
-          input{
-            width:5.17rem;
-            display: inline-block;
-            padding: 0 1rem 0 .16rem;
-            margin-right:-.83rem;
-            font-size:.24rem;
-            border:.04rem solid #3c7cf5;
-            border-radius:.05rem;
-            height: .68rem;
-          }
-          i{
-             display:inline-block;
-             text-align: center;
-             width:.83rem;
-             font-size:.33rem;
-             border-left:none;
-             color: #999;
-            vertical-align: middle;
-          }
+        i {
+          height: 0.9rem;
+          width: .01rem;
+          background: #ddd;
+          display: block;
+          position: absolute;
+          right: 0;
+          top: .2rem;
         }
       }
     }
-    }
-    .home-main{
-      text-align: center;
-      padding-top: .46rem;
-    }
-    .home-main a.home-main-content {
-      width:50%;
-      margin-bottom:.52rem;
-      display: inline-block;
-    }
-    .home-main .home-main-content div{
-      border-radius: .2rem;
-      width:1.14rem;
-      height:1.14rem;
-      margin:0 auto;
-    }
-    .home-main .home-main-content div>img{
-      width: 100%;
-      height:100%;
-    }
-  .home-main .home-main-content div>i {
-    font-size: .8rem;
-  }
-  .home-main .home-main-content:nth-child(3) div>i {
-    color: #ff3064;
   }
-  /*.home-main .home-main-content:nth-child(5) div>i {
-    color: #fa6743;
-  }
-  .home-main .home-main-content:nth-child(6) div>i {
-    color: #fcb836;
-  }*/
-    .home-main .home-main-content p{
-      font-size:.28rem;
-      color:rgb(51,51,51);
-      line-height: .52rem;
-    }
-    .home-main .home-main-content h2{
-      font-size:.3rem;
-      color:#ff7800;
-      line-height: .32rem;
-      margin:0;
-      margin-top:.1rem;
-    }
 </style>

+ 288 - 0
components/mobile/HomeOld.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="home">
+    <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>
+        <div class="mobile-modal-content">
+          <div>商家地址:深圳市南山区英唐大厦6楼</div>
+         <!-- <div class="content-line link-url">在线咨询</div>-->
+          <div>致电:<a href="tel:4008301818" target="_blank" class="content-line link-url">4008301818</a></div>
+          <div>邮件:<a href="mailto:yrsc@usoftchina.com" target="_blank" class="content-line link-url">yrsc@usoftchina.com</a></div>
+        </div>
+      </div>
+    </div>
+    <div v-if="!showMainSearch">
+      <div class="home-header" :style="'background:url(' + bgUrl + ')no-repeat center center/100% 6.14rem'">
+        <!--<a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>-->
+        <div class="home-search">
+          <!--<ul>-->
+          <!--<li :class="activeType=='model'?'active':''" @click="activeType='model'"><span>型号</span></li>-->
+          <!--<li :class="activeType=='brand'?'active':''" @click="activeType='brand'"><span>品牌</span></li>-->
+          <!--<li :class="activeType=='shops'?'active':''" @click="activeType='shops'"><span>商家</span></li>-->
+          <!--</ul>-->
+          <div class="home-input">
+            <input type="text" placeholder="请输入您要查找的型号或品牌"
+                   @click="onHomeSearchClick()"/>
+            <i class="iconfont icon-sousuo"></i>
+          </div>
+          <!--<p style="color:#e45803;line-height:.4rem;margin-top:.1rem;width:4.2rem;margin-left:1rem;">搜品牌、搜现货 、搜好店 、搜规格书 就上优软商城</p>-->
+        </div>
+      </div>
+      <div class="home-main">
+        <nuxt-link to="/mobile/shop" class="home-main-content">
+          <div>
+            <img src="/images/mobile/@2x/home/shopbrand@2x.png">
+          </div>
+          <p>店铺列表</p>
+        </nuxt-link>
+        <nuxt-link to="/mobile/brand/brandCenter/ABCD" class="home-main-content">
+          <div>
+            <!--<i class="icon-pinpai iconfont"></i>-->
+            <img src="/images/mobile/@2x/home/brand@2x.png" alt="">
+          </div>
+          <!--<h2>
+            {{numbrand[0]}}
+          </h2>-->
+          <p>品牌列表</p>
+        </nuxt-link>
+        <a @click="goCollect" class="home-main-content">
+          <div>
+            <img src="/images/mobile/@2x/home/storebrand@2x.png">
+          </div>
+          <p>我的收藏</p>
+        </a>
+        <a @click="showStoreInfo = true" class="home-main-content">
+          <div>
+            <img src="/images/mobile/@2x/home/phonebrand@2x.png">
+          </div>
+          <p>联系我们</p>
+        </a>
+        <!--<a class="home-main-content">
+          <div>
+            <i class="icon-xinghao iconfont"></i>
+          </div>
+          <h2>
+            {{numbrand[1]}}
+          </h2>
+          <p>型号</p>
+        </a>
+        <a class="home-main-content">
+          <div>
+            <i class="icon-biaoguigeshuomingshu iconfont"></i>
+          </div>
+          <h2>
+            {{numbrand[2]}}
+          </h2>
+          <p>规格书</p>
+        </a>-->
+      </div>
+    </div>
+    <main-search v-else @cancelSearchAction="onCancelSearch"></main-search>
+    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
+  </div>
+</template>
+
+<script>
+  import MainSearch from '~/components/mobile/search/MainSearch.vue'
+  import {LoginBox} from '~components/mobile/common'
+  export default {
+    name: 'home',
+    data () {
+      return {
+        activeType: 'model',
+        showMainSearch: false,
+        showStoreInfo: false,
+        isMore: false,
+        isShow: false,
+        len: 0,
+        bgUrl: '/images/mobile/@2x/home/background@2x.png',
+        showLoginBox: false
+      }
+    },
+    components: {
+      MainSearch,
+      LoginBox
+    },
+    methods: {
+      onHomeSearchClick () {
+        this.showMainSearch = true
+        this.$store.dispatch('searchData/getSearchHistory')
+      },
+      matNumber (num) {
+        if (num > 99999999) {
+          this.isShow = true
+          let str2 = num.toString()
+          num = Math.floor(num / 100000000)
+          if (parseInt(str2.charAt(str2.length - 8)) > 8) {
+            num = num + 1
+          }
+          num += '亿'
+        }
+        if (num > 9999) {
+          this.isMore = true
+          let str = num.toString()
+          num = Math.floor(num / 10000)
+          if (parseInt(str.charAt(str.length - 4)) > 4) {
+            num = num + 1
+          }
+          num += '万'
+        } else {
+          num += '个'
+        }
+        return num
+      },
+      forNum (numbers) {
+        let num = []
+        for (let i = 0; i < numbers.length; i++) {
+          num.push(this.matNumber(numbers[i].count))
+        }
+        return num
+      },
+      onCancelSearch: function () {
+        this.showMainSearch = false
+      },
+      goCollect: function () {
+        if (this.user.logged) {
+          this.$router.push('/mobile/user')
+        } else {
+          this.showLoginBox = true
+        }
+      },
+      goLastPage: function () {
+        window.history.back(-1)
+      }
+    },
+    computed: {
+      numbrand () {
+        return this.forNum(this.counts)
+      },
+      counts () {
+        return this.$store.state.product.common.counts.data
+      },
+      user () {
+        return this.$store.state.option.user
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+  .home{
+    font-size: .28rem;
+    background: #f7fbff;
+    position: fixed;
+    top: 0;
+    bottom: .98rem;
+    width: 100%;
+    overflow-y: auto;
+    .home-header{
+      width:100%;
+      height:6.12rem;
+      >a{
+        font-size:.28rem;
+        color:#fff;
+        position: absolute;
+        left: .1rem;
+        top: .2rem;
+        i{
+          font-size: .48rem;
+          margin-right: -.1rem;
+          color: #666;
+        }
+      }
+      .home-search{
+        width:6rem;
+        line-height: .3rem;
+        margin:0 auto;
+        text-align: center;
+        padding-top: 1.74rem;
+        ul{
+          display:inline-flex;
+        li{
+          flex:1;
+          text-align:center;
+          >span{
+             display:inline-block;
+             width:.72rem;
+             line-height:.33rem;
+             height:.33rem;
+             background: #fff;
+             color:#000;
+             border-radius: .05rem .05rem 0 0 ;
+           }
+          }
+          li.active span{
+              background: #3c7cf5;
+              color:#fff;
+              cursor:pointer;
+          }
+        }
+        .home-input{
+          width: 6rem;
+          input{
+            width:5.17rem;
+            display: inline-block;
+            padding: 0 1rem 0 .16rem;
+            margin-right:-.83rem;
+            font-size:.24rem;
+            border:.04rem solid #3c7cf5;
+            border-radius:.05rem;
+            height: .68rem;
+          }
+          i{
+             display:inline-block;
+             text-align: center;
+             width:.83rem;
+             font-size:.33rem;
+             border-left:none;
+             color: #999;
+            vertical-align: middle;
+          }
+        }
+      }
+    }
+    }
+    .home-main{
+      text-align: center;
+      padding-top: .46rem;
+    }
+    .home-main a.home-main-content {
+      width:50%;
+      margin-bottom:.52rem;
+      display: inline-block;
+    }
+    .home-main .home-main-content div{
+      border-radius: .2rem;
+      width:1.14rem;
+      height:1.14rem;
+      margin:0 auto;
+    }
+    .home-main .home-main-content div>img{
+      width: 100%;
+      height:100%;
+    }
+  .home-main .home-main-content div>i {
+    font-size: .8rem;
+  }
+  .home-main .home-main-content:nth-child(3) div>i {
+    color: #ff3064;
+  }
+  /*.home-main .home-main-content:nth-child(5) div>i {
+    color: #fa6743;
+  }
+  .home-main .home-main-content:nth-child(6) div>i {
+    color: #fcb836;
+  }*/
+    .home-main .home-main-content p{
+      font-size:.28rem;
+      color:rgb(51,51,51);
+      line-height: .52rem;
+    }
+    .home-main .home-main-content h2{
+      font-size:.3rem;
+      color:#ff7800;
+      line-height: .32rem;
+      margin:0;
+      margin-top:.1rem;
+    }
+</style>

+ 58 - 14
components/mobile/MobileFooter.vue

@@ -5,10 +5,16 @@
         <i :class="activeType=='home'?'iconfont icon-shouye':'iconfont icon-shouye1'"></i><p>首页</p>
       </nuxt-link>
     </span>
-    <span :class="activeType=='shops'?'active':''">
+    <!--<span :class="activeType=='shops'?'active':''">
       <nuxt-link to="/mobile/shop">
         <i :class="activeType=='shops'?'iconfont icon-dianpu':'iconfont icon-dianpu1'"></i><p>店铺</p>
       </nuxt-link>
+    </span>-->
+    <span class="seek" @click="goSayPrice">
+      <a>
+        <img src="/images/mobile/@2x/applyPurchase/home/seek-footer.png" alt="">
+        <p>发布求购</p>
+      </a>
     </span>
     <span :class="activeType=='user'?'active':''">
       <a @click="goCollect">
@@ -17,21 +23,29 @@
     </span>
     <a @click="toTop" v-show="!hideToTop"><i class="iconfont icon-arrow-up icon-xlg"></i></a>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
+    <publish-seek :showSayPriceBox="showSayPriceBox" @cancelAction="showSayPriceBox = false" @reloadAction="onReload" @remindAction="onRemind"></publish-seek>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
 </template>
 <script>
   import { scrollTo } from '~utils/scroll'
-  import {LoginBox} from '~components/mobile/common'
+  import {LoginBox, RemindBox} from '~components/mobile/common'
+  import PublishSeek from './applyPurchase/PublishSeek.vue'
   export default{
     name: 'MobileFooter',
     data () {
       return {
         hideToTop: true,
-        showLoginBox: false
+        showLoginBox: false,
+        showSayPriceBox: false,
+        remindText: '',
+        timeoutCount: 0
       }
     },
     components: {
-      LoginBox
+      LoginBox,
+      PublishSeek,
+      RemindBox
     },
     computed: {
       activeType () {
@@ -60,48 +74,67 @@
       },
       goCollect: function () {
         if (this.user.logged) {
-          this.$router.push('/mobile/user')
+          this.$router.push('/mobile/user?type=buyer')
+        } else {
+          this.showLoginBox = true
+        }
+      },
+      onReload: function () {
+        const path = this.$route.path
+        if (path === '/') {
+          this.$store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
+        } else if (path === '/mobile/applyPurchase/list') {
+          this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null})
+        }
+      },
+      goSayPrice: function () {
+        if (this.user.logged) {
+          this.showSayPriceBox = true
         } else {
           this.showLoginBox = true
         }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
       }
     }
   }
 </script>
-<style scoped>
+<style scoped lang="scss">
   .mobile-footer{
     position:fixed;
     bottom:0;
     width:100%;
     height:.98rem;
     text-align: center;
-    border-top:.04rem solid #ccc;
+    border-top:.02rem solid #ccc;
     background: #ffffff;
     z-index: 10;
   }
-  .mobile-footer span{
+  .mobile-footer > span{
     display: inline-block;
-    width: 2.5rem;
+    width: 2rem;
     font-size:.32rem;
     color:#b0b0b0;
     padding-top:.1rem;
   }
 
-  .mobile-footer span a{
+  .mobile-footer > span a{
     color:#b0b0b0;
   }
 
-  .mobile-footer span a i{
+  .mobile-footer > span a i{
     font-size:.45rem;
   }
-  .mobile-footer span a p{
+  .mobile-footer > span a p{
     font-size:.22rem;
   }
 
-  .mobile-footer span.active a{
+  .mobile-footer > span.active a{
     color:#3976f4;
   }
-  .mobile-footer >a {
+  .mobile-footer > a {
     position: absolute;
     right: .1rem;
     top: -1rem;
@@ -115,4 +148,15 @@
   .mobile-footer >a i{
     font-size: .46rem;
   }
+  .mobile-footer > span.seek {
+    width: 3.5rem;
+    position: relative;
+  }
+  .mobile-footer > span.seek img {
+    position: absolute;
+    width: 1.3rem;
+    height: 1.3rem;
+    top: -1.3rem;
+    right: 1.1rem;
+  }
 </style>

+ 24 - 6
components/mobile/MobileHeader.vue

@@ -89,11 +89,11 @@
     watch: {
       $route: function (val, oldVal) {
         this.showMainSearch = false
-        this.title = this.initHeader(val.path)
+        this.title = this.initHeader(val.path, val.query)
       }
     },
     created () {
-      this.title = this.initHeader(this.$route.path)
+      this.title = this.initHeader(this.$route.path, this.$route.query)
     },
     computed: {
       brandDetail () {
@@ -129,7 +129,7 @@
       goLastPage: function () {
         window.history.back(-1)
       },
-      initHeader: function (val) {
+      initHeader: function (val, query) {
 //        if (val !== '/' || !val || val === '') {
 //          this.showHeader = true
 //          this.showSearch = !val.startsWith('/mobile/search')
@@ -137,7 +137,7 @@
 //          this.showHeader = false
 //          this.showSearch = false
 //        }
-        this.showHeader = val !== '/' || !val || val === ''
+        this.showHeader = val && val !== '/' && val !== '/mobile/applyPurchase/list'
 //        this.showSearch = val !== '/' && !this.startWith(val, '/mobile/search')
         let title = '优软商城'
         if (this.startWith(val, '/mobile/brand/componentDetail/')) {
@@ -168,11 +168,23 @@
           title = '店铺列表'
 //          this.rightIcon = 'phone'
         } else if (this.startWith(val, '/mobile/user')) {
-          title = '我的收藏'
+          if (this.$route.query.type === 'saler') {
+            title = '卖家中心'
+          } else {
+            title = '买家中心'
+          }
 //          this.rightIcon = 'phone'
         } else if (this.startWith(val, '/mobile/search')) {
           title = '搜索结果'
 //          this.rightIcon = 'share'
+        } else if (this.startWith(val, '/mobile/applyPurchase/sayPrice')) {
+          title = '编辑报价'
+        } else if (this.startWith(val, '/mobile/applyPurchase/list')) {
+          if (query.status === '1') {
+            title = '已采纳'
+          } else {
+            title = '已报价'
+          }
         } else if (val === '' || val === '/' || !val) {
           title = '优软商城'
 //          this.rightIcon = 'phone'
@@ -267,7 +279,7 @@
     width:100%;
     height:.88rem;
     line-height: .88rem;
-    border-bottom:.04rem solid #ccc;
+    border-bottom:.01rem solid #ccc;
     background: #3e82f5;
     padding:0 .2rem 0 .1rem;
     color:#fff;
@@ -316,4 +328,10 @@
   .hide {
     display: none;
   }
+  .search-content {
+    margin-left: .5rem;
+    input {
+      color: #333;
+    }
+  }
 </style>

+ 453 - 0
components/mobile/applyPurchase/PublishSeek.vue

@@ -0,0 +1,453 @@
+<template>
+  <div class="mobile-modal" v-if="showSayPriceBox" @click="setShowCurrencyList(false)">
+    <div class="mobile-modal-box">
+      <div class="mobile-modal-header">发布求购<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="publish-seek">
+        <div class="content-line">
+          <span><i>*</i>型号:</span>
+          <input type="text" v-model="applyObj.code" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
+        </div>
+        <div class="content-line">
+          <span><i>*</i>品牌:</span>
+          <input type="text" v-model="applyObj.brand" @blur="checkBrand" @input="onBrandChange" placeholder="请勿填中文符号">
+        </div>
+        <div class="content-line">
+          <span><i>*</i>截止日期:</span>
+          <input type="date" v-model="applyObj.deadline" :min="minDay" :max="maxDay" @blur="deadlineChange">
+          <!--<el-date-picker-->
+            <!--v-model="applyObj.deadline"-->
+            <!--type="date"-->
+            <!--:editable="false"-->
+            <!--:clearable="true"-->
+            <!--size="mini">-->
+          <!--</el-date-picker>-->
+        </div>
+        <div class="content-line">
+          <span>币种:</span>
+          <a v-text="applyObj.currency" @click="setShowCurrencyList(!showCurrencyList, $event)"></a>
+          <img v-if="!showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
+          <img v-if="showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
+          <ul v-if="showCurrencyList">
+            <li @click="setCurrency('不限')">不限</li>
+            <li @click="setCurrency('RMB')">RMB</li>
+            <li @click="setCurrency('USD')">USD</li>
+          </ul>
+        </div>
+        <div class="content-line">
+          <span>数量:</span>
+          <input type="text" v-model="applyObj.amount" @blur="checkAmount" @input="onAmountInput">
+        </div>
+        <div class="content-line">
+          <span>生产日期:</span>
+          <input type="text" v-model="applyObj.produceDate" @input="onProduceDateChange">
+        </div>
+        <a @click="goPublish">确认发布</a>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  let formatDate = function (date, fmt) {
+    if (typeof date === 'string') {
+      date = new Date(Date.parse(date.replace(/-/g, '/')))
+    }
+    let o = {
+      'M+': date.getMonth() + 1, // 月份
+      'd+': date.getDate(), // 日
+      'h+': 23, // 小时
+      'm+': 59, // 分
+      's+': 59, // 秒
+      'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
+      'S': date.getMilliseconds() // 毫秒
+    }
+    if (/(y+)/.test(fmt)) {
+      fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
+    }
+    for (let k in o) {
+      if (new RegExp('(' + k + ')').test(fmt)) {
+        fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
+      }
+    }
+    return fmt
+  }
+  let getRealLen = function (str) {
+    let len = 0
+    for (let i = 0; i < str.length; i++) {
+      if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
+        len += 2
+      } else {
+        len++
+      }
+    }
+    return len
+  }
+  let cutOutString = function (str, length) {
+    for (let i = 1; i <= str.length; i++) {
+      if (getRealLen(str.substr(0, i)) > length) {
+        str = str.substr(0, i - 1)
+        break
+      }
+    }
+    return str
+  }
+  export default {
+    props: ['showSayPriceBox'],
+    data () {
+      return {
+        applyObj: {
+          code: '',
+          brand: '',
+          unitPrice: '',
+          currency: '不限',
+          encapsulation: '',
+          produceDate: '',
+          amount: '',
+          deadline: ''
+        },
+        validObj: {
+          code: true,
+          brand: true,
+          unitPrice: true,
+          amount: true,
+          deadline: true
+        },
+        showCurrencyList: false
+      }
+    },
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      },
+      minDay: function () {
+        return formatDate(new Date(), 'yyyy-MM-dd')
+      },
+      maxDay: function () {
+        let deadDate = new Date()
+        deadDate.setMonth(deadDate.getMonth() + 3)
+        deadDate.setDate(deadDate.getDate() + 1)
+        deadDate = formatDate(deadDate, 'yyyy-MM-dd')
+        return deadDate
+      }
+    },
+    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'
+        }
+      }
+    },
+    methods: {
+      cancel: function () {
+        this.$emit('cancelAction')
+      },
+      emptyForm: function () {
+        for (let attr in this.applyObj) {
+          this.applyObj[attr] = attr === 'currency' ? '不限' : ''
+        }
+      },
+      setRemindText: function (str) {
+        this.$emit('remindAction', str)
+      },
+      setShowCurrencyList: function (flag, e) {
+        if (e) {
+          e.stopPropagation()
+        }
+        this.showCurrencyList = flag
+      },
+      goPublish: function () {
+        if (this.checkAll()) {
+          let inquiry = {}
+          let inquiryItem = {}
+          if (this.user.data.enterprise) {
+            inquiry.enUU = this.user.data.enterprise.uu
+          }
+          let date = new Date()
+          let endDate = formatDate(this.applyObj.deadline, 'yyyy-MM-dd hh:mm:ss')
+          let currency = this.applyObj.currency === '不限' ? null : this.applyObj.currency
+          inquiry.recorderUU = this.user.data.userUU
+          inquiry.code = 'MALL' + date.getTime()
+          inquiry.date = date
+          inquiry.recorder = this.user.data.userName
+          inquiry.endDate = endDate
+          inquiry.sourceapp = 'MALL'
+          inquiry.amount = 1
+          inquiryItem.prodTitle = this.applyObj.code
+          inquiryItem.userUU = this.user.data.userUU
+          inquiryItem.source = 'MALL'
+          inquiryItem.userName = this.user.data.userName
+          inquiryItem.userTel = this.user.data.userTel
+          inquiryItem.needquantity = this.applyObj.amount
+          inquiryItem.inbrand = this.applyObj.brand
+          inquiryItem.custCurrency = currency
+          inquiryItem.cmpCode = (this.applyObj.code).toUpperCase()
+          inquiryItem.unitPrice = this.applyObj.unitPrice
+          inquiryItem.produceDate = this.applyObj.produceDate
+          inquiryItem.date = date
+          inquiryItem.endDate = endDate
+          inquiryItem.encapsulation = this.applyObj.encapsulation
+          let inquiryItems = []
+          inquiryItems.push(inquiryItem)
+          inquiry.inquiryItems = inquiryItems
+          inquiry.currency = currency
+          this.$http.post('/inquiry/buyer/save', inquiry)
+            .then(response => {
+//              this.$message.success('发布成功')
+              this.setRemindText('发布成功')
+              //                this.showRemindBox = true
+              this.emptyForm()
+              //                this.validObj.deadline = true
+              this.$emit('reloadAction')
+              this.cancel()
+            }, error => {
+              console.log(error)
+//              this.$message.error('发布失败')
+              this.setRemindText('发布失败')
+            })
+        } else {
+          if (!this.validObj.code) {
+            this.setRemindText('型号不能为空')
+          } else if (!this.validObj.brand) {
+            this.setRemindText('品牌不能为空')
+          } else if (!this.validObj.deadline) {
+            this.setRemindText('截止日期不能为空')
+          } else if (!this.validObj.amount) {
+            this.setRemindText('请输入正确的数值')
+          }
+        }
+      },
+      setCurrency: function (type) {
+        this.applyObj.currency = type
+      },
+      isValidDate: function (date) {
+        let now = new Date(formatDate(new Date(), 'yyyy-MM-dd')).getTime()
+        let time = new Date(date).getTime()
+        return !time || (time >= now && time <= now + 1000 * 60 * 60 * 24 * 91)
+      },
+      deadlineChange: function () {
+        if (!this.isValidDate(this.applyObj.deadline)) {
+          this.setRemindText('日期需不小于今天且在90天以内')
+          this.applyObj.deadline = ''
+          this.validObj.deadline = false
+        } else {
+          this.validObj.deadline = true
+        }
+      },
+      checkAll: function () {
+        return this.checkCode() && this.checkBrand() && this.checkDeadline() && this.checkAmount()
+      },
+      checkCode: function () {
+        this.validObj.code = this.applyObj.code && this.applyObj.code !== ''
+        if (!this.validObj.code) {
+          this.setRemindText('型号不能为空')
+        }
+        return this.validObj.code
+      },
+      checkBrand: function () {
+        this.validObj.brand = this.applyObj.brand && this.applyObj.brand !== ''
+        if (!this.validObj.brand) {
+          this.setRemindText('品牌不能为空')
+        }
+        return this.validObj.brand
+      },
+      checkAmount: function () {
+        this.validObj.amount = this.applyObj.amount === '' ? true : this.applyObj.amount > 0 && this.applyObj.amount < 1000000000
+        return this.validObj.amount
+      },
+      checkDeadline: function () {
+        this.validObj.deadline = Boolean(this.applyObj.deadline)
+        return this.validObj.deadline
+      },
+      onProduceDateChange: function () {
+        if (this.applyObj.produceDate && getRealLen(this.applyObj.produceDate) > 12) {
+          this.applyObj.produceDate = cutOutString(this.applyObj.produceDate, 12)
+        }
+      },
+      onCodeChange: function () {
+        this.applyObj.code = this.applyObj.code.trim()
+        if ((/[^\x00-\xff]/g).test(this.applyObj.code)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.applyObj.code.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.applyObj.code.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          this.applyObj.code = cutOutString(this.applyObj.code, chineseIndex)
+        } else if (this.applyObj.code && getRealLen(this.applyObj.code) > 100) {
+          this.applyObj.code = cutOutString(this.applyObj.code, 100)
+        }
+      },
+      onBrandChange: function () {
+        this.applyObj.brand = this.applyObj.brand.trim()
+        if ((/[^\x00-\xff]/g).test(this.applyObj.brand)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.applyObj.brand.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.applyObj.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.applyObj.brand.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          if (chineseIndex > -1) {
+            this.applyObj.brand = this.applyObj.brand.substring(0, chineseIndex)
+          }
+        } else if (this.applyObj.brand && getRealLen(this.applyObj.brand) > 50) {
+          this.applyObj.brand = cutOutString(this.applyObj.brand, 50)
+        }
+      },
+      onAmountInput: function () {
+        if (!(/^[0-9]*$/).test(this.applyObj.amount)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.applyObj.amount.length; i++) {
+            if (!(/^[0-9]*$/).test(this.applyObj.amount.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          this.applyObj.amount = cutOutString(this.applyObj.amount, chineseIndex)
+        } else if (this.applyObj.amount.length > 9) {
+          this.applyObj.amount = cutOutString(this.applyObj.amount, 9)
+        }
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal {
+    .mobile-modal-box {
+      position: fixed;
+      width: 5.92rem;
+      font-size: .28rem;
+      top: 50%;
+      left: 50%;
+      right: 11%;
+      z-index: 1000;
+      margin-top: -3.7rem;
+      margin-left: -2.96rem;
+      .publish-seek {
+        background: #fff;
+        padding-top: .1rem;
+        padding-bottom: .4rem;
+        .content-line {
+          position: relative;
+          height: .8rem;
+          line-height: .8rem;
+          font-size: .26rem;
+          text-align: left;
+          border-bottom: 1px solid #d0e3fd;
+          input {
+            width: 3.49rem;
+            height: .52rem;
+            line-height: normal;
+            padding: .1rem .19rem;
+            border: 1px solid #7e7e7e;
+            font-size: .26rem;
+            vertical-align: middle;
+            background: #fff;
+            border-radius: 0;
+          }
+          > span {
+            display: inline-block;
+            width: 1.76rem;
+            text-align: right;
+            i {
+              color: #ff0000;
+              margin-right: .05rem;
+              font-style: normal;
+            }
+          }
+          > a {
+            font-size: .26rem;
+            color: #666;
+          }
+          > img {
+            width: .12rem;
+            height: .06rem;
+            margin-left: .04rem;
+          }
+          > ul {
+            position: absolute;
+            top: .6rem;
+            left: 1.16rem;
+            z-index: 1;
+            width: 1.75rem;
+            background: #fff;
+            text-align: center;
+            border-radius: .1rem;
+            border: .02rem solid #dfdfdf;
+            -webkit-box-shadow: 0 0 .12rem .02rem #e2d9d975;
+            -moz-box-shadow:  0 0 .12rem .02rem #e2d9d975;
+            box-shadow:  0 0 .12rem .02rem #e2d9d975;
+            li {
+              height: .52rem;
+              line-height: .52rem;
+              border-bottom: .02rem solid #dfdfdf;
+              &:hover, &:active {
+                background: #dedede;
+              }
+            }
+          }
+        }
+        > a {
+          display: block;
+          width: 5.19rem;
+          height: .84rem;
+          text-align: center;
+          line-height: .84rem;
+          font-size: .38rem;
+          margin: .3rem auto 0;
+          background: #3f84f6;
+          color: #fff;
+          border-radius: .08rem;
+        }
+      }
+    }
+  }
+  .datepicker-overlay {
+    z-index: 9999;
+    .cov-date-body {
+      width: 4rem;
+      font-size: .16rem;
+      .cov-date-monthly {
+        height: 1.5rem;
+        div {
+          height: 1.5rem;
+        }
+        .cov-date-caption {
+          font-size: .24rem;
+          padding: .5rem 0 !important;
+        }
+        .cov-date-next {
+          text-indent: -3rem;
+        }
+      }
+      .cov-date-box {
+        .cov-picker-box {
+          padding: .25rem;
+          width: 4rem;
+          height: 2.8rem;
+          .week {
+            ul {
+              margin: 0 0 .08rem;
+            }
+          }
+          .day {
+            height: .34rem;
+            line-height: .34rem;
+          }
+        }
+      }
+    }
+    .button-box {
+      height: .5rem;
+      line-height: .5rem;
+      padding-right: .2rem;
+      span {
+        padding: .1rem .2rem;
+      }
+    }
+  }
+</style>

+ 400 - 0
components/mobile/applyPurchase/SayPrice.vue

@@ -0,0 +1,400 @@
+<template>
+  <div class="mobile-modal" v-if="showSayPriceBox">
+    <div class="mobile-modal-box">
+      <div class="mobile-modal-header">编辑报价<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="say-price">
+        <div class="base-info">
+          <div class="content-line">
+            型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+          </div>
+          <div class="content-line">
+            品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+          </div>
+          <div class="content-line">
+            规格:<span>{{purchaseDetail.spec || '-'}}</span>
+          </div>
+          <div class="content-line">
+            采购数量:<span>{{purchaseDetail.needquantity || '-'}}</span>
+          </div>
+          <div class="content-line">
+            币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
+          </div>
+          <div class="content-line">
+            生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
+          </div>
+          <div class="content-line">
+            截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+          </div>
+        </div>
+        <div class="form-list">
+          <div class="form-title">
+            <span class="fl">价格梯度<span>(PCS)</span></span>
+            <span class="fr">
+          <!--<span v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>-->
+          <span v-if="!purchaseDetail.custCurrency" v-text="sayPriceObj.currency" @click="setShowCurrencyList($event)"></span>
+          <span v-if="purchaseDetail.custCurrency" v-text="purchaseDetail.custCurrency"></span>
+          <img v-if="!purchaseDetail.custCurrency && !showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-down.png" alt="">
+          <img v-if="!purchaseDetail.custCurrency && showCurrencyList" src="/images/mobile/@2x/applyPurchase/currency-arrow-up.png" alt="">
+          <ul v-if="showCurrencyList">
+            <li @click="setCurrency('RMB')">RMB</li>
+            <li @click="setCurrency('USD')">USD</li>
+          </ul>
+        </span>
+          </div>
+          <div class="form-item" v-for="(reply, index) in sayPriceObj.replies">
+            <input type="text" placeholder="梯度" class="fl" @blur="onReplyLapQtyBlur(index)" @input="onReplyLapQtyInput(index)" v-model="reply.lapQty">
+            <input type="text" placeholder="单价" class="fr" @input="onReplyPriceInput(index)" @blur="onReplyPriceBlur(index)" v-model="reply.price">
+            <i class="iconfont icon-minus" v-if="index > 0" @click="setReplies('sub', index)"></i>
+            <i class="iconfont icon-add" v-if="index == 0 && sayPriceObj.replies.length < 5" @click="setReplies('add', index)"></i>
+          </div>
+          <div class="date">
+            <span>交期(天)</span>
+            <input type="text" placeholder="最大值" @input="onLeadtimeInput" @blur="onLeadtimeBlur" v-model="sayPriceObj.leadtime" class="fr">
+          </div>
+          <a class="say-price-btn" @click="commitSayPrice">确定</a>
+        </div>
+        <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {RemindBox} from '~components/mobile/common'
+  export default {
+    data () {
+      return {
+        showCurrencyList: false,
+        sayPriceObj: {
+          currency: 'RMB',
+          leadtime: '',
+          replies: [
+            {
+              lapQty: '',
+              price: ''
+            }
+          ]
+        },
+        validSayPrice: {
+          leadtime: false,
+          repliesPrice: false,
+          repliesLapQty: false
+        },
+        remindText: '',
+        timeoutCount: 0
+      }
+    },
+    props: ['showSayPriceBox'],
+    components: {
+      RemindBox
+    },
+    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'
+        }
+        this.resetSayPrice()
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        document.addEventListener('click', this.checkCurrencySelect)
+      })
+    },
+    filters: {
+      date: function (date) {
+        if (date) {
+          const d = new Date(Number(date))
+          const year = d.getFullYear()
+          const monthTemp = d.getMonth() + 1
+          const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+          const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+          return year + '-' + month + '-' + day
+        } else {
+          return '-'
+        }
+      }
+    },
+    computed: {
+      purchaseDetail () {
+        return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
+      },
+      user () {
+        return this.$store.state.option.user
+      }
+    },
+    methods: {
+      cancel: function () {
+        this.$emit('cancelSayPriceAction', false)
+      },
+      checkCurrencySelect: function () {
+        this.showCurrencyList = false
+      },
+      setShowCurrencyList: function (event) {
+        event.stopPropagation()
+        this.showCurrencyList = !this.showCurrencyList
+      },
+      setCurrency: function (type) {
+        this.sayPriceObj.currency = type
+        this.showCurrencyList = false
+      },
+      resetSayPrice: function () {
+        this.sayPriceObj = {
+          currency: 'RMB',
+          leadtime: '',
+          replies: [
+            {
+              lapQty: '',
+              price: ''
+            }
+          ]
+        }
+      },
+      setReplies: function (type, index) {
+        if (type === 'add' && this.sayPriceObj.replies.length < 5) {
+          this.sayPriceObj.replies.splice(this.sayPriceObj.replies.length, 0, {
+            lapQty: '',
+            price: ''
+          })
+        } else if (type === 'sub' && this.sayPriceObj.replies.length > 1) {
+          this.sayPriceObj.replies.splice(index, 1)
+        }
+      },
+      commitSayPrice: function () {
+        console.log(this.sayPriceObj)
+        if (this.checkValid()) {
+          let purchaseMan = JSON.parse(JSON.stringify(this.purchaseDetail))
+//          this.showLoading = true
+          purchaseMan.leadtime = this.sayPriceObj.leadtime
+          purchaseMan.replies = this.sayPriceObj.replies
+          purchaseMan.vendUU = this.user.data.enterprise.uu
+          purchaseMan.vendUserUU = this.user.data.userUU
+          purchaseMan.qutoApp = 'MALL'
+          purchaseMan.currency = purchaseMan.custCurrency || this.sayPriceObj.currency
+          this.$http.post('/inquiry/sale/item/save', purchaseMan).then(response => {
+            this.showLoading = false
+            if (response.data.success === false) {
+              this.onRemind('response.data.message')
+            } else {
+//              this.onRemind('报价成功')
+              this.resetSayPrice()
+              this.$emit('cancelSayPriceAction', true, JSON.parse(response.data).quteId)
+            }
+          }, error => {
+            console.log(error)
+            this.onRemind('请勿重复报价或报价自己的求购')
+//            this.showLoading = false
+          })
+        } else {
+          this.onRemind('请输入正确的报价信息')
+        }
+      },
+      onLeadtimeInput: function () {
+        this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.replace(/[^\-?\d.]/g, '')
+        if (this.sayPriceObj.leadtime.length > 3) {
+          this.sayPriceObj.leadtime = this.sayPriceObj.leadtime.substring(0, 3)
+        }
+      },
+      onLeadtimeBlur: function () {
+        if (!this.sayPriceObj.leadtime || this.sayPriceObj.leadtime < 1 || this.sayPriceObj.leadtime >= 1000 || this.sayPriceObj.leadtime.toString().indexOf('.') !== -1) {
+          this.validSayPrice.leadtime = false
+          this.onRemind('交期请填写1-999之间的正整数')
+        } else {
+          this.validSayPrice.leadtime = true
+        }
+      },
+      onReplyPriceInput: function (index) {
+        this.sayPriceObj.replies[index].price = this.sayPriceObj.replies[index].price.replace(/[^\-?\d.]/g, '')
+        let price = this.sayPriceObj.replies[index].price
+        if (price >= 10000) {
+          this.sayPriceObj.replies[index].price = price.substring(0, 4)
+        } else if (price.indexOf('.') > -1) {
+          let arr = price.split('.')
+          if (arr[0].length > 4) {
+            this.sayPriceObj.replies[index].price = Number(arr[0].substring(0, 4) + '.' + arr[1])
+          } else if (arr[1].length > 6) {
+            this.sayPriceObj.replies[index].price = Number(arr[0] + '.' + arr[1].substring(0, 6))
+          }
+        }
+      },
+      onReplyPriceBlur: function (index) {
+        let price = this.sayPriceObj.replies[index].price
+        if (!price) {
+          this.sayPriceObj.replies[index].price = ''
+          this.onRemind('价格不能为空')
+          this.validSayPrice.repliesPrice = false
+        } else if (price <= 0) {
+          this.sayPriceObj.replies[index].price = ''
+          this.onRemind('输入值必须为正整数')
+          this.validSayPrice.repliesPrice = false
+        } else {
+          this.validSayPrice.repliesPrice = true
+        }
+      },
+      onReplyLapQtyBlur: function (index) {
+        let lapQty = Number(this.sayPriceObj.replies[index].lapQty)
+        let limitDownObj = this.getLimitDownQty()
+        if (!lapQty || lapQty < 1) {
+          this.sayPriceObj.replies[index].lapQty = ''
+          this.onRemind('输入值必须为正整数')
+          this.validSayPrice.repliesLapQty = false
+        } else if (limitDownObj.index !== index && limitDownObj.lapQty > lapQty) {
+          this.onRemind('输入值必须大于#该梯度的下限#')
+          this.sayPriceObj.replies[index].lapQty = ''
+          this.validSayPrice.repliesLapQty = false
+        } else if ((index - 1 >= 0 && this.sayPriceObj.replies[index - 1].lapQty && this.sayPriceObj.replies[index - 1].lapQty >= lapQty) || (index + 1 < this.sayPriceObj.replies.length && this.sayPriceObj.replies[index + 1].lapQty && this.sayPriceObj.replies[index + 1].lapQty <= lapQty)) {
+          this.onRemind('输入值会导致梯度重叠,请重新修改')
+          this.sayPriceObj.replies[index].lapQty = ''
+          this.validSayPrice.repliesLapQty = false
+        } else {
+          this.validSayPrice.repliesLapQty = true
+        }
+      },
+      onReplyLapQtyInput: function (index) {
+        this.sayPriceObj.replies[index].lapQty = this.sayPriceObj.replies[index].lapQty.replace(/[^\-?\d.]/g, '')
+        let lapQty = this.sayPriceObj.replies[index].lapQty
+        if (lapQty.length > 9) {
+          this.sayPriceObj.replies[index].lapQty = lapQty.substring(0, 9)
+        }
+      },
+      getLimitDownQty: function () {
+        for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
+          if (this.sayPriceObj.replies[i].lapQty) {
+            return {
+              lapQty: this.sayPriceObj.replies[i].lapQty,
+              index: i
+            }
+          }
+        }
+        return {index: -1}
+      },
+      checkValid: function () {
+        this.validSayPrice.repliesLapQty = true
+        this.validSayPrice.repliesPrice = true
+        for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
+          if (!this.sayPriceObj.replies[i].lapQty) {
+            this.validSayPrice.repliesLapQty = false
+            break
+          } else if (!this.sayPriceObj.replies[i].price) {
+            this.validSayPrice.repliesPrice = false
+            break
+          }
+        }
+        console.log(this.validSayPrice.leadtime + '-' + this.validSayPrice.repliesLapQty + '-' + this.validSayPrice.repliesPrice)
+        return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal {
+    .mobile-modal-box {
+      top: 5%;
+      left: 3%;
+      right: 3%;
+      width: 7rem;
+      bottom: 3%;
+      margin: 0 auto;
+      .say-price {
+        background: #f3f3f3;
+        padding: .18rem 0;
+        width: 100%;
+        overflow-y: auto;
+        height: 90%;
+        .form-list {
+          height: 7.53rem;
+          background: #fff;
+          padding-top: .2rem;
+          > div {
+            height: .7rem;
+            line-height: .7rem;
+            width: 5.82rem;
+            font-size: .28rem;
+            margin: 0 0 .18rem .3rem;
+            input {
+              height: .7rem;
+              text-align: center;
+              border: 1px solid #666;
+              border-radius: .05rem;
+              line-height: normal;
+              padding: .1rem .2rem;
+            }
+            &.form-title {
+              border: 1px solid #666;
+              border-radius: .05rem;
+              padding: 0 .07rem 0 .17rem;
+              .fl {
+                span {
+                  color: #666;
+                }
+              }
+              .fr {
+                position: relative;
+                img {
+                  width: .12rem;
+                  height: .06rem;
+                  margin-left: .04rem;
+                }
+                > ul {
+                  position: absolute;
+                  top: .6rem;
+                  right: -.4rem;
+                  z-index: 1;
+                  width: 1.75rem;
+                  background: #fff;
+                  text-align: center;
+                  border-radius: .1rem;
+                  border: .02rem solid #dfdfdf;
+                  -webkit-box-shadow: 0 0 .12rem .02rem #e2d9d975;
+                  -moz-box-shadow:  0 0 .12rem .02rem #e2d9d975;
+                  box-shadow:  0 0 .12rem .02rem #e2d9d975;
+                  li {
+                    height: .52rem;
+                    line-height: .52rem;
+                    border-bottom: .02rem solid #dfdfdf;
+                    &:hover, &:active {
+                      background: #dedede;
+                    }
+                  }
+                }
+              }
+            }
+            &.form-item {
+              position: relative;
+              input {
+                width: 2.84rem;
+              }
+              i {
+                position: absolute;
+                right: -.5rem;
+                top: 0;
+                font-size: .36rem;
+                &.icon-add {
+                  color: #4768f3;
+                }
+                &.icon-minus {
+                  color: #8d8d8d;
+                }
+              }
+            }
+            &.date {
+              input {
+                width: 4.6rem;
+              }
+            }
+          }
+          .say-price-btn {
+            width: 6.44rem;
+          }
+        }
+      }
+    }
+  }
+</style>

+ 300 - 0
components/mobile/applyPurchase/SayPriceInfo.vue

@@ -0,0 +1,300 @@
+<template>
+  <div class="mobile-modal">
+    <div class="mobile-modal-box">
+      <div class="mobile-modal-header">{{agreed == 1 ? '已采纳' : '已报价'}}<i class="icon-guanbi iconfont" @click="cancel"></i></div>
+      <div class="say-price-info">
+        <div v-if="isBuyer">
+          <div class="base-info">
+            <div class="content-line">
+              型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+            </div>
+            <div class="content-line">
+              品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+            </div>
+            <div class="content-line">
+              规格:<span>{{purchaseDetail.spec || '-'}}</span>
+            </div>
+            <div class="content-line">
+              采购数量:<span>{{purchaseDetail.needquantity || '-'}}</span>
+            </div>
+            <div class="content-line">
+              币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
+            </div>
+            <div class="content-line">
+              生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
+            </div>
+            <div class="content-line">
+              截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+            </div>
+          </div>
+          <div class="base-info">
+            <div class="content-line">
+              买家:<span>{{purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
+            </div>
+            <div class="content-line">
+              联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
+            </div>
+          </div>
+          <div class="base-info say-info" v-for="(item, index) in purchaseDetail.qutations" @click="selectQutation(index)">
+            <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex == index" src="/images/mobile/@2x/applyPurchase/say-price-check.png" alt="">
+            <img v-if="agreed != 1 && (!item.agreed || item.agreed !== 1) && activeIndex != index" src="/images/mobile/@2x/applyPurchase/say-price-default.png" alt="">
+            <img v-if="item.agreed == 1" src="/images/mobile/@2x/applyPurchase/say-price-accept.png" alt="">
+            <div class="content-line">
+              {{item.vendName}}
+            </div>
+            <div class="content-line">
+              报价人:<span v-if="item.user">{{item.user.userName}}</span>
+              <span v-else>-</span>
+            </div>
+            <div class="content-line">
+              电话:<span v-if="item.user">{{item.user.userTel}}</span>
+              <span v-else>-</span>
+            </div>
+            <div class="content-line date">
+              交期(天):<span>{{item.leadtime}}</span>
+            </div>
+            <p>{{item.offerTime | date}}</p>
+            <div class="price-level">
+              <p>价格梯度:<span>(pcs)</span></p>
+              <ul>
+                <li v-for="replie in item.replies">
+                  <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
+                  <span>{{replie.price ? (item.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
+                </li>
+              </ul>
+            </div>
+          </div>
+          <a class="say-price-btn" v-if="purchaseDetail.agreed != 1" @click="acceptQutation">采纳报价</a>
+        </div>
+        <div v-if="!isBuyer">
+          <div class="base-info">
+            <div class="content-line">
+              型号:<span>{{purchaseDetail.cmpCode || '-'}}</span>
+            </div>
+            <div class="content-line">
+              品牌:<span>{{purchaseDetail.inbrand || '-'}}</span>
+            </div>
+            <div class="content-line">
+              规格:<span>{{purchaseDetail.spec || '-'}}</span>
+            </div>
+            <div class="content-line">
+              采购数量:<span>{{purchaseDetail.needquantity || '-'}}</span>
+            </div>
+            <div class="content-line">
+              币种:<span>{{purchaseDetail.custCurrency || '不限'}}</span>
+            </div>
+            <div class="content-line">
+              生产日期:<span>{{purchaseDetail.produceDate || '-'}}</span>
+            </div>
+            <div class="content-line">
+              截止日期:<span>{{purchaseDetail.endDate | date}}</span>
+            </div>
+            <div class="content-line">
+              买家:<span>{{purchaseDetail.inquiry.enterprise ? purchaseDetail.inquiry.enterprise.enName : purchaseDetail.userName}}</span>
+            </div>
+            <div class="content-line">
+              联系电话:<span>{{purchaseDetail.userTel || '-'}}</span>
+            </div>
+          </div>
+          <div class="base-info">
+            <div class="content-line">
+              报价人:<span v-if="purchaseDetail.user">{{purchaseDetail.user.userName}}</span>
+              <span v-else>-</span>
+            </div>
+            <div class="content-line">
+              联系电话:<span v-if="purchaseDetail.user">{{purchaseDetail.user.userTel || '-'}}</span>
+              <span v-else>-</span>
+            </div>
+          </div>
+          <div class="base-info say-info">
+            <div class="content-line date">
+              交期(天):<span>{{purchaseDetail.leadtime}}</span>
+            </div>
+            <p>{{purchaseDetail.offerTime | date}}</p>
+            <div class="price-level vendor">
+              <p>价格梯度:<span>(pcs)</span></p>
+              <ul>
+                <li v-for="replie in purchaseDetail.replies">
+                  <span>{{replie.lapQty ? replie.lapQty + '+' : '-'}}</span>
+                  <span>{{replie.price ? (purchaseDetail.currency == 'USD' ? '$' : '¥') + replie.price : '-'}}</span>
+                </li>
+              </ul>
+            </div>
+          </div>
+        </div>
+        <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  import {RemindBox} from '~components/mobile/common'
+  export default {
+    data () {
+      return {
+        activeIndex: -1,
+        remindText: '',
+        timeoutCount: 0
+      }
+    },
+    components: {
+      RemindBox
+    },
+    props: ['agreed'],
+    filters: {
+      date: function (date) {
+        if (date) {
+          const d = new Date(Number(date))
+          const year = d.getFullYear()
+          const monthTemp = d.getMonth() + 1
+          const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+          const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+          return year + '-' + month + '-' + day
+        } else {
+          return '-'
+        }
+      },
+      userNameFilter (str) {
+        return str ? str.substring(0, 1) + '**' : '-'
+      }
+    },
+    computed: {
+      purchaseDetail () {
+        return this.isBuyer ? this.$store.state.applyPurchase.purchaseManList.buyerInquiryDetail.data : this.$store.state.applyPurchase.purchaseManList.vendorInquiryDetail.data
+      },
+      user () {
+        return this.$store.state.option.user
+      },
+      isBuyer () {
+        return this.$route.query.type === 'buyer'
+      }
+    },
+    methods: {
+      cancel: function () {
+        this.$emit('cancelSayPriceInfoAction', false)
+      },
+      selectQutation: function (index) {
+        this.activeIndex = this.activeIndex === index ? -1 : index
+      },
+      acceptQutation: function () {
+        if (this.activeIndex > -1) {
+          let obj = this.purchaseDetail.qutations[this.activeIndex]
+          this.$http.post('/inquiry/buyer/decide?id=' + obj.id + '&status=1')
+            .then(response => {
+//              this.$message.success('采纳成功')
+//              this.onRemind('采纳成功')
+              this.$emit('cancelSayPriceInfoAction', true)
+//              this.$route.query.type === 'saler' ? this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: this.$route.params.id}) : this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: this.$route.params.id})
+            }, err => {
+              console.log(err)
+//              this.$message.success('系统错误')
+              this.onRemind('系统错误')
+            })
+        } else {
+//          this.$message.success('请选择报价信息')
+          this.onRemind('请选择报价信息')
+        }
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-modal {
+    .mobile-modal-box {
+      top: 5%;
+      left: 3%;
+      right: 3%;
+      bottom: 5%;
+      width: auto;
+      .say-price-info {
+        background: #f3f3f3;
+        padding: .18rem 0 0 0;
+        width: 100%;
+        overflow-y: auto;
+        max-height: 90%;
+        .base-info {
+          &:last-child {
+            margin-bottom: 0;
+          }
+          &.say-info {
+            /*height: 4.54rem;*/
+            position: relative;
+            > img {
+              position: absolute;
+              right: 0;
+              top: 0;
+              width: 1rem;
+              height: 1rem;
+            }
+            .content-line {
+              width: 4.55rem;
+              span {
+                color: #333;
+              }
+              &.date {
+                span {
+                  color: #ef5042;
+                }
+              }
+            }
+            > p {
+              font-size: .24rem;
+              color: #999;
+            }
+            .price-level {
+              font-size: .26rem;
+              /*position: absolute;*/
+              /*top: 1.3rem;*/
+              /*right: .3rem;*/
+              position: relative;
+              bottom: .3rem;
+              width: 4.4rem;
+              text-align: center;
+              margin-left: 2rem;
+              p {
+                margin-bottom: .1rem;
+                span {
+                  color: #666;
+                }
+              }
+              ul {
+                li {
+                  height: .52rem;
+                  span {
+                    height: .52rem;
+                    line-height: .52rem;
+                    padding-left: .22rem;
+                    text-align: left;
+                    display: inline-block;
+                    border-top: .02rem solid #7e7e7e;
+                    border-left: .02rem solid #7e7e7e;
+                    overflow: hidden;
+                    text-overflow: ellipsis;
+                    white-space: nowrap;
+                    width: 50%;
+                    &:last-child {
+                      border-right: .02rem solid #7e7e7e;
+                    }
+                  }
+                  &:last-child {
+                    border-bottom: .02rem solid #7e7e7e;
+                  }
+                }
+              }
+              &.vendor {
+                margin: .15rem auto 0;
+              }
+            }
+          }
+        }
+        .say-price-btn {
+          margin: .37rem auto .7rem;
+        }
+      }
+    }
+  }
+</style>

+ 284 - 0
components/mobile/applyPurchase/SeekList.vue

@@ -0,0 +1,284 @@
+<template>
+  <div>
+    <ul class="seek-list">
+      <li v-for="(item, index) in purchaseManList">
+        <div class="top">
+          <span v-if="item.inquiry.enterprise && item.inquiry.enterprise.enName">{{[item.inquiry.enterprise.enName, user.logged] | enterpriseFilter}}</span>
+          <span v-else>{{[item.userName, user.logged] | userNameFilter}}</span>
+        </div>
+        <div>
+          <div class="fl">
+            <div>
+              类目(产品名称):<span>{{item.prodTitle || '-'}}</span>
+            </div>
+            <div>
+              型号:<span>{{item.cmpCode || '-'}}</span>
+            </div>
+            <div>
+              品牌:<span>{{item.inbrand || '-'}}</span>
+            </div>
+            <div>
+              规格:<span>{{item.spec || '-'}}</span>
+            </div>
+            <div>
+              采购数量:<span>{{item.needquantity || '-'}}</span>
+            </div>
+            <div>
+              截止日期:<span class="date">{{item.endDate | date}}</span>
+            </div>
+          </div>
+          <div class="fr">
+            <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>
+              <span v-if="getDay(item.remainingTime) <= 0" v-text="getHours(item.remainingTime)"></span>
+              <i v-if="getDay(item.remainingTime) <= 0" >&nbsp;小时</i>
+            </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.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="!(userType == 'saler' && seekType  && seekType != 'wait') && (item.remainingTime > 0 && (!item.quoted || item.quoted != 1) && !(user.logged && ((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))))"  @click="goSayPrice(item.id, index)">我要报价</a>
+            <a v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || item.quoted == 1" @click="goSayPriceInfo(item.quteId || item.id, item.agreed, index)">查看报价</a>
+          </div>
+        </div>
+      </li>
+    </ul>
+    <div class="none-state" v-if="!purchaseManList || !purchaseManList.length && !isDataChange">
+      <img src="/images/mobile/@2x/car@2x.png">
+      <p v-text="'抱歉,暂无求购信息'"></p>
+    </div>
+    <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"></say-price-info>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+  </div>
+</template>
+<script>
+  import {LoginBox, RemindBox} from '~components/mobile/common'
+  import {SayPrice, SayPriceInfo} from '~components/mobile/applyPurchase'
+  export default {
+    components: {
+      LoginBox,
+      SayPrice,
+      RemindBox,
+      SayPriceInfo
+    },
+    data () {
+      return {
+        showLoginBox: false,
+        showSayPriceBox: false,
+        showSayPriceInfoBox: false,
+        activeIndex: -1,
+        remindText: '',
+        timeoutCount: 0,
+        agreed: 0
+      }
+    },
+    props: ['userType', 'seekType', 'purchaseManList', 'isDataChange'],
+    filters: {
+      date: function (date) {
+        if (date) {
+          const d = new Date(Number(date))
+          const year = d.getFullYear()
+          const monthTemp = d.getMonth() + 1
+          const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+          const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+          return year + '-' + month + '-' + day
+        } else {
+          return '-'
+        }
+      },
+      enterpriseFilter ([str, logged]) {
+        if (logged) {
+          return str
+        } else {
+          return str && str.length > 4 ? str.substring(0, 2) + '**' + str.substring(str.length - 2, str.length) : str || '-'
+        }
+      },
+      userNameFilter ([str, logged]) {
+        if (logged) {
+          return str
+        } else {
+          return str ? str.substring(0, 1) + '**' : '-'
+        }
+      }
+    },
+    computed: {
+//      purchaseManList () {
+//        return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
+//      },
+      user () {
+        return this.$store.state.option.user
+      }
+    },
+    methods: {
+      getDay: function (timeStamp) {
+        return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
+      },
+      getHours: function (timeStamp) {
+        return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
+      },
+      goSayPrice: function (id, index) {
+        if (this.user.logged) {
+          if (this.user.data.enterprise.uu) {
+            if (this.user.data.enterprise.isVendor && this.user.data.enterprise.isVendor !== '1690') {
+              this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {itemId: id, enuu: this.$store.state.option.user.data.enterprise ? this.$store.state.option.user.data.enterprise.uu : null})
+              this.showSayPriceBox = true
+              this.activeIndex = index
+            } else {
+              this.onRemind('抱歉,您需开通卖家功能才可报价')
+            }
+          } else {
+            this.onRemind('个人账户暂不可报价')
+          }
+        } else {
+          this.showLoginBox = true
+        }
+      },
+      goSayPriceInfo: function (id, agreed, index) {
+        this.userType === 'buyer' ? this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: id}) : this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: id})
+        this.agreed = agreed
+        this.showSayPriceInfoBox = true
+        this.activeIndex = index
+//        '/mobile/applyPurchase/list/' + (userType ? (item.quteId || item.id) + '?type=' + userType : (item.quteId || item.id)) + (userType ? '&' : '?') + 'status=' + item.agreed
+      },
+      onSayPriceCancel: function (flag, quteId) {
+        if (flag) {
+          this.purchaseManList[this.activeIndex].quoted = 1
+          this.purchaseManList[this.activeIndex].quteId = quteId
+          this.onRemind('报价成功')
+        }
+        this.showSayPriceBox = false
+      },
+      onSayPriceInfoCancel: function (flag) {
+        if (flag) {
+          this.purchaseManList[this.activeIndex].agreed = 1
+          this.onRemind('采纳成功')
+        }
+        this.showSayPriceInfoBox = false
+      },
+      onRemind: function (str) {
+        this.remindText = str
+        this.timeoutCount ++
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .seek-list {
+    width: 7.26rem;
+    margin: .13rem auto 0;
+    li {
+      border: 1px solid #e0e0e4;
+      height: 4.2rem;
+      margin-bottom: .2rem;
+      div.top {
+        font-size: .32rem;
+        color: #3a3a3a;
+        background: #f8f7fa;
+        height: .92rem;
+        line-height: .92rem;
+
+        span {
+          display: block;
+          width: 6.9rem;
+          border-bottom: 1px dashed #9f9f9f;
+          margin: 0 auto;
+        }
+
+      }
+      > div {
+        font-size: .3rem;
+        // display: inline-block;
+        &::after {
+          clear: both;
+          visibility: hidden;
+          zoom: 1;
+          display: block;
+          content: ' ';
+        }
+        .fl {
+          color: #666;
+          width: 4.8rem;
+          height: 2.62rem;
+          margin: .27rem 0 .29rem .18rem;
+          line-height: .46rem;
+          border-right: 1px dashed #9f9f9f;
+
+          > div {
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+
+            span {
+              color: #333;
+              &.date {
+                color: #e6353d;
+              }
+
+            }
+
+          }
+
+        }
+        .fr {
+          width: 2.2rem;
+          padding: .9rem 0 0 0;
+
+          p {
+            font-size: .28rem;
+            text-align: center;
+
+            &.over-deadline {
+              text-align: center;
+              padding-right: .2rem;
+            }
+
+            span {
+              font-size: .35rem;
+              color: #ff3208;
+            }
+
+            i {
+              font-style: normal;
+            }
+
+          }
+          a {
+            display: block;
+            width: 1.64rem;
+            height: .58rem;
+            line-height: .58rem;
+            text-align: center;
+            font-size: .32rem;
+            color: #e62f36;
+            border: 1px solid #ea494f;
+            margin: .34rem auto 0;
+            border-radius: .06rem;
+
+            &.self-publish {
+              background: rgb(204, 203, 203);
+              color: #fff;
+              border-color: #fff;
+            }
+          }
+
+        }
+      }
+    }
+
+  }
+  .none-state {
+    text-align: center;
+    margin-top: 1.1rem;
+    img {
+      width: 4.08rem;
+      height: 2.62rem;
+    }
+    p {
+      font-size: .32rem;
+      color: #999;
+      margin: 1.19rem 0 0 0;
+    }
+  }
+</style>

+ 4 - 0
components/mobile/applyPurchase/index.js

@@ -0,0 +1,4 @@
+import SayPriceInfo from './SayPriceInfo.vue'
+import SayPrice from './SayPrice.vue'
+
+export { SayPriceInfo, SayPrice }

+ 19 - 1
components/mobile/common/LoginBox.vue

@@ -3,7 +3,8 @@
     <div class="mobile-modal-box">
       <div class="mobile-modal-header">请登录后再操作<i @click="close" class="icon-guanbi iconfont"></i></div>
       <div class="mobile-modal-content">
-        <span @click="close">暂不登录</span><span @click="goLogin">马上登录</span>
+        <span @click="onRegisterClick">立即注册</span><span @click="goLogin">马上登录</span>
+        <p><i>*</i>目前手机端暂不支持开店功能,完成注册后请前往PC端操作</p>
       </div>
     </div>
   </div>
@@ -17,6 +18,13 @@
       },
       goLogin: function () {
         this.$router.push('/auth/login?returnUrl=' + window.location.href)
+      },
+      onRegisterClick () {
+        this.$http.get('/register/page').then(response => {
+          if (response.data) {
+            window.location.href = response.data.content
+          }
+        })
       }
     }
   }
@@ -38,5 +46,15 @@
         margin-right: .5rem;
       }
     }
+    p {
+      font-size: .28rem;
+      color: #666;
+      margin-top: .2rem;
+      i {
+        font-style: normal;
+        color: red;
+        margin-right: .05rem;
+      }
+    }
   }
 </style>

+ 2 - 2
components/mobile/common/RemindBox.vue

@@ -30,7 +30,7 @@
         if (_this.title === '收藏成功' || _this.title === '取消成功') {
           timeout = 1000
         } else {
-          timeout = 2000
+          timeout = 1500
         }
         _this.timer = setTimeout(function () {
           _this.showBox = false
@@ -46,7 +46,7 @@
     left: 0;
     right: 0;
     margin-top: -.6rem;
-    z-index: 100;
+    z-index: 10000;
     div {
       background: rgba(0,0,0,.6);
       color: #fff;

+ 1 - 20
components/mobile/share/store/StoreHeader.vue

@@ -12,26 +12,7 @@
   </div>
 </template>
 <script>
-  let getRealLen = function (str) {
-    let len = 0
-    for (let i = 0; i < str.length; i++) {
-      if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
-        len += 2
-      } else {
-        len++
-      }
-    }
-    return len
-  }
-  let cutOutString = function (str, len) {
-    for (let i = 1; i <= str.length; i++) {
-      if (getRealLen(str.substr(0, i)) > len) {
-        str = str.substr(0, i - 1)
-        break
-      }
-    }
-    return str
-  }
+  import { getRealLen, cutOutString } from '~utils/baseUtils'
   export default {
     computed: {
       storeInfo () {

+ 123 - 7
components/product/brand/BrandComponent.vue

@@ -1,14 +1,15 @@
 <template>
   <div class="component-list container">
-    <div class="type-list">型号列表</div>
-    <div class="input-group">
+    <div :class="activeTab == 0 ? 'type-list active' : 'type-list'" @click="activeTab = 0">型号列表</div>
+    <div :class="activeTab == 1 ? 'type-list active' : 'type-list'" @click="activeTab = 1">代理商</div>
+    <div class="input-group" v-if="activeTab == 0">
       <input  type="search" class="input-sm form-control" placeholder="请输入型号" title="code"
       v-model="searchCode" @search="goodsSearch(searchCode)"/>
       <span class="input-group-btn">
 					<button class="search btn btn-default" type="button" @click="goodsSearch(searchCode)">搜索器件</button>
 			</span>
     </div>
-    <table class="table">
+    <table class="table" v-if="activeTab == 0">
       <thead>
         <tr class="bgf7">
           <th width="500">型号</th>
@@ -39,10 +40,63 @@
         </tr>
       </tbody>
     </table>
-    <div style="float: right;">
+    <div style="float: right;" v-if="activeTab == 0">
       <page :total="list.totalElements" :page-size="pageParams.count"
             :current="pageParams.page" @childEvent="handleCurrentChange"></page>
     </div>
+    <table class="table supper-table" v-if="activeTab == 1">
+      <thead>
+      <tr class="bgf7">
+        <th width="100"></th>
+        <th width="200">代理商</th>
+        <th width="200">地址</th>
+        <th width="110">电话</th>
+        <th width="110">传真</th>
+        <th width="110">邮箱</th>
+        <th width="120">网址</th>
+      </tr>
+      </thead>
+      <tbody>
+      <tr class="text-center" v-for="item in supplier.content">
+        <td v-if="item.storeuuid">
+          <a class='add-link' :href="'/store/' + item.storeuuid">
+            <img :src="item.img || '/images/store/common/default.png'" alt="" class="showImg">
+            <img src="/images/store/common/goIn.png" alt="" class="goIn">
+          </a>
+        </td>
+        <td v-if="!item.storeuuid"><img :src="item.img || '/images/store/common/default.png'" alt="" class="showImg"></td>
+        <td :title='item.vendorName'  v-if="item.storeuuid"><a class='add-link' :href="'/store/' + item.storeuuid">{{item.vendorName || '-'}}</a></td>
+        <td :title='item.vendorName' v-if="!item.storeuuid">{{item.vendorName || '-'}}</td>
+        <td :title='item.detailAddress' v-if="item.storeuuid"><a class='add-link' :href="'/store/' + item.storeuuid">{{item.detailAddress || '-'}}</a></td>
+        <td :title='item.detailAddress' v-if="!item.storeuuid">{{item.detailAddress || '-'}}</td>
+        <td :title='item.tel' v-if="item.storeuuid"><a class='add-link' :href="'/store/' + item.storeuuid">{{item.tel || '-'}}</a></td>
+        <td :title='item.tel' v-if="!item.storeuuid">{{item.tel || '-'}}</td>
+        <td :title='item.fax' v-if="item.storeuuid"><a class='add-link' :href="'/store/' + item.storeuuid">{{item.fax || '-'}}</a></td>
+        <td :title='item.fax' v-if="!item.storeuuid">{{item.fax || '-'}}</td>
+        <td :title='item.email' v-if="item.storeuuid"><a class='add-link' :href="'/store/' + item.storeuuid">{{item.email || '-'}}</a></td>
+        <td :title='item.email' v-if="!item.storeuuid">{{item.email || '-'}}</td>
+        <td :title='item.website' v-if="item.storeuuid"><a class='add-link' :href="'/store/' + item.storeuuid">{{item.website || '-'}}</a></td>
+        <td :title='item.website' v-if="!item.storeuuid">{{item.website || '-'}}</td>
+      </tr>
+      <tr v-if="!supplier.content || supplier.content.length === 0">
+        <td colspan="10" class="text-center">
+          <div class="empty">
+            <div class="empty-img">
+              <img src="/images/brandList/empty-cart.png">
+            </div>
+            <div class="empty-info">
+              <p class="grey f16"> 暂无供应商信息 </p>
+              <i class="fa fa-mail-reply fa-xs"></i>&nbsp;<a href="javascript:history.go(-1)">返回上一页</a>
+            </div>
+          </div>
+        </td>
+      </tr>
+      </tbody>
+    </table>
+    <div style="float: right;" v-if="activeTab == 1">
+      <page :total="supplier.totalElements" :page-size="supplierPageParams.size"
+            :current="supplierPageParams.page" @childEvent="handleChange"></page>
+    </div>
   </div>
 </template>
 <script>
@@ -56,7 +110,13 @@
           count: 10,
           filter: {}
         },
-        searchCode: ''
+        supplierPageParams: {
+          page: 1,
+          size: 5,
+          sort: {'updatetime': 'DESC'}
+        },
+        searchCode: '',
+        activeTab: 0
       }
     },
     components: {
@@ -71,6 +131,9 @@
       },
       brand () {
         return this.$store.state.brandDetail.detail.data
+      },
+      supplier () {
+        return this.$store.state.product.supplierInformation.information.data
       }
     },
     methods: {
@@ -98,6 +161,19 @@
         this.pageParams.filter.brandid = this.brand.id
         this.pageCmpGoods(this.pageParams)
       },
+//      获取供应商分页
+      async pageSupplier (params) {
+        let uuid = this.$route.params.code
+        let { data } = await this.$http.get(`/api/produce/vendorlist/${uuid}`, { params })
+        this.$store.commit('product/supplierInformation/GET_INFORMATION_SUCCESS', data)
+      },
+      handleChange (page) {
+        this.supplierPageParams.page = page
+        this.pageSupplier(this.supplierPageParams)
+      },
+      listenChild: function (brand) {
+        this.$store.dispatch('loadBrandPages', {count: 10, filter: { brandid: brand.id }, page: brand.page})
+      },
       toAttach: function (url) {
         if (url === '1') {
           this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
@@ -126,12 +202,17 @@
     height: 34px;
     width: 150px;
     border: 1px solid #5078cb;
-    background-color: #5078CB;
+    /*background-color: #5078CB;*/
     float: left;
-    color: #fff;
+    color: #5078cb;
     line-height: 34px;
     text-align: center;
     font-size: 14px;
+    cursor: pointer ;
+  }
+  .component-list .type-list.active{
+    background-color: #5078CB;
+    color: #fff;
   }
   .component-list .input-group {
     width: 300px;
@@ -169,6 +250,12 @@
     color: #337ab7;
     font-size: 12px;
   }
+  .component-list table tbody tr td a.add-link {
+    width: 100%;
+    color: #474443;
+    font-size: 14px;
+    cursor: pointer;
+  }
   .component-list .btn-default {
     color: #214797;
     font-size: 12px;
@@ -219,4 +306,33 @@
     font-size: 14px;
     color: #5078cb;
   }
+  .component-list .supper-table thead th.text-left{
+    text-align: left;
+  }
+  .component-list .supper-table tbody tr{
+    height: 74px;
+    vertical-align:middle ;
+  }
+  .component-list .supper-table tbody tr:hover{
+    background: #eee;
+  }
+  .component-list .supper-table tbody tr td{
+    position: relative;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    max-width: 100px;
+  }
+  .component-list .supper-table tbody tr img.showImg{
+    width: 90px;
+    height: 49px;
+    border: 1px solid #dcdcdc;
+  }
+  .component-list .supper-table tbody tr img.goIn {
+    position: absolute;
+    top: 13px;
+    right: 3px;
+    width: 35px;
+    height: 35px;
+  }
 </style>

+ 4 - 9
components/register-saler/Register.vue

@@ -84,18 +84,13 @@
       } else {
         isSelf = true
       }
-      if (!isSelf) {
-        this.$http.get('/basic/enterprise/' + tempEnterprise.uu + '/detailInfo')
+      if (!isSelf) { // 是企业
+        this.$http.get('/basic/enterprise/' + tempEnterprise.uu + '/info')
           .then(response => {
             this.enterpriseData = response.data
+            this.section = 1
+            this.checkData.checked = false
           })
-        if (tempEnterprise.isVendor === 1690) { // 是企业
-          this.section = 3
-          this.checkData.checked = true
-        } else if (typeof tempEnterprise.isVendor === 'undefined' || tempEnterprise.isVendor === '') {
-          this.section = 2
-          this.checkData.checked = false
-        }
       } else { // 是个人
         this.$http.get('/basic/user/userCacheEnterprise')
           .then(response => {

+ 330 - 303
components/register-saler/register/StepFirst.vue

@@ -27,14 +27,14 @@
       <div class="row">
         <label class="col-sm-2 x-required">营业执照号:</label>
         <div class="col-sm-5">
-          <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
+          <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control x-input'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
         </div>
         <div class="x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
           <i class="glyphicon glyphicon-ok x-icon-left"></i>
         </div>
         <div class="col-sm-5" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
       </div>
-      <div class="row">
+      <!--<div class="row">
         <label class="col-sm-2 x-required">营业执照:</label>
         <div class="col-sm-5">
           <a class="x-btn-blank" v-if="loginData.isSelf" title="请上传营业执照扫描件(≤5M的图片或PDF)">
@@ -58,11 +58,11 @@
           <i class="glyphicon glyphicon-ok x-icon-left"></i>
         </div>
         <div class="col-sm-5" v-show="!validLawPerson.isValidLawPerson && !validLawPerson.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的法定代表人</p></div>
-      </div>
+      </div>-->
       <div class="row">
         <label class="col-sm-2 x-required">企业地址:</label>
         <div class="col-sm-5">
-          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
+          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
           <span class="fa fa-map-marker"></span>
           <div v-show="showAddressBox"
                @mouseenter="isInAddressBox = true"
@@ -111,7 +111,7 @@
         </div>
         <div class="col-sm-5" v-show="!validAddress.isValidAddress && !validAddress.init"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
       </div>
-      <div class="row">
+      <!--<div class="row">
         <label class="col-sm-2">联系人:</label>
         <div class="col-sm-5">
           <input type="text" :disabled="!loginData.isSelf" class="form-control" title="请填写企业对外的联系人,为空则默认为管理员" v-model="data.linkman" name="name" required="" placeholder="请填写企业对外的联系人,为空则默认为管理员">
@@ -178,7 +178,7 @@
           </div>
         </div>
         <div class="col-sm-5"></div>
-      </div>
+      </div>-->
       <!--<div class="row"  >
         <label class="col-sm-2">企业LOGO:</label>
         <div class="col-sm-5">
@@ -194,7 +194,7 @@
         </div>
         <div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>&ndash;&gt;
       </div>-->
-      <div class="row">
+     <!-- <div class="row">
         <label class="col-sm-2">经营范围标签:</label>
         <div class="col-sm-8">
           <div class="no-tags" v-if="!data.tagsData || data.tagsData.length == 0">暂无标签</div>
@@ -214,7 +214,7 @@
           </div>
         </div>
         <div class="col-sm-12 tags-lists" v-if="loginData.isSelf"><em class="pull-left">例如:</em><span>企业管理咨询</span><span>电子产品开发</span><span>货运代理</span></div>
-      </div>
+      </div>-->
       <div class="row next-btn"><button class="btn" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>
     </div>
   </div>
@@ -225,28 +225,28 @@
       return {
         data: {
           name: '',
-          lawPerson: '',
-          url: '',
+//          lawPerson: '',
+//          url: '',
           licenceId: '',
-          address: '',
-          linkman: '',
-          phone: '',
-          email: '',
-          fax: '',
-          website: '',
-          profession: '',
-          logoUrl: '',
-          tagsData: []
+          address: ''
+//          linkman: '',
+//          phone: '',
+//          email: '',
+//          fax: '',
+//          website: '',
+//          profession: '',
+//          logoUrl: '',
+//          tagsData: []
         },
         validName: {
           isValidTypeName: true,
           isValidName: true,
           init: true
         },
-        validUpload: {
-          isValidUpload: true,
-          init: true
-        },
+//        validUpload: {
+//          isValidUpload: true,
+//          init: true
+//        },
         validLicence: {
           isValidLicence: true,
           init: true
@@ -255,32 +255,32 @@
           isValidAddress: true,
           init: true
         },
-        validLawPerson: {
-          isValidLawPerson: true,
-          init: true
-        },
-        validPhone: {
-          isValidPhone: true,
-          init: true
-        },
-        validEmail: {
-          isValidEmail: true,
-          init: true
-        },
-        validFax: {
-          isValidFax: true,
-          init: true
-        },
-        validLogo: {
-          isValidLogo: true,
-          init: true
-        },
+//        validLawPerson: {
+//          isValidLawPerson: true,
+//          init: true
+//        },
+//        validPhone: {
+//          isValidPhone: true,
+//          init: true
+//        },
+//        validEmail: {
+//          isValidEmail: true,
+//          init: true
+//        },
+//        validFax: {
+//          isValidFax: true,
+//          init: true
+//        },
+//        validLogo: {
+//          isValidLogo: true,
+//          init: true
+//        },
         isValid: false,
-        isPdf: false,
+//        isPdf: false,
         showAddressBox: false,
         isInAddressBox: false,
-        showProfessionBox: false,
-        isInProfessionBox: false,
+//        showProfessionBox: false,
+//        isInProfessionBox: false,
         temCityData: {},
         cityData: {
           province: [],
@@ -292,48 +292,58 @@
           currentCity: '',
           currentDistrict: '',
           detail: ''
-        },
-        tempProfession: {},
-        professionData: {
-          profession: [],
-          detail: [],
-          thirdDetail: []
-        },
-        currentProfession: {
-          profession: '',
-          detail: '',
-          thirdDetail: ''
-        },
-        tag: ''
+        }
+//        tempProfession: {},
+//        professionData: {
+//          profession: [],
+//          detail: [],
+//          thirdDetail: []
+//        },
+//        currentProfession: {
+//          profession: '',
+//          detail: '',
+//          thirdDetail: ''
+//        },
+//        tag: ''
       }
     },
     props: ['loginData', 'enterpriseData', 'businessImgUrl'],
     watch: {
       enterpriseData: function (val, oldVal) {
-        if (val !== {}) {
-          if (this.loginData.isSelf) {
-            this.initSelfData(val)
-            this.nameCheck(3)
-            this.nameTypeCheck()
-            this.licenceCheck(3)
-            this.addressCheck()
-            this.imgUrlCheck()
-            this.lawPersonCheck()
+        if (val.name) {  // 个人
+          this.initData(val)
+          this.nameCheck(3)
+          this.nameTypeCheck()
+          this.licenceCheck(3)
+          this.addressCheck()
+//            this.imgUrlCheck()
+//            this.lawPersonCheck()
 //            this.phoneCheck()
 //            this.emailCheck()
 //            this.faxCheck()
-            this.checkFullData()
-            this.submitRegisterData()
-          } else {
-            this.initEnterpriseData(val)
-          }
+          this.checkFullData()
+          this.submitRegisterData()
+        }
+        if (val.uu) {  // 企业
+          this.initData(val)
+//          this.nameCheck(3)
+//          this.nameTypeCheck()
+//          this.licenceCheck(3)
+          this.enAddressCheck()
+//            this.imgUrlCheck()
+//            this.lawPersonCheck()
+//            this.phoneCheck()
+//            this.emailCheck()
+//            this.faxCheck()
+//          this.checkFullData()
+          this.submitRegisterData()
         }
-      },
-      businessImgUrl: function (val, oldVal) {
-        this.data.url = val
-        this.checkFullData()
-        this.submitRegisterData()
       }
+//      businessImgUrl: function (val, oldVal) {
+//        this.data.url = val
+//        this.checkFullData()
+//        this.submitRegisterData()
+//      }
     },
     mounted () {
       this.$http.get('/data/city.json').then(response => {
@@ -342,166 +352,147 @@
           this.cityData.province.push(province)
         }
       })
-      this.$http.get('/data/profession.json').then(response => {
-        this.tempProfession = response.data
-        for (let profession in response.data) {
-          this.professionData.profession.push(profession)
-        }
-      })
+//      this.$http.get('/data/profession.json').then(response => {
+//        this.tempProfession = response.data
+//        for (let profession in response.data) {
+//          this.professionData.profession.push(profession)
+//        }
+//      })
     },
     methods: {
-      initEnterpriseData: function (val) {
-        this.data.name = val.name || ''
-        this.data.licenceId = val.businessCode || ''
-        this.data.url = val.businessCodeImage || ''
-        this.data.lawPerson = val.corporation || ''
-        this.data.address = val.address || ''
-        this.data.website = val.url || ''
-        this.data.linkman = val.contactMan || ''
-        this.data.phone = val.contactTel || ''
-        this.data.email = val.contactEmail || ''
-        this.data.fax = val.fax || ''
-        this.data.logoUrl = val.logoImage || ''
-        this.data.profession = val.profession || ''
-//        this.data.tagsData = val.tags || []
-        if (typeof val.tags === 'string') {
-//          let tmp = val.tags || ''
-          this.data.tagsData = val.tags.split(',')
-        } else {
-          this.data.tagsData = []
-        }
-      },
-      initSelfData: function (val) {
-        this.data.name = val.name || ''
-        this.data.licenceId = val.licenceId || ''
-        this.data.url = val.url || ''
-        this.data.lawPerson = val.lawPerson || ''
-        this.data.address = val.address || ''
-        this.data.website = val.website || ''
-        this.data.linkman = val.linkman || ''
-        this.data.phone = val.phone || ''
-        this.data.email = val.email || ''
-        this.data.fax = val.fax || ''
-        this.data.logoUrl = val.logoUrl || ''
-        this.data.profession = val.profession || ''
-        if (typeof val.tagsData === 'string' || !val.tagsData) {
-          this.data.tagsData = val.tagsData.split(',') || []
-        } else {
-          this.data.tagsData = val.tagsData || []
-        }
+      initData: function (val) {
+        this.data.name = val.spaceName || val.enName || val.name || ''
+        this.data.licenceId = val.businessCode || val.licenceId || val.enBussinessCode || ''
+        this.data.address = val.address || val.enAddress || ''
       },
       sectionChange: function (type) {
-        if (this.loginData.isSelf && !this.isValid) {
+        if (!this.isValid) {
           this.$message.error('请填写正确的注册信息')
         } else {
-          this.checkFullData()
+          if (this.enterpriseData.uu) {
+            this.enCheckFullData()
+          } else {
+            this.checkFullData()
+          }
           let enterprise = this.data
 //          enterprise.tagsData = enterprise.tagsData.toString()
-          if (typeof this.data.tagsData === 'string') {
-            this.data.tagsData = this.data.tagsData.split(',')
-          }
+//          if (typeof this.data.tagsData === 'string') {
+//            this.data.tagsData = this.data.tagsData.split(',')
+//          }
           let data = {}
           data.enterprise = enterprise
           data.isValidRegister = this.isValid
-          data.url = this.data.url
+//          data.url = this.data.url
           enterprise.enIsRead = false
 //          enterprise.enBussinessCodeImage = this.data.url
+          // 个人用户,提交保存缓存企业信息
           if (this.loginData.isSelf) {
             this.$http.post('/basic/user/userCacheEnterprise', enterprise)
             this.$emit('isSelfCacheDataAction', enterprise)
+          } else { // 企业用户,更新当前企业信息,主要是更新企业地址
+            this.enterpriseData.enAddress = this.data.address
+            this.$http.post('/basic/enterprise/' + this.enterpriseData.uu + '/info', this.enterpriseData)
           }
           this.$emit('registerAction', data)
           this.$emit('sectionEvent', type)
-          this.$emit('businessImgUrlAction', this.data.url)
-        }
-      },
-      upload: function (e) {
-        let file = e.target.files[0]
-        this.validUpload.init = false
-        if (file.size > 5 * 1024 * 1024) {
-          this.validUpload.isValidUpload = false
-        } else {
-          this.validUpload.isValidUpload = true
-          if (file.type !== 'application/pdf') {
-            this.isPdf = false
-            let param = new FormData()
-            param.append('file', file, file.name)
-            param.append('chunk', '0')
-            let config = {
-              headers: {'Content-Type': 'multipart/form-data'}
-            }
-            this.$http.post('/api/images', param, config)
-              .then(response => {
-                this.data.url = response.data[0].path
-                this.$emit('businessImgUrlAction', this.data.url)
-              }, err => {
-                console.log(err)
-                this.validUpload.isValidUpload = false
-              })
-          } else {
-            let param = new FormData()
-            param.append('file', file, file.name)
-            let config = {
-              headers: {'Content-Type': file.type}
-            }
-            this.$http.post('/file', param, config)
-              .then(response => {
-                this.isPdf = true
-                this.data.url = response.data[0].path
-                this.$emit('businessImgUrlAction', this.data.url)
-              }, err => {
-                console.log(err)
-                this.validUpload.isValidUpload = false
-              })
-          }
-        }
-        this.validCheck()
-      },
-      uploadLogo: function (e) {
-        this.validLogo.init = false
-        let file = e.target.files[0]
-        if (file.size > 100 * 1024) {
-          this.validLogo.isValidLogo = false
-//          this.$message.error('图片请勿超过100Kb')
-        } else {
-          let param = new FormData()
-          param.append('file', file, file.name)
-          let config = {
-            headers: {'Content-Type': file.type}
-          }
-          this.$http.post('/api/images', param, config)
-            .then(response => {
-              this.validLogo.isValidLogo = true
-              this.data.logoUrl = response.data[0].path
-            }, err => {
-              console.log(err)
-              this.$message.error('图片上传失败')
-            })
+//          this.$emit('businessImgUrlAction', this.data.url)
         }
       },
+//      upload: function (e) {
+//        let file = e.target.files[0]
+//        this.validUpload.init = false
+//        if (file.size > 5 * 1024 * 1024) {
+//          this.validUpload.isValidUpload = false
+//        } else {
+//          this.validUpload.isValidUpload = true
+//          if (file.type !== 'application/pdf') {
+//            this.isPdf = false
+//            let param = new FormData()
+//            param.append('file', file, file.name)
+//            param.append('chunk', '0')
+//            let config = {
+//              headers: {'Content-Type': 'multipart/form-data'}
+//            }
+//            this.$http.post('/api/images', param, config)
+//              .then(response => {
+//                this.data.url = response.data[0].path
+//                this.$emit('businessImgUrlAction', this.data.url)
+//              }, err => {
+//                console.log(err)
+//                this.validUpload.isValidUpload = false
+//              })
+//          } else {
+//            let param = new FormData()
+//            param.append('file', file, file.name)
+//            let config = {
+//              headers: {'Content-Type': file.type}
+//            }
+//            this.$http.post('/file', param, config)
+//              .then(response => {
+//                this.isPdf = true
+//                this.data.url = response.data[0].path
+//                this.$emit('businessImgUrlAction', this.data.url)
+//              }, err => {
+//                console.log(err)
+//                this.validUpload.isValidUpload = false
+//              })
+//          }
+//        }
+//        this.validCheck()
+//      },
+//      uploadLogo: function (e) {
+//        this.validLogo.init = false
+//        let file = e.target.files[0]
+//        if (file.size > 100 * 1024) {
+//          this.validLogo.isValidLogo = false
+// //          this.$message.error('图片请勿超过100Kb')
+//        } else {
+//          let param = new FormData()
+//          param.append('file', file, file.name)
+//          let config = {
+//            headers: {'Content-Type': file.type}
+//          }
+//          this.$http.post('/api/images', param, config)
+//            .then(response => {
+//              this.validLogo.isValidLogo = true
+//              this.data.logoUrl = response.data[0].path
+//            }, err => {
+//              console.log(err)
+//              this.$message.error('图片上传失败')
+//            })
+//        }
+//      },
       validCheck: function () {
         this.isValid =
-          this.validUpload.isValidUpload && !this.validUpload.init &&
+//          this.validUpload.isValidUpload && !this.validUpload.init &&
           this.validName.isValidTypeName && !this.validName.init && this.validName.isValidName &&
           this.validLicence.isValidLicence && !this.validLicence.init &&
-          this.validAddress.isValidAddress && !this.validAddress.init &&
-          this.validLawPerson.isValidLawPerson && !this.validLawPerson.init &&
-          (this.validPhone.init || this.validPhone.isValidPhone) &&
-          (this.validEmail.init || this.validEmail.isValidEmail) &&
-          (this.validFax.init || this.validFax.isValidFax)
+          this.validAddress.isValidAddress && !this.validAddress.init
+//          this.validLawPerson.isValidLawPerson && !this.validLawPerson.init &&
+//          (this.validPhone.init || this.validPhone.isValidPhone) &&
+//          (this.validEmail.init || this.validEmail.isValidEmail) &&
+//          (this.validFax.init || this.validFax.isValidFax)
+      },
+      enValidCheck: function () {
+        this.isValid = this.validAddress.isValidAddress && !this.validAddress.init
       },
       checkFullData: function () {
         this.isValid =
-          this.validUpload.isValidUpload &&
+//          this.validUpload.isValidUpload &&
           this.validName.isValidTypeName && this.validName.isValidName &&
           this.validLicence.isValidLicence &&
-          this.validAddress.isValidAddress &&
-          this.validLawPerson.isValidLawPerson
+          this.validAddress.isValidAddress
+//          this.validLawPerson.isValidLawPerson
+      },
+      enCheckFullData: function () {
+        this.isValid = this.validAddress.isValidAddress
       },
+      // 企业名称字符验证
       nameTypeCheck: function () {
         this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
         this.validName.init = false
       },
+      // 企业名称是否已存在验证
       nameCheck: function (num) {
         if (num > 0) {
           this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
@@ -516,10 +507,10 @@
             })
         }
       },
-      imgUrlCheck: function () {
-        this.validUpload.init = false
-        this.validUpload.isValidUpload = this.data.url !== ''
-      },
+//      imgUrlCheck: function () {
+//        this.validUpload.init = false
+//        this.validUpload.isValidUpload = this.data.url !== ''
+//      },
       licenceCheck: function (num) {
         if ((/^[\S-]{1,255}$/).test(this.data.licenceId)) {
           if (num > 0) {
@@ -541,31 +532,38 @@
           this.validCheck()
         }
       },
+      // 个人地址校验
       addressCheck: function () {
         this.validAddress.init = false
         this.validAddress.isValidAddress = this.data.address !== ''
         this.validCheck()
       },
-      lawPersonCheck: function () {
-        this.validLawPerson.init = false
-        this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(this.data.lawPerson)
-        this.validCheck()
-      },
-      phoneCheck: function () {
-        this.validPhone.init = false
-        this.validPhone.isValidPhone = (/^[\d-]{8,}$/).test(this.data.phone) || this.data.phone === ''
-        this.validCheck()
-      },
-      emailCheck: function () {
-        this.validEmail.init = false
-        this.validEmail.isValidEmail = (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.data.email) || this.data.email === ''
-        this.validCheck()
-      },
-      faxCheck: function () {
-        this.validFax.init = false
-        this.validFax.isValidFax = (/^(([\0]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/).test(this.data.fax) || this.data.fax === ''
-        this.validCheck()
-      },
+      // 企业地址校验
+      enAddressCheck: function () {
+        this.validAddress.init = false
+        this.validAddress.isValidAddress = this.data.address !== ''
+        this.enValidCheck()
+      },
+//      lawPersonCheck: function () {
+//        this.validLawPerson.init = false
+//        this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(this.data.lawPerson)
+//        this.validCheck()
+//      },
+//      phoneCheck: function () {
+//        this.validPhone.init = false
+//        this.validPhone.isValidPhone = (/^[\d-]{8,}$/).test(this.data.phone) || this.data.phone === ''
+//        this.validCheck()
+//      },
+//      emailCheck: function () {
+//        this.validEmail.init = false
+//        this.validEmail.isValidEmail = (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.data.email) || this.data.email === ''
+//        this.validCheck()
+//      },
+//      faxCheck: function () {
+//        this.validFax.init = false
+//        this.validFax.isValidFax = (/^(([\0]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/).test(this.data.fax) || this.data.fax === ''
+//        this.validCheck()
+//      },
       commonValid: function (str) {
         return str.indexOf(' ') === -1
       },
@@ -574,12 +572,12 @@
         let data = {}
         data.enterprise = enterprise
         data.isValidRegister = this.isValid
-        data.url = this.data.url
+//        data.url = this.data.url
         this.$emit('registerAction', data)
       },
       onHideBox: function () {
         this.onHideAddress()
-        this.onHideProfession()
+//        this.onHideProfession()
       },
       onShowAddress: function () {
         if (this.showAddressBox) {
@@ -595,20 +593,20 @@
         }
         this.isClickInputAddress = false
       },
-      onShowProfession: function () {
-        if (this.showProfessionBox) {
-          this.onHideProfession()
-        } else {
-          this.showProfessionBox = true
-          this.isClickInputProfession = true
-        }
-      },
-      onHideProfession: function () {
-        if (!this.isInProfessionBox && !this.isClickInputProfession) {
-          this.showProfessionBox = false
-        }
-        this.isClickInputProfession = false
-      },
+//      onShowProfession: function () {
+//        if (this.showProfessionBox) {
+//          this.onHideProfession()
+//        } else {
+//          this.showProfessionBox = true
+//          this.isClickInputProfession = true
+//        }
+//      },
+//      onHideProfession: function () {
+//        if (!this.isInProfessionBox && !this.isClickInputProfession) {
+//          this.showProfessionBox = false
+//        }
+//        this.isClickInputProfession = false
+//      },
       getCity: function (province) {
         this.cityData.city = []
         this.address.currentCity = ''
@@ -632,7 +630,11 @@
           if (this.address.detail !== '') {
             this.data.address = this.address.currentProvince + this.address.currentCity + this.address.currentDistrict + this.address.detail
             this.showAddressBox = false
-            this.addressCheck()
+            if (this.enterpriseData.uu) {
+              this.enAddressCheck()
+            } else {
+              this.addressCheck()
+            }
           } else {
             this.$message.error('请输入详细地址')
           }
@@ -640,65 +642,65 @@
           this.$message.error('请输入省、市、区')
         }
       },
-      getProfessionDetail: function (profession) {
-        this.currentProfession.profession = profession
-        this.currentProfession.detail = ''
-        this.professionData.detail = []
-        this.currentProfession.thirdDetail = ''
-        this.professionData.thirdDetail = []
-        let _this = this
-        _this.professionData.detail = []
-        for (let item in this.tempProfession[profession]) {
-          if (typeof this.tempProfession[profession][item] !== 'object') {
-            _this.professionData.detail.push(this.tempProfession[profession][item])
-          } else {
-            _this.professionData.detail.push(item)
-          }
-        }
-      },
-      chooseProfessionDetail: function (detail) {
-        this.currentProfession.detail = detail
-        this.currentProfession.thirdDetail = ''
-        this.professionData.thirdDetail = []
-        if (typeof this.tempProfession[this.currentProfession.profession][detail] !== 'object') {
-          this.data.profession = detail
-          this.showProfessionBox = false
-        } else {
-          this.professionData.thirdDetail = this.tempProfession[this.currentProfession.profession][detail]
-        }
-      },
-      chooseProfessionThirdDetail: function (thirdDetail) {
-        this.currentProfession.thirdDetail = thirdDetail
-        this.data.profession = thirdDetail
-        this.showProfessionBox = false
-      },
-      tagCheck: function () {
-        if (this.tag.length > 10) {
-          this.tag = this.tag.substring(0, 10)
-        }
-      },
-      addTags: function () {
-        let flag = true
-        let _this = this
-        if (!this.tag || this.tag === '') {
-          flag = false
-        } else {
-          this.data.tagsData.forEach(function (item) {
-            if (item === _this.tag) {
-              flag = false
-            }
-          })
-        }
-        if (flag) {
-          this.data.tagsData.push(this.tag)
-          this.tag = ''
-        } else {
-          this.tag = ''
-        }
-      },
-      removeTag: function (index) {
-        this.data.tagsData.splice(index, 1)
-      },
+//      getProfessionDetail: function (profession) {
+//        this.currentProfession.profession = profession
+//        this.currentProfession.detail = ''
+//        this.professionData.detail = []
+//        this.currentProfession.thirdDetail = ''
+//        this.professionData.thirdDetail = []
+//        let _this = this
+//        _this.professionData.detail = []
+//        for (let item in this.tempProfession[profession]) {
+//          if (typeof this.tempProfession[profession][item] !== 'object') {
+//            _this.professionData.detail.push(this.tempProfession[profession][item])
+//          } else {
+//            _this.professionData.detail.push(item)
+//          }
+//        }
+//      },
+//      chooseProfessionDetail: function (detail) {
+//        this.currentProfession.detail = detail
+//        this.currentProfession.thirdDetail = ''
+//        this.professionData.thirdDetail = []
+//        if (typeof this.tempProfession[this.currentProfession.profession][detail] !== 'object') {
+//          this.data.profession = detail
+//          this.showProfessionBox = false
+//        } else {
+//          this.professionData.thirdDetail = this.tempProfession[this.currentProfession.profession][detail]
+//        }
+//      },
+//      chooseProfessionThirdDetail: function (thirdDetail) {
+//        this.currentProfession.thirdDetail = thirdDetail
+//        this.data.profession = thirdDetail
+//        this.showProfessionBox = false
+//      },
+//      tagCheck: function () {
+//        if (this.tag.length > 10) {
+//          this.tag = this.tag.substring(0, 10)
+//        }
+//      },
+//      addTags: function () {
+//        let flag = true
+//        let _this = this
+//        if (!this.tag || this.tag === '') {
+//          flag = false
+//        } else {
+//          this.data.tagsData.forEach(function (item) {
+//            if (item === _this.tag) {
+//              flag = false
+//            }
+//          })
+//        }
+//        if (flag) {
+//          this.data.tagsData.push(this.tag)
+//          this.tag = ''
+//        } else {
+//          this.tag = ''
+//        }
+//      },
+//      removeTag: function (index) {
+//        this.data.tagsData.splice(index, 1)
+//      },
       onDetailAddressInput: function () {
         this.address.detail = this.address.detail.trim()
       }
@@ -707,6 +709,9 @@
 </script>
 
 <style scoped>
+  .register{
+    height: 700px;
+  }
   .register input[type="file"] {
     display: block;
   }
@@ -718,6 +723,9 @@
   .x-union-menu {
     width: 600px
   }
+  .x-union-header{
+    margin-top: -40px;
+  }
   .x-union-header>div{
     background: #f5f8fa;
     font-weight: 700;
@@ -848,6 +856,25 @@
   .register .row .tags-box {
     margin-top: 15px;
   }
+  .register .row p {
+    color: red;
+  }
+  .register .row .form-control:focus{
+    border-color: #5078cb;
+    box-shadow: none;
+  }
+  .x-input:focus, .x-input-blank:focus {
+    border-color: #5078cb;
+    box-shadow: none;
+  }
+
+  .register .row .fa-map-marker{
+    position: relative;
+    top: -34px;
+    left: -5px;
+
+  }
+
   .register .row .tags-list ul{
     list-style: none;
   }

+ 2 - 2
components/register-saler/register/StepThird.vue

@@ -434,7 +434,7 @@
             } else {
               this.isSelfRegisterSuccess = false
               this.showLoading = false
-              this.$message.error('企业注册失败,请重新填写信息')
+              this.$message.error(response.data.message || '企业注册失败,请重新填写信息')
             }
           }, err => {
             console.log(err)
@@ -571,7 +571,7 @@
                   this.reflashEnterprise(response.data.data.enuu, baseUrl || '/vendor#/vendor_upload')
                 } else {
                   this.isSelfRegisterSuccess = false
-                  this.$message.error('企业注册失败,请重新填写信息')
+                  this.$message.error(response.data.message || '企业注册失败,请重新填写信息')
                 }
                 this.showLoading = false
               }, err => {

+ 31 - 5
components/store/BaseInfo.vue

@@ -31,10 +31,14 @@
         </div>
         <div ng-if="storeInfo.enterprise">
           <div class="contact-text">
-            <div v-text="storeInfo.enterprise.enName">深圳市华商龙商务互联科技有限公司</div>
-            <div v-if="storeInfo.enterprise.enAddress.length >0">地址:<span v-text="storeInfo.enterprise.enAddress">深圳市南山区科技园科技南五路英唐大厦一楼</span></div>
-            <div v-if="storeInfo.enterprise.enTel.length >0">电话:<span v-text="storeInfo.enterprise.enTel">0755-26038000/26038047/26038008/86140880</span></div>
-            <div v-if="storeInfo.enterprise.enFax && storeInfo.enterprise.enFax.length > 0">传真:<span v-text="storeInfo.enterprise.enFax">0755-26038111</span></div>
+            <div v-text="storeInfo.enterprise.enName || '-'"></div>
+            <div><span class="public">地址:</span><span v-text="storeInfo.enterprise.enAddress || '-'"></span></div>
+            <div><span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel || '-'"></span></div>
+            <div><span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax || '-'"></span></div>
+            <div><span class="public">官网地址:</span><a :href=storeInfo.enterprise.enUrl target="_blank">{{storeInfo.enterprise.enUrl || '-'}}</a></div>
+            <div v-if="storeInfo.enterprise.enPhone && storeInfo.enterprise.enPhone.length > 0"><span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone">136********</span></div>
+            <div v-if="storeInfo.enterprise.enWeixin && storeInfo.enterprise.enWeixin.length > 0"><span class="public">微信:</span><span v-text="storeInfo.enterprise.enWeixin">好名字更容易让人记住你</span></div>
+            <div v-if="storeInfo.enterprise.enQQ && storeInfo.enterprise.enQQ.length > 0"><span class="public">Q&nbsp;Q:</span><span v-text="storeInfo.enterprise.enQQ">123456789</span></div>
           </div>
         </div>
       </div>
@@ -47,7 +51,7 @@
           </h3>
         </div>
         <div>
-          <div class="div-proof" style="position:relative;" v-for="qualification in qualifications">
+          <div class="div-proof" style="position:relative;" v-for="(qualification, index) in qualifications" :key="index">
             <div v-if="qualification.isPdf">
               <img src="/images/store/common/timg.png" alt="" style="max-width: 124px; max-height: 147px;">
               <div class="hover-show hover-shows">
@@ -162,6 +166,28 @@ export default {
 		line-height: 28px;
 	}
 
+  #contact-fragment .contact-text div {
+		height: 25px;
+	}
+
+  #contact-fragment .contact-text span{
+    display:inline-block;
+    height: 100%
+  }
+  #contact-fragment .contact-text .public {
+    width:80px;
+    display:inline-block;
+    text-align: justify;
+    vertical-align:top;
+  }
+  #contact-fragment .contact-text .public::after{
+    content:"";
+    display: inline-block;
+    width:100%;
+    overflow:hidden;
+    height:0;
+  }
+
   #proof-fragment .proof-title {
 		margin-bottom: 10px;
 	}

+ 3 - 73
components/store/CommodityInfo.vue

@@ -167,7 +167,7 @@
       }
     }
   }
-
+  import { enidfilter } from '~utils/baseUtils'
   export default {
     name: 'commodity-info',
     data () {
@@ -380,19 +380,17 @@
                 minPackQty: item.minPackQty
               }])
                 .then(response => {
-                  //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
                   if (response.data.success) {
                     if (response.data.message) {
                       this.$message({
                         message: response.data.message,
                         type: 'success'
                       })
-                      let _self = this
                       window.setTimeout(function () {
-                        window.location.href = '/user#/order/pay/' + _self.enidfilter(response.data.data.orderid)
+                        window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
                       }, 1000)
                     } else {
-                      window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
+                      window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
                     }
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
@@ -442,74 +440,6 @@
             }
           }
         }
-        // window.location.href = 'user#/order/pay/' + this.enidfilter(this.buy_info.orderid)
-      },
-      enidfilter: function (str) {
-        if (str) {
-          let encryptStr = '' // 最终返回的加密后的字符串
-          // 产生三位随机数
-          let num = ''
-          for (let i = 0; i < 3; i++) {
-            num += Math.floor(Math.random() * 10)
-          }
-          encryptStr += num // 产生3位随机数
-
-          // 16位加密
-          let tempspit = ''
-          let strspit = str.toString().toLowerCase()
-          if (strspit.match(/^[-+]?\d*$/) === null) { // 非整数字符,对每一个字符都转换成16进制,然后拼接
-            /**
-             * Unicode汉字、英文字母、数字的unicode范围
-             *汉字:[0x4e00,0x9fa5](或十进制[19968,40869])
-             *数字:[0x30,0x39](或十进制[48, 57])
-             *小写字母:[0x61,0x7a](或十进制[97, 122])
-             *大写字母:[0x41,0x5a](或十进制[65, 90]
-             * 'a'的Unicode编码:'&#97;',charCodeAt()的值是97
-             * '码'的Unicode编码:'\u7801', new String('码').charCodeAt()的值是30721,30721的16进制表示是7801
-             */
-            let s = strspit.split('')
-            for (let i = 0; i < s.length; i++) {
-              s[i] = s[i].charCodeAt() // 先转换成Unicode编码
-              s[i] = s[i].toString(16)
-              // 因为在服务器是每两位当做一个字符进行解析的,所以这里每个字符的Unicode编码范围必须在0——255之间。数字和大小写满足该要求,特殊字符则不一定,如果后续有特殊字符的要求,需要重写编码器和解码器
-              if (s[i].length === 1) {
-                s[i] = '0' + s[i]
-              }
-              tempspit = tempspit + s[i]
-            }
-            tempspit = tempspit + '{' + 1 // 1代表字符
-          } else { // 数字直接转换成16进制
-            strspit = parseInt(strspit)
-              .toString(16)
-            tempspit = strspit + '{' + 0 // 0代表纯数字
-          }
-
-          let temp = tempspit.split('{') // 对要加密的字符转换成16进制
-          let numLength = temp[0].length // 转换后的字符长度
-          numLength = numLength.toString(16) // 字符长度换算成16进制
-          if (numLength.length === 1) { // 如果是1,补一个0
-            numLength = '0' + numLength
-          } else if (numLength.length > 3) { // 转换后的16进制字符长度如果大于2位数,则返回,不支持
-            return ''
-          }
-          encryptStr += numLength
-          if (temp[1] === '0') {
-            encryptStr += 0
-          } else if (temp[1] === '1') {
-            encryptStr += 1
-          }
-          encryptStr += temp[0]
-          if (encryptStr.length < 20) { // 如果小于20位,补上随机数
-            // 产生三位随机数
-            let numtwo = ''
-            for (let i = 0; i < 20 - encryptStr.length; i++) {
-              numtwo += Math.floor(Math.random() * 10)
-            }
-            let ran = numtwo // 产生3位随机数
-            encryptStr += ran
-          }
-          return encryptStr
-        }
       },
       toAttach: function (url) {
         if (this.user.logged) {

+ 3 - 71
components/store/RecommendProduct.vue

@@ -34,6 +34,7 @@
 </template>
 <script>
   import Buy from '~components/common/buyOrCar/buyComponent.vue'
+  import { enidfilter } from '~utils/baseUtils'
   export default {
     name: 'recommend-product',
     components: {
@@ -97,19 +98,17 @@
                 minPackQty: item.minPackQty ? item.minPackQty : item.minBuyQty
               }])
                 .then(response => {
-                  //        window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.orderid)
                   if (response.data.success) {
                     if (response.data.message) {
                       this.$message({
                         message: response.data.message,
                         type: 'success'
                       })
-                      let _self = this
                       window.setTimeout(function () {
-                        window.location.href = '/user#/order/pay/' + _self.enidfilter(response.data.data.orderid)
+                        window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
                       }, 1000)
                     } else {
-                      window.location.href = '/user#/order/pay/' + this.enidfilter(response.data.data.orderid)
+                      window.location.href = '/user#/order/pay/' + enidfilter(response.data.data.orderid)
                     }
                   } else {
                     if (response.data.data && response.data.data.unvailable === 1) {
@@ -159,73 +158,6 @@
             }
           }
         }
-      },
-      enidfilter: function (str) {
-        if (str) {
-          let encryptStr = '' // 最终返回的加密后的字符串
-          // 产生三位随机数
-          let num = ''
-          for (let i = 0; i < 3; i++) {
-            num += Math.floor(Math.random() * 10)
-          }
-          encryptStr += num // 产生3位随机数
-
-          // 16位加密
-          let tempspit = ''
-          let strspit = str.toString().toLowerCase()
-          if (strspit.match(/^[-+]?\d*$/) === null) { // 非整数字符,对每一个字符都转换成16进制,然后拼接
-            /**
-             * Unicode汉字、英文字母、数字的unicode范围
-             *汉字:[0x4e00,0x9fa5](或十进制[19968,40869])
-             *数字:[0x30,0x39](或十进制[48, 57])
-             *小写字母:[0x61,0x7a](或十进制[97, 122])
-             *大写字母:[0x41,0x5a](或十进制[65, 90]
-             * 'a'的Unicode编码:'&#97;',charCodeAt()的值是97
-             * '码'的Unicode编码:'\u7801', new String('码').charCodeAt()的值是30721,30721的16进制表示是7801
-             */
-            let s = strspit.split('')
-            for (let i = 0; i < s.length; i++) {
-              s[i] = s[i].charCodeAt() // 先转换成Unicode编码
-              s[i] = s[i].toString(16)
-              // 因为在服务器是每两位当做一个字符进行解析的,所以这里每个字符的Unicode编码范围必须在0——255之间。数字和大小写满足该要求,特殊字符则不一定,如果后续有特殊字符的要求,需要重写编码器和解码器
-              if (s[i].length === 1) {
-                s[i] = '0' + s[i]
-              }
-              tempspit = tempspit + s[i]
-            }
-            tempspit = tempspit + '{' + 1 // 1代表字符
-          } else { // 数字直接转换成16进制
-            strspit = parseInt(strspit)
-              .toString(16)
-            tempspit = strspit + '{' + 0 // 0代表纯数字
-          }
-
-          let temp = tempspit.split('{') // 对要加密的字符转换成16进制
-          let numLength = temp[0].length // 转换后的字符长度
-          numLength = numLength.toString(16) // 字符长度换算成16进制
-          if (numLength.length === 1) { // 如果是1,补一个0
-            numLength = '0' + numLength
-          } else if (numLength.length > 3) { // 转换后的16进制字符长度如果大于2位数,则返回,不支持
-            return ''
-          }
-          encryptStr += numLength
-          if (temp[1] === '0') {
-            encryptStr += 0
-          } else if (temp[1] === '1') {
-            encryptStr += 1
-          }
-          encryptStr += temp[0]
-          if (encryptStr.length < 20) { // 如果小于20位,补上随机数
-            // 产生三位随机数
-            let numtwo = ''
-            for (let i = 0; i < 20 - encryptStr.length; i++) {
-              numtwo += Math.floor(Math.random() * 10)
-            }
-            let ran = numtwo // 产生3位随机数
-            encryptStr += ran
-          }
-          return encryptStr
-        }
       }
     }
   }

+ 35 - 3
components/store/common/StoreHeader.vue

@@ -43,13 +43,22 @@
             <div style="background: #FFFFFF;" v-if="isOpen">
               <ul class = "shop-contact list-unstyled" style="padding: 15px 0; margin-bottom: 0; border-top: #e8e8e8 1px solid; margin-top: 20px;">
                 <li v-if="storeInfo.enterprise.enTel">
-                  <span>电话:</span><span v-text="storeInfo.enterprise.enTel"></span>
+                  <span class="public">电话:</span><span v-text="storeInfo.enterprise.enTel"></span>
                 </li>
                 <li v-if="storeInfo.enterprise.enFax">
-                  <span>传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
+                  <span class="public">传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
                 </li>
                 <li v-if="storeInfo.enterprise.address || storeInfo.enterprise.enAddress">
-                  <span>地址:</span><span v-text="storeInfo.enterprise.address || storeInfo.enterprise.enAddress"></span>
+                  <span class="public">地址:</span><span v-text="storeInfo.enterprise.address || storeInfo.enterprise.enAddress"></span>
+                </li>
+                <li v-if="storeInfo.enterprise.enPhone || storeInfo.enterprise.enPhone">
+                  <span class="public">手机:</span><span v-text="storeInfo.enterprise.enPhone || storeInfo.enterprise.enPhone"></span>
+                </li>
+                <li v-if="storeInfo.enterprise.enWeixin || storeInfo.enterprise.enWeixin">
+                  <span class="public">微信:</span><span v-text="storeInfo.enterprise.enWeixin || storeInfo.enterprise.enWeixin"></span>
+                </li>
+                <li v-if="storeInfo.enterprise.enQQ || storeInfo.enterprise.enQQ">
+                  <span class="public">Q&nbsp;Q:</span><span v-text="storeInfo.enterprise.enQQ || storeInfo.enterprise.enQQ"></span>
                 </li>
                 <li class="text-right">
                   <nuxt-link :to="{ name: 'store-uuid-description', params: { uuid: storeInfo.uuid } }">了解更多&gt;</nuxt-link>
@@ -225,6 +234,9 @@ export default {
         .then(response => {
           if (response.data.success) {
             newTab.location.href = 'https://im.ubtob.com/chat/visit?gid=' + response.data.content
+          } else {
+            newTab.close()
+            this.$message.error(response.data.message)
           }
         })
     },
@@ -315,6 +327,26 @@ export default {
 	#nav_fragment .shop-contact a{
 		color: rgb(33,71,151);
 	}
+  #nav_fragment .shop-contact li {
+    height: 25px;
+  }
+  #nav_fragment .shop-contact span{
+    display:inline-block;
+    height: 100%
+  }
+  #nav_fragment .shop-contact .public {
+    width:44px;
+    display:inline-block;
+    text-align: justify;
+    vertical-align:top;
+  }
+  #nav_fragment .shop-contact .public::after{
+    content:"";
+    display: inline-block;
+    width:100%;
+    overflow:hidden;
+    height:0;
+  }
 
 	#nav_fragment #search_input {
 		height: 40px;

+ 42 - 12
layouts/main.vue

@@ -22,10 +22,10 @@
     },
     head () {
       return {
-        title: this.title,
+        title: this.title || '【优软商城】IC电子元器件现货采购交易平台商城',
         meta: [
-          {hid: 'description', name: 'description', content: this.description},
-          {hid: 'keywords', name: 'keywords', content: this.keywords}
+          {hid: 'description', name: 'description', content: this.description || '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'},
+          {hid: 'keywords', name: 'keywords', content: this.keywords || '优软商城'}
         ]
       }
     },
@@ -55,13 +55,23 @@
         if (path === '/product/kind/home') {
           return '电子元器件器件选型参数型号查询器件类别分类大全-优软商城'
         } else if (path.startsWith('/product/kind/')) {
-          return this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全-优软商城'
+          if (this.kinds[this.kinds.length - 1]) {
+            return this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全-优软商城'
+          }
+          return ''
         } else if (path.startsWith('/product/component/')) {
-          return this.componentDetail.brand.nameCn + this.componentDetail.code + '参数|供应商|数据手册中文资料|规格书-优软商城'
+          if (this.componentDetail) {
+            return this.componentDetail.brand.nameCn + this.componentDetail.code + '参数|供应商|数据手册中文资料|规格书-优软商城'
+          } else {
+            return ''
+          }
         } else if (path.startsWith('/product/brand/brandList/')) {
           return 'IC电子元器件品牌中心品牌大全-优软商城'
         } else if (path.startsWith('/product/brand/')) {
-          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')产品分类及产品型号大全-优软商城'
+          if (this.brandDetail.nameEn) {
+            return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')产品分类及产品型号大全-优软商城'
+          }
+          return '【优软商城】IC电子元器件现货采购交易平台商城'
         } else if (path === '/provider/factories') {
           return 'IC电子元器件厂家原厂直销原厂专卖店大全-优软商城'
         } else if (path === '/provider/home') {
@@ -83,13 +93,23 @@
         if (path === '/product/kind/home') {
           return '优软商城电子元器件器件型号查询器件类别分类大全,优软商城提供元器件智能选型服务,能让您完美的找到热门型号的替代型号产品,一键搜索功能让您快速找到您想要的型号。'
         } else if (path.startsWith('/product/kind/')) {
-          return '优软商城' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全,能让您快速的找到' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号。'
+          if (this.kinds[this.kinds.length - 1]) {
+            return '优软商城' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全,能让您快速的找到' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号。'
+          }
+          return ''
         } else if (path.startsWith('/product/component/')) {
-          return '优软商城提供' + this.componentDetail.brand.nameCn + this.componentDetail.code + '数据手册中文资料规格书下载,' + this.componentDetail.code + '供应商及参数报价。'
+          if (this.componentDetail) {
+            return '优软商城提供' + this.componentDetail.brand.nameCn + this.componentDetail.code + '数据手册中文资料规格书下载,' + this.componentDetail.code + '供应商及参数报价。'
+          } else {
+            return ''
+          }
         } else if (path.startsWith('/product/brand/brandList/')) {
           return 'IC电子元器件品牌中心品牌大全,优软商城品牌中心汇聚国内国际电子元器件品牌,全力打造国家级元器件电商品台。'
         } else if (path.startsWith('/product/brand/')) {
-          return this.brandDetail.brief
+          if (this.brandDetail.brief) {
+            return this.brandDetail.brief || '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+          }
+          return ''
         } else if (path === '/provider/factories') {
           return 'IC电子元器件厂家原厂直销原厂专卖店大全,优软商城原厂专区提供IC电子元器件厂家原厂直销原厂专卖店大全。'
         } else if (path === '/provider/home') {
@@ -107,13 +127,23 @@
         if (path === '/product/kind/home') {
           return '电子元器件分类,电子元器件参数,电子元器件型号,电子元器件类别'
         } else if (path.startsWith('/product/kind/')) {
-          return this.kinds[this.kinds.length - 1].nameCn
+          if (this.kinds[this.kinds.length - 1]) {
+            return this.kinds[this.kinds.length - 1].nameCn
+          }
+          return ''
         } else if (path.startsWith('/product/component/')) {
-          return this.componentDetail.code + '供应商,' + this.componentDetail.code + '数据手册,' + this.componentDetail.code + '规格书'
+          if (this.componentDetail) {
+            return this.componentDetail.code + '供应商,' + this.componentDetail.code + '数据手册,' + this.componentDetail.code + '规格书'
+          } else {
+            return ''
+          }
         } else if (path.startsWith('/product/brand/brandList/')) {
           return 'ic,元器件,品牌'
         } else if (path.startsWith('/product/brand/')) {
-          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn
+          if (this.brandDetail.nameEn) {
+            return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn
+          }
+          return '优软商城'
         } else if (path === '/provider/factories') {
           return '电子元器件原厂,电子元器件厂家'
         } else if (path === '/provider/home') {

+ 18 - 4
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://192.168.253.60:9090/platform-b2c/' : 'http://10.1.51.125:8080/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://192.168.253.60:9090/platform-b2c/' : 'http://192.168.253.121:9090/platform-b2c/')
 const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.usoftmall.com/' : 'http://218.17.158.219:24000/')
 
 module.exports = {
@@ -34,7 +34,7 @@ module.exports = {
     /*
     ** Run ESLINT on save
     */
-    extend (config, { dev, isClient, isServer }) {
+    extend(config, { dev, isClient, isServer }) {
       config.resolve.alias['~utils'] = path.join(__dirname, 'utils')
       config.module.rules.push({
         test: /\.(scss|css)$/,
@@ -73,7 +73,7 @@ module.exports = {
     ]
   },
   css: [
-     { src: '~assets/scss/app.scss', lang: 'scss' }
+    { src: '~assets/scss/app.scss', lang: 'scss' }
     /* {
       src: 'swiper/dist/css/swiper.css'
     } */ /* , {
@@ -87,6 +87,10 @@ module.exports = {
   },
   plugins: [{
     src: '~plugins/axios.js'
+  }, {
+    src: '~plugins/vue-filter.js'
+  }, {
+    src: '~plugins/mixin.js'
   }, {
     src: '~plugins/swiper.js',
     ssr: false
@@ -119,6 +123,12 @@ module.exports = {
     '/user/**': baseUrl,
     '/user**': baseUrl,
     '/login/**': baseUrl,
+    '/newLogin/**': baseUrl,
+    '/mPassWord/page': baseUrl,
+    '/mEmail/page': baseUrl,
+    '/mPhone/page': baseUrl,
+    '/mQuestion/page': baseUrl,
+    '/realNameAuth/page': baseUrl,
     '/register/**': baseUrl,
     '/logout/**': baseUrl,
     '/static/**': baseUrl,
@@ -151,6 +161,10 @@ module.exports = {
     '/UASBatchPutOnProperty**': baseUrl,
     '/UASBatchPutOnProperty/**': baseUrl,
     '/seek/**': baseUrl,
-    '/inquiry/**': commonUrl
+    '/inquiry/**': commonUrl,
+    '/b2b/**': baseUrl,
+    '/commodity-service/**': baseUrl,
+    '/background/**': baseUrl,
+    '/goods/**': baseUrl
   }
 }

+ 2 - 1
package.json

@@ -19,7 +19,8 @@
     "nuxt": "0.10.6",
     "qrcode": "^1.2.0",
     "vue-awesome-swiper": "^2.5.4",
-    "vue2-filters": "^0.1.9"
+    "vue2-filters": "^0.1.9",
+    "node-sass": "^4.5.3"
   },
   "scripts": {
     "dev": "nodemon --exec node server.js",

+ 1 - 0
pages/applyPurchase/_id.vue

@@ -6,6 +6,7 @@
 <script>
   import { BatchPublish } from '~components/applyPurchase'
   export default {
+    middleware: 'authenticated',
     components: {
       BatchPublish
     },

+ 14 - 6
pages/applyPurchase/result.vue

@@ -6,17 +6,17 @@
       <h1>发布成功</h1>
       <h2>成功发布 <span>{{count}}</span> 条求购</h2>
       <div class="footer1">前往 <a href="/user#/seekPurchase">买家中心-我的求购</a> <span>{{timer}}s</span></div>
-      <div class="footer2">返回 <nuxt-link to="/">商城首页</nuxt-link> | <nuxt-link to="/applyPurchase">求购首页</nuxt-link></div>
+      <div class="footer2">返回 <a @click="go('/')">商城首页</a> | <a  @click="go('/applyPurchase')">求购首页</a></div>
     </div>
     <div class="container" v-else>
       <p>发布求购</p>
       <img src="/images/applyPurchase/batch-error.png" alt="">
-      <h1>上传失败</h1>
+      <h1>发布失败</h1>
       <h2>请完善产品信息</h2>
       <div class="footer1">立刻
         <label>
           <input type="file" @change="upload" accept="*.xls, *.xlsx">
-          <a>重新上传</a>
+          <a>重新发布</a>
         </label>
       </div>
       <div class="footer2">返回 <nuxt-link to="/">商城首页</nuxt-link> | <nuxt-link to="/applyPurchase">求购首页</nuxt-link></div>
@@ -27,15 +27,19 @@
   export default {
     data () {
       return {
-        timer: 5
+        timer: 5,
+        isChange: false
       }
     },
     mounted () {
       if (this.state === 'success') {
-        setInterval(() => {
+        let interval = setInterval(() => {
           this.timer--
-          if (this.timer === 0) {
+          if (this.timer === 0 && !this.isChange) {
+            clearInterval(interval)
             window.location.href = '/user#/seekPurchase'
+          } else if (this.timer < 0) {
+            clearInterval(interval)
           }
         }, 1000)
       }
@@ -77,6 +81,10 @@
               }
             })
         }
+      },
+      go: function (url) {
+        this.isChange = true
+        this.$router.push(url)
       }
     }
   }

+ 4 - 1
pages/index.vue

@@ -104,7 +104,10 @@
         }),
         store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 50, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null}),
         store.dispatch('loadStoreStatus', { op: 'check' })
-      ]) : []
+      ]) : Promise.all([
+        store.dispatch('loadStoreStatus', { op: 'check' }),
+        store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
+      ])
     },
     computed: {
       user () {

+ 19 - 0
pages/mobile/applyPurchase/list/_id.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="mobile-content">
+    <say-price-info></say-price-info>
+  </div>
+</template>
+<script>
+  import {SayPriceInfo} from '~components/mobile'
+  export default {
+    layout: 'mobile',
+    components: {
+      SayPriceInfo
+    },
+    fetch ({store, route}) {
+      return Promise.all([
+        route.query.type === 'buyer' ? store.dispatch('applyPurchase/loadBuyerInquiryDetail', {id: route.params.id}) : store.dispatch('applyPurchase/loadVendorInquiryDetail', {id: route.params.id})
+      ])
+    }
+  }
+</script>

+ 139 - 0
pages/mobile/applyPurchase/list/index.vue

@@ -0,0 +1,139 @@
+<template>
+  <div class="mobile-content">
+    <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">
+        <span @click="searchSeek">
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+    </div>
+    <div class="seek-title">
+      <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>
+    <div v-if="purchaseManList && false"></div>
+  </div>
+</template>
+<script>
+  import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
+  import {Loading} from '~components/mobile/common'
+  export default {
+    layout: 'mobile',
+    components: {
+      SeekList,
+      Loading
+    },
+    data () {
+      return {
+        isSearchSearchingMore: false,
+        page: 1,
+        size: 10,
+        purchaseManListData: [],
+        showSeekSearch: true,
+        seekKeyword: '',
+        isChange: false,
+        isDataChange: false
+      }
+    },
+    mounted: function () {
+      this.$nextTick(() => {
+        window.addEventListener('scroll', this.scroll, false)
+      })
+    },
+//    watch: {
+//      $route: function (val, oldVal) {
+//        window.removeEventListener('scroll', this.scroll, false)
+//      }
+//    },
+    fetch ({store}) {
+      return Promise.all([
+        store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: 1, pageSize: 10, sorting: {'releaseDate': 'DESC'}, keyword: this.seekKeyword, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
+      ])
+    },
+    computed: {
+      purchaseManList () {
+        let list = this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
+        if (this.isChange) {
+          this.purchaseManListData = []
+          this.seekPage = 1
+          this.isChange = false
+          this.isDataChange = true
+        } else {
+          this.purchaseManListData = this.purchaseManListData.concat(list.content)
+          this.isSearchSearchingMore = false
+          this.isDataChange = false
+        }
+        return this.$store.state.applyPurchase.purchaseManList.purchaseManList.data
+      },
+      allPage () {
+        return Math.floor(this.purchaseManList.totalElements / this.purchaseManList.size) + Math.floor(this.purchaseManList.totalElements % this.purchaseManList.size > 0 ? 1 : 0)
+      }
+    },
+    methods: {
+      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()
+        }
+      },
+      getMoreSearch: function () {
+        this.page++
+        this.isSearchSearchingMore = true
+        this.reloadData()
+      },
+      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})
+      },
+      goLastPage: function () {
+        window.history.back(-1)
+      },
+      searchSeek: function () {
+        this.page = 1
+        this.isChange = true
+        this.reloadData()
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-content {
+    .mobile-header {
+      position: fixed;
+      top: 0;
+      z-index: 10;
+      width:100%;
+      height:.88rem;
+      line-height: .88rem;
+      background: #3e82f5;
+      padding:0 .2rem 0 .1rem;
+      color:#fff;
+      > a {
+        font-size:.28rem;
+        color:#fff;
+        position: absolute;
+        i {
+          font-size: .48rem;
+          margin-right: -.1rem;
+        }
+      }
+      .search-content {
+        margin-left: .5rem;
+        line-height: normal;
+        padding-top: .14rem;
+        input {
+          color: #333;
+          width: 5.78rem;
+          line-height: normal;
+        }
+        span {
+          height: .46rem;
+          line-height: .46rem;
+        }
+      }
+    }
+  }
+</style>

+ 19 - 0
pages/mobile/applyPurchase/sayPrice/_id.vue

@@ -0,0 +1,19 @@
+<template>
+  <div class="mobile-content">
+    <say-price></say-price>
+  </div>
+</template>
+<script>
+  import {SayPrice} from '~components/mobile'
+  export default {
+    layout: 'mobile',
+    components: {
+      SayPrice
+    },
+    fetch ({store, route}) {
+      return Promise.all([
+        store.dispatch('applyPurchase/loadPurchaseManDetail', {itemId: route.params.id, enuu: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
+      ])
+    }
+  }
+</script>

+ 456 - 0
pages/mobile/share/purChase/_uuid.vue

@@ -0,0 +1,456 @@
+<template>
+  <div class="purchase">
+    <div class="purchase-top">
+      <div class="purchase-top-bg">
+        <div class="clearfix">
+          <div class="title fl">{{purchaseDetail.inquiry.enName}}</div>
+          <div class="time fr">{{purchaseDetail.endDate | date}}</div>
+        </div>
+        <div class="desc">{{purchaseDetail.cmpCode}}</div>
+        <div class="size">类目(产品名称):
+          <span>{{purchaseDetail.prodTitle}}</span>
+        </div>
+        <div class="brand">品牌:
+          <span>{{purchaseDetail.inbrand || '-'}}</span>
+        </div>
+        <div class="size">规格:
+          <span>{{purchaseDetail.spec || '-'}}</span>
+        </div>
+
+        <div class="pmg-icon">
+          <div class="Isend" v-if="purchaseDetail.remainingTime < 0">
+            <img src="/images/mobile/@2x/purChase/Isend.png" />
+          </div>
+          <div class="Issend" v-else-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || purchaseDetail.quoted == 1">
+            <img src="/images/mobile/@2x/purChase/Issend.png" />
+          </div>
+        </div>
+      </div>
+      <div class="purchase-top-control clearfix" v-if="purchaseDetail.remainingTime > 0 || (((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || purchaseDetail.quoted == 1)">
+        <div class="time fl">
+          <template v-if="purchaseDetail.remainingTime > 0">
+            <span class="icon"></span>剩余时间:
+            <span class="timetext" v-if="getDay(purchaseDetail.remainingTime) > 0">
+              <a class="number">{{getDay(purchaseDetail.remainingTime)}}</a>
+              <a>天</a>
+            </span>
+            <span class="timetext" v-if="getDay(purchaseDetail.remainingTime) <= 0">
+              <a class="number">{{getHours(purchaseDetail.remainingTime)}}</a>
+              <a>小时</a>
+            </span>
+          </template>
+          <!-- <span class="timetext" v-else>已截止</span> -->
+          <!-- <span class="timetext">剩余时间:<a class="number">8</a><a>小时</a></span> -->
+        </div>
+        <div v-if="!userType && purchaseDetail.remainingTime > 0 && (!purchaseDetail.quoted || purchaseDetail.quoted != 1) && (user.logged && ((purchaseDetail.inquiry.enterprise && user.data.enterprise && (purchaseDetail.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseDetail.userUU == user.data.userUU  && !purchaseDetail.inquiry.enterprise)))" class="goprice fr" @click="onRemind('此为贵公司的求购')">我要报价</div>
+        <div class="goprice fr" v-if="!(userType == 'saler' && seekType  && seekType != 'wait') && (purchaseDetail.remainingTime > 0 && (!purchaseDetail.quoted || purchaseDetail.quoted != 1) && !(user.logged && ((purchaseDetail.inquiry.enterprise && user.data.enterprise && (purchaseDetail.inquiry.enterprise.uu === user.data.enterprise.uu)) || (!user.data.enterprise.uu && purchaseDetail.userUU == user.data.userUU  && !purchaseDetail.inquiry.enterprise))))" @click="goSayPrice(purchaseDetail.id)">我要报价</div>
+        <div class="goprice fr" v-if="((!userType || userType == 'buyer') && (seekType  && seekType != 'wait')) || (userType == 'saler' && seekType  && seekType != 'wait') || purchaseDetail.quoted == 1" @click="goSayPriceInfo(purchaseDetail.quteId || purchaseDetail.id, purchaseDetail.agreed)">查看报价</div>
+      </div>
+    </div>
+    <div class="purcharse_banner">
+      <div class="banner"></div>
+    </div>
+    <div class="seek-title">
+      <img src="/images/mobile/@2x/applyPurchase/home/seek-title.png" alt="">
+      <span>最新求购信息</span>
+    </div>
+    <div class="purcharseListContent">
+      <seek-list :purchaseManList="purchaseManListData" :isDataChange="true"></seek-list>
+
+      <div @click="toMore()" class="purchase_btn_look">查看更多</div>
+      <div class="purchse_btn_more_title">
+        <nuxt-link :to="'/'">优软商城首页</nuxt-link>
+        <!-- <a href="https://www.usoftmall.com"></a> -->
+      </div>
+    </div>
+
+    <div class="mobile_footer company">
+      <div class="hr"></div>
+      <img src="/images/mobile/@2x/shareStore/logo.png" alt="">
+      <div class="hr right"></div>
+      <p>此页面由深圳市优软商城科技有限公司提供</p>
+      <nuxt-link :to="'/'">www.usoftmall.com</nuxt-link>
+      <!-- <a href="https://www.usoftmall.com">www.usoftmall.com</a> -->
+    </div>
+
+    <div class="purcharse_kong"></div>
+    <div class="purcharse_fixed " @click="sendApplyPurchase()">
+      <div class="clearfix">
+        <div class="money_icon fl"></div>
+        <span class="fl">发布求购</span>
+      </div>
+    </div>
+    <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox"></login-box>
+    <say-price :showSayPriceBox="showSayPriceBox" @cancelSayPriceAction="onSayPriceCancel"></say-price>
+    <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
+    <say-price-info v-if="showSayPriceInfoBox" :agreed="agreed" @cancelSayPriceInfoAction="onSayPriceInfoCancel"></say-price-info>
+    <publish-seek :showSayPriceBox="showsendApplyBox" @cancelAction="showsendApplyBox = false" @reloadAction="onReload" @remindAction="onRemind"></publish-seek>
+  </div>
+</template>
+
+<script>
+import { SayPrice, SayPriceInfo } from '~components/mobile/applyPurchase'
+import { LoginBox, RemindBox } from '~components/mobile/common'
+import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
+import PublishSeek from '~components/mobile/applyPurchase/PublishSeek.vue'
+export default {
+  layout: 'mobileStore',
+  props: ['userType', 'seekType', 'purchaseManList'],
+  fetch({ store, params, redirect }) {
+    if (!params.uuid) {
+      return redirect('/error')
+    }
+    return Promise.all([
+      store.dispatch('applyPurchase/loadPurchaseManDetail', {
+        itemId: params.uuid,
+        enuu: store.state.option.user.data.enterprise
+          ? store.state.option.user.data.enterprise.uu
+          : null
+      }),
+      store.dispatch('applyPurchase/loadPurchaseManList', {
+        pageNumber: 1,
+        pageSize: 10,
+        sorting: { releaseDate: 'DESC' },
+        keyword: '',
+        enUU: store.state.option.user.data.enterprise
+          ? store.state.option.user.data.enterprise.uu
+          : null
+      })
+    ])
+  },
+  data() {
+    return {
+      showLoginBox: false,
+      showSayPriceBox: false,
+      showSayPriceInfoBox: false,
+      remindText: '',
+      timeoutCount: 0,
+      agreed: 0,
+      showsendApplyBox: false
+    }
+  },
+  components: {
+    SayPrice,
+    SayPriceInfo,
+    LoginBox,
+    RemindBox,
+    SeekList,
+    PublishSeek
+  },
+  computed: {
+    purchaseDetail() {
+      console.log(
+        this.$store.state.applyPurchase.purchaseManList.purchaseManDetail.data
+      )
+      return this.$store.state.applyPurchase.purchaseManList.purchaseManDetail
+        .data
+    },
+    purchaseManListData() {
+      return this.$store.state.applyPurchase.purchaseManList.purchaseManList
+        .data.content
+    }
+  },
+  methods: {
+    toMore() {
+      if (
+        /(iPhone|iPad|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone)/gi.test(
+          window.navigator.userAgent
+        )
+      ) {
+        this.$router.push({ path: '/mobile/applyPurchase/list' })
+      } else {
+        this.$router.push({ path: '/applyPurchase' })
+      }
+    },
+    getDay(timeStamp) {
+      return Math.floor(timeStamp / (1000 * 60 * 60 * 24))
+    },
+    getHours(timeStamp) {
+      return Math.floor((timeStamp / (1000 * 60 * 60)) % 24)
+    },
+    onSayPriceCancel(flag, quteId) {
+      if (flag) {
+        this.purchaseDetail.quoted = 1
+        this.purchaseDetail.quteId = quteId
+        this.onRemind('报价成功')
+      }
+      this.showSayPriceBox = false
+    },
+    onRemind(str) {
+      this.remindText = str
+      this.timeoutCount++
+    },
+    onSayPriceInfoCancel(flag) {
+      flag && ((this.purchaseDetail.agreed = 1), this.onRemind('采纳成功'))
+      this.showSayPriceInfoBox = false
+    },
+    goSayPriceInfo(id, agreed) {
+      this.userType === 'buyer'
+        ? this.$store.dispatch('applyPurchase/loadBuyerInquiryDetail', {
+            id: id
+          })
+        : this.$store.dispatch('applyPurchase/loadVendorInquiryDetail', {
+            id: id
+          })
+      this.agreed = agreed
+      this.showSayPriceInfoBox = true
+    },
+    goSayPrice(id) {
+      if (this.user.logged) {
+        this.$store.dispatch('applyPurchase/loadPurchaseManDetail', {
+          itemId: id,
+          enuu: this.$store.state.option.user.data.enterprise
+            ? this.$store.state.option.user.data.enterprise.uu
+            : null
+        })
+        this.showSayPriceBox = true
+      } else {
+        this.showLoginBox = true
+      }
+    },
+    sendApplyPurchase() {
+      console.log(this.user)
+      if (this.user.logged) {
+        this.showsendApplyBox = true
+      } else {
+        this.showLoginBox = true
+      }
+    },
+    onReload() {
+      // const path = this.$route.path
+      // if (path === '/') {
+      //   this.$store.dispatch('applyPurchase/loadMobileHomeList', {
+      //     pageNumber: 1,
+      //     pageSize: 5,
+      //     enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null
+      //   })
+      // } else if (path === '/mobile/share/purChase') {
+      this.$store.dispatch('applyPurchase/loadPurchaseManList', {
+        pageNumber: 1,
+        pageSize: 10,
+        enUU: this.user.data.enterprise ? this.user.data.enterprise.uu : null
+      })
+      // }
+    }
+  }
+}
+</script>
+
+<style scoped lang="scss">
+.clearfix {
+  &::after {
+    clear: both;
+    visibility: hidden;
+    zoom: 1;
+    display: block;
+    content: ' ';
+  }
+}
+.purchase {
+  background: rgb(246, 245, 248);
+  .purchase-top {
+    background: #fff;
+    padding: 0.28rem 0.32rem 0.28rem 0.32rem;
+    margin-bottom: 0.18rem;
+    .purchase-top-bg {
+      background: url('/images/mobile/@2x/purChase/purChase_bg.png');
+      background-size: 100%;
+      width: 6.82rem;
+      height: 3rem;
+      margin: 0 auto;
+      position: relative;
+      color: #fff;
+      padding-left: 0.35rem;
+      padding-top: 0.32rem;
+      padding-bottom: 0.32rem;
+      .title {
+        font-size: 0.3rem;
+        max-width: 4.6rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .time {
+        font-size: 0.26rem;
+        margin-right: 0.2rem;
+        margin-top: 0.05rem;
+      }
+      .desc {
+        font-size: 0.4rem;
+        margin: 0.2rem 0;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+      }
+      .brand,
+      .size {
+        font-size: 0.3rem;
+        margin-bottom: 0.14rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        width: 4.5rem;
+      }
+      .pmg-icon {
+        position: absolute;
+        right: 0.36rem;
+        bottom: 0.17rem;
+        img {
+          width: 1.28rem;
+          height: 1.33rem;
+        }
+      }
+    }
+    .purchase-top-control {
+      max-width: 520px;
+      margin: 0 auto;
+      margin-top: 0.32rem;
+      .time {
+        margin-top: 0.2rem;
+        margin-left: 0.38rem;
+        .icon {
+          background-image: url('/images/mobile/@2x/purChase/time.png');
+          background-size: 100%;
+          width: 0.28rem;
+          height: 0.28rem;
+          display: inline-block;
+          vertical-align: middle;
+          margin-right: 0.05rem;
+        }
+        .timetext {
+          color: #09061e;
+          font-size: 0.24rem;
+          margin-left: 0.1rem;
+          a {
+            font-size: 0.24rem;
+            color: #fa7701;
+            &.number {
+              font-size: 0.36rem;
+            }
+          }
+        }
+      }
+      .goprice {
+        font-size: 0.28rem;
+        width: 1.78rem;
+        height: 0.68rem;
+        background: linear-gradient(to right, #fb9400, #fb6d03);
+        color: #fff;
+        line-height: 0.68rem;
+        text-align: center;
+        border-radius: 4px;
+      }
+    }
+  }
+  .purcharse_banner {
+    background: #fff;
+    margin: 0 auto;
+    text-align: center;
+    padding: 0.24rem 0 0.36rem 0;
+    margin-bottom: 0.18rem;
+    .banner {
+      background: url('/images/mobile/@2x/purChase/banner.png');
+      background-size: 100%;
+      width: 6.8rem;
+      margin: 0 auto;
+      height: 0.84rem;
+    }
+  }
+  .purcharse_kong {
+    width: 100%;
+    height: 1rem;
+    position: relative;
+  }
+  .purcharse_fixed {
+    background: linear-gradient(
+      to right,
+      rgba(113, 136, 255, 0.97),
+      rgba(79, 68, 253, 0.97)
+    );
+    width: 100%;
+    height: 0.88rem;
+    line-height: 0.88rem;
+    text-align: center;
+    color: #fff;
+    font-size: 0.32rem;
+    position: fixed;
+    bottom: 0px;
+    .money_icon {
+      background: url('/images/mobile/@2x/purChase/money_icon.png');
+      width: 0.39rem;
+      height: 0.39rem;
+      background-size: 100%;
+      margin-top: 0.26rem;
+      margin-right: 0.2rem;
+      // margin-left: 2.8rem;
+    }
+    .clearfix {
+      transform: translate3d(-50%, -50%, 0);
+      left: 50%;
+      top: 50%;
+      position: absolute;
+    }
+  }
+  .purcharseListContent {
+    padding-top: 0.3rem;
+    padding-bottom: 0.37rem;
+    background: #fff;
+    .seek-title {
+      background: #fff;
+    }
+    .purchase_btn_look {
+      font-size: 0.26rem;
+      color: #6a63ea;
+      width: 1.37rem;
+      height: 0.48rem;
+      text-align: center;
+      border-radius: 4px;
+      text-align: center;
+      border: 1px solid #6a63ea;
+      line-height: 0.48rem;
+      margin: 0.31rem auto;
+    }
+    .purchse_btn_more_title {
+      font-size: 0.22rem;
+      color: #6a63ea;
+      text-align: center;
+      a {
+        color: #6a63ea;
+      }
+    }
+  }
+  .company {
+    position: relative;
+    height: 1.36rem;
+    background: #f4f4f4;
+    text-align: center;
+    img {
+      width: 1.15rem;
+      height: 0.23rem;
+      margin-top: 0.24rem;
+    }
+    p {
+      font-size: 0.21rem;
+      color: #aaa;
+      margin: 0.13rem 0 0 0;
+    }
+    a {
+      margin-top: 0.12rem;
+      font-size: 0.18rem;
+      color: #bbb;
+    }
+    .hr {
+      width: 1.09rem;
+      height: 0.02rem;
+      background: #d9d9d9;
+      position: absolute;
+      left: 1.94rem;
+      top: 0.35rem;
+      &.right {
+        right: 1.94rem;
+        left: auto;
+      }
+    }
+  }
+}
+</style>

+ 326 - 93
pages/mobile/user/index.vue

@@ -4,19 +4,46 @@
       <img src="/images/component/default.png"/>
       <div class="user-info">
         <p v-text="userInfo.data.userName"></p>
-        <p v-text="enterpriseInfo.enName"></p>
+        <p>{{enterpriseInfo.enName}}<a @click="setShowEnterpriseToggle(!showEnterpriseToggle, $event)">切换</a></p>
+        <ul class="en-list" v-show="showEnterpriseToggle">
+          <li class="menu-item"
+              v-for="en in sortEnterprises"
+              v-if="en.uu != enterpriseInfo.uu">
+            <a @click="switchEnterprise(en)">{{ en.enName }}</a>
+          </li>
+          <li class="menu-item"  v-if="enterpriseInfo.uu">
+            <a @click="switchEnterprise({uu: 0})"><span v-text="userInfo.data.userName"></span>(个人账户)</a>
+          </li>
+        </ul>
       </div>
-      <span @click="onclick()">{{listName}}<i class="iconfont icon-arrow-down"></i></span>
-      <ul class="supdown" v-if="down">
-        <li @click="onDown('1')" v-show="!isDevice || !isShop">全部收藏</li>
-        <li @click="onDown('-1')" v-show="isDevice || !isShop">店铺关注</li>
-        <li @click="onDown('0')" v-show="!isDevice || isShop">器件收藏</li>
-      </ul>
+      <a v-if="isVendor" v-text="userType === 'saler' ? '切换至买家中心' : '切换至卖家中心'" @click="switchType"></a>
     </div>
-    <div class="collect-list-type" v-if="focusPage.totalElements > 0 && isShop">
-      <p>店铺</p>
+    <ul class="switch-list" v-if="userType !== 'saler'">
+      <li :class="{active: activeType == 'seek'}" @click="activeType = 'seek'" v-text="userType === 'saler' ? '求购询价' : '我的求购'"></li>
+      <li :class="{active: activeType == 'comp'}" @click="activeType = 'comp'">器件收藏</li>
+      <li :class="{active: activeType == 'store'}" @click="activeType = 'store'">店铺关注</li>
+    </ul>
+    <div v-if="activeType == 'seek'">
+      <div class="seek" v-if="userType !== 'saler'">
+        <ul class="seek-type">
+          <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>待报价</div></li>
+          <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
+          <!--<li :class="{active: seekType == 'accept'}" @click="switchSeek('accept')"><div>已采纳</div></li>-->
+        </ul>
+      </div>
+      <ul class="switch-list vendor-switch" v-if="userType === 'saler'">
+        <li :class="{active: seekType == 'wait'}" @click="switchSeek('wait')"><div>全部</div></li>
+        <li :class="{active: seekType == 'done'}" @click="switchSeek('done')"><div>已报价</div></li>
+      </ul>
+      <div class="search-content">
+        <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek">
+        <span @click="searchSeek">
+        <i class="iconfont icon-sousuo"></i>
+        </span>
+      </div>
+      <seek-list :userType="userType" :seekType="seekType" :purchaseManList="purchaseManListData" :isDataChange="isDataChange"></seek-list>
     </div>
-    <div class="shop-list" v-if="isShop" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
+    <div class="shop-list" v-bind:key="item" v-if="activeType == 'store'" v-for="item in focusPage.content" @click="goStoreDetail(item.storeInfo.uuid)">
       <h3>{{item.storeName}}</h3>
       <div class="list-item">
         <div class="item-img">
@@ -24,17 +51,14 @@
           <img :src="item.storeInfo.logoUrl || '/images/component/default.png'">
         </div>
         <div class="list-item-phone">
-          <p>电话:<span>{{item.storeInfo.enterprise.enTel}}</span></p>
-          <p>传真:<span>{{item.storeInfo.enterprise.enFax}}</span></p>
+          <p>电话:<span>{{item.storeInfo.enterprise ? item.storeInfo.enterprise.enTel : '-'}}</span></p>
+          <p>传真:<span>{{item.storeInfo.enterprise ? item.storeInfo.enterprise.enFax : '-'}}</span></p>
           <p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>
           <i class="iconfont icon-shoucang" @click="cancelFocus('store', item, $event)"></i>
         </div>
       </div>
     </div>
-    <div class="collect-list-type" v-if="collectSave.totalElements > 0 && isDevice">
-      <p>器件</p>
-    </div>
-    <div class="detail-brand" v-for="(item, index) in collectSave.content" v-if="isDevice" @click="goComponentDetail(item.componentinfo.uuid)">
+    <div class="detail-brand" v-bind:key="index" v-for="(item, index) in collectSave.content" v-if="activeType == 'comp'" @click="goComponentDetail(item.componentinfo.uuid)">
       <a>
         <div class="brand-item">
           <p>型号:<span>{{item.componentinfo.code}}</span></p>
@@ -44,7 +68,7 @@
         </div>
       </a>
     </div>
-    <div class="none-state" v-if="(collectSave.totalElements == 0 && !isShop) || (focusPage.totalElements == 0 && !isDevice) || (collectSave.totalElements == 0 && focusPage.totalElements == 0)">
+    <div class="none-state" v-if="(activeType != 'seek') && ((collectSave.totalElements == 0 && activeType == 'comp') || (focusPage.totalElements == 0 && activeType == 'store') || (collectSave.totalElements == 0 && focusPage.totalElements == 0))">
       <img src="/images/mobile/@2x/empty-collect.png">
       <p v-text="getRemindText()"></p>
       <nuxt-link to="/">返回首页</nuxt-link>
@@ -61,61 +85,95 @@
         </div>
       </div>
     </div>
+    <page-loading v-show="showLoading"></page-loading>
+    <loading v-show="isSearchSearchingMore"></loading>
+    <div v-if="purchaseManList && false"></div>
+    <div v-if="purchaseManListFetching && false"></div>
   </div>
 </template>
 
 <script>
-  import RemindBox from '~components/mobile/common/RemindBox.vue'
+  import SeekList from '~components/mobile/applyPurchase/SeekList.vue'
+  import {RemindBox, Loading} from '~components/mobile/common'
+  import PageLoading from '~components/common/loading/PageLoading.vue'
   export default {
     layout: 'mobile',
     data () {
       return {
         userName: '',
-        down: false,
         count: '',
         page: '',
         type: '',
-        listName: '全部收藏',
-        isShop: true,
-        isDevice: true,
+        activeType: 'seek',
         collectResult: '取消成功',
         timeoutCount: 0,
         showStoreInfo: false,
-        storeInfo: {}
+        storeInfo: {},
+        seekType: 'wait',
+        showLoading: false,
+        seekKeyword: '',
+        isSearchSearchingMore: false,
+        isChange: false,
+        seekPage: 1,
+        seekSize: 10,
+        purchaseManListData: [],
+        isDataChange: false,
+        showEnterpriseToggle: false
       }
     },
     components: {
-      RemindBox
+      RemindBox,
+      SeekList,
+      PageLoading,
+      Loading
     },
-    fetch ({ store }) {
+    fetch ({ store, route }) {
+      let user = store.state.option.user.data
+      let params = {
+        pageNumber: 1,
+        pageSize: 10,
+        state: (!route.query.type || route.query.type === 'buyer') ? 'todo' : null
+      }
+      if (user.enterprise.uu) {
+        params.enUU = user.enterprise.uu
+      } else {
+        params.userUU = user.userUU
+      }
+//      console.log(params)
       return Promise.all([
         store.dispatch('product/saveStores', { count: 100, page: 1, type: 'component' }),
-        store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 })
+        store.dispatch('shop/StoreFocusPage', { count: 100, page: 1 }),
+        store.dispatch(route.query.type === 'saler' ? 'applyPurchase/loadPurchaseManList' : 'applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
       ])
     },
+    mounted: function () {
+      this.$nextTick(() => {
+        window.addEventListener('scroll', this.scroll, false)
+        document.body.addEventListener('click', () => {
+          this.setShowEnterpriseToggle(false)
+        }, false)
+      })
+    },
     methods: {
-      onclick () {
-        this.down = !this.down
+      // 切换当前企业
+      switchEnterprise (en) {
+        this.showEnterpriseToggle = false
+        this.$http.get(`/user/authentication/${en.uu}`).then(() => {
+          this.isChange = true
+          this.$store.dispatch('loadUserInfo').then(() => {
+            if (this.userType === 'saler') {
+              this.$router.push('/mobile/user?type=buyer')
+            } else {
+              this.reloadData()
+            }
+          })
+        })
       },
-      onDown (type) {
-        if (type === '-1') {
-          this.listName = '店铺关注'
-          this.isShop = true
-          this.isDevice = false
-          this.down = false
-        }
-        if (type === '0') {
-          this.listName = '器件收藏'
-          this.isDevice = true
-          this.isShop = false
-          this.down = false
-        }
-        if (type === '1') {
-          this.listName = '全部收藏'
-          this.isDevice = true
-          this.isShop = true
-          this.down = false
+      setShowEnterpriseToggle (flag, e) {
+        if (e) {
+          e.stopPropagation()
         }
+        this.showEnterpriseToggle = flag
       },
       cancelFocus: function (type, item, event) {
         event.stopPropagation()
@@ -154,12 +212,10 @@
         this.$router.push('/mobile/brand/componentDetail/' + uuid)
       },
       getRemindText: function () {
-        if (this.isDevice && !this.isShop) {
+        if (this.activeType === 'comp') {
           return '抱歉,暂无器件收藏'
-        } else if (!this.isDevice && this.isShop) {
+        } else if (this.activeType === 'store') {
           return '抱歉,暂无店铺关注'
-        } else {
-          return '抱歉,暂无收藏记录'
         }
       },
       selectStoreInfo: function (store, event) {
@@ -169,6 +225,69 @@
       },
       checkInfo: function (str) {
         return str && str.trim() !== ''
+      },
+      switchSeek: function (type) {
+        this.seekType = type
+        this.showLoading = true
+        this.seekKeyword = ''
+        this.isChange = true
+        this.seekPage = 1
+        this.reloadData()
+      },
+      switchType: function () {
+        this.activeType = 'seek'
+        this.seekType = 'wait'
+        this.seekKeyword = ''
+        this.$router.push('/mobile/user' + (this.userType === 'saler' ? '?type=buyer' : '?type=saler'))
+      },
+      searchSeek: function () {
+        this.isChange = true
+        this.reloadData()
+      },
+      reloadData: function () {
+        let type = this.seekType
+        let user = this.$store.state.option.user.data
+        let params = {
+          pageNumber: 1,
+          pageSize: 10,
+          keyword: this.seekKeyword || null
+        }
+        if (user.enterprise.uu) {
+          params.enUU = user.enterprise.uu
+        } else {
+          params.userUU = user.userUU
+        }
+        if (this.userType !== 'saler') {
+          if (type === 'wait') {
+            params.state = 'todo'
+            this.$store.dispatch('applyPurchase/loadBuyerUnSayPricePurchaseManList', params)
+          } else if (type === 'done') {
+            params._state = 'done'
+            this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
+          } else {
+            params._state = 'done'
+            this.$store.dispatch('applyPurchase/loadBuyerPurchaseManList', params)
+          }
+        } else {
+          if (type === 'wait') {
+            this.$store.dispatch('applyPurchase/loadPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, enUU: this.$store.state.option.user.data.enterprise.uu, keyword: this.seekKeyword})
+          } else if (type === 'done') {
+            this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
+          } else {
+            this.$store.dispatch('applyPurchase/loadVendorPurchaseManList', {pageNumber: this.seekPage, pageSize: this.seekSize, _state: 'done', filter: {vendUU: this.$store.state.option.user.data.enterprise.uu, fromDate: null, endDate: null, keyword: this.seekKeyword}, overdue: 1})
+          }
+        }
+      },
+      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.seekPage < this.allPage) {
+          this.getMoreSearch()
+        }
+      },
+      getMoreSearch: function () {
+        this.seekPage++
+        this.isSearchSearchingMore = true
+        this.reloadData()
       }
     },
     computed: {
@@ -180,11 +299,6 @@
       },
       enterpriseInfo () {
         let ens = this.userInfo.data.enterprises
-//        if (ens && ens.length) {
-//          return ens.find(item => item.current) || {enName: this.userInfo.data.userName + '(个人账户)'}
-//        } else {
-//          return {enName: this.userInfo.data.userName + '(个人账户)'}
-//        }
         if (ens && ens.length) {
           for (let i = 0; i < ens.length; i++) {
             if (ens[i].current) {
@@ -194,8 +308,48 @@
         }
         return {enName: this.userInfo.data.userName + '(个人账户)'}
       },
+      sortEnterprises () {
+        let ens = this.userInfo.data.enterprises
+        if (ens && ens.length) {
+          ens.sort(function (a, b) {
+            return b.lastLoginTime - a.lastLoginTime
+          })
+        }
+        return ens
+      },
+      isVendor () {
+        return this.enterpriseInfo.isVendor === 313
+      },
+      userType () {
+        return this.$route.query.type
+      },
       focusPage () {
         return this.$store.state.shop.storeInfo.focusPage.data
+      },
+      purchase () {
+        return this.$store.state.applyPurchase.purchaseManList.purchaseManList
+      },
+      purchaseManList () {
+        let list = this.purchase.data.content
+        if (this.isChange) {
+          this.purchaseManListData = []
+          this.seekPage = 1
+          this.isChange = false
+          this.isDataChange = true
+        } else {
+          this.purchaseManListData = this.purchaseManListData.concat(list)
+          this.isSearchSearchingMore = false
+          this.isDataChange = false
+        }
+//        console.log(this.purchaseManListData)
+        return this.purchase.data.content
+      },
+      allPage () {
+        return Math.floor(this.purchase.data.totalElements / this.purchase.data.size) + Math.floor(this.purchase.data.totalElements % this.purchase.data.size > 0 ? 1 : 0)
+      },
+      purchaseManListFetching () {
+        this.showLoading = false
+        return this.purchase.fetching
       }
     }
   }
@@ -204,8 +358,6 @@
 <style scoped lang="scss">
   .user-content{
     margin-bottom: .98rem;
-    background: #dfe2e4;
-
     .none-state{
       text-align: center;
       padding:1.5rem 0;
@@ -235,33 +387,16 @@
       }
     }
     .user-name{
-      padding:.14rem 0 .2rem .34rem;
-      background:#fff;
-      width:100%;
-      position:relative;
-      border-bottom: .1rem solid #dfe2e4;
-      .supdown{
-        position:absolute;
-        top:.8rem;
-        right:.3rem;
-        z-index:10;
-        width:1.7rem;
-        background:#616264;
-        border-radius:.1rem;
-        li{
-          font-size: .28rem;
-          color:#ffffff;
-          height: .32rem;
-          line-height: .32rem;
-          margin: .4rem 0;
-          text-align: center;
-        }
-      }
+      height: 1.8rem;
+      padding: .28rem 0 .28rem .34rem;
+      background: #fff;
+      width: 100%;
+      position: relative;
       img{
         display: inline-block;
-        width:1.25rem;
-        height:1.25rem;
-        border:.04rem solid #c5dbfc;
+        width: 1.25rem;
+        height: 1.25rem;
+        border: 1px solid #c5dbfc;
         border-radius: .05rem;
         vertical-align: middle;
       }
@@ -269,26 +404,59 @@
         margin-left:.25rem;
         display: inline-block;
         vertical-align: middle;
+        position: relative;
         p{
           font-size:.3rem;
           margin:0;
-          font-weight: bold;
           display: block;
           overflow: hidden;
           text-overflow: ellipsis;
           white-space: nowrap;
-          width: 3.92rem;
+          max-width: 3.92rem;
           &:nth-child(2) {
-            font-weight: normal;
-            margin-top: .3rem;
+            position: relative;
+            margin-top: .2rem;
+            padding-right: .7rem;
+            a {
+              position: absolute;
+              right: 0;
+            }
           }
         }
+        .en-list {
+          position: absolute;
+          max-width: 8rem;
+          max-height: 3rem;
+          overflow-y: auto;
+          border-radius: .05rem;
+          .menu-item {
+            height: .6rem;
+            line-height: .6rem;
+            font-size: .3rem;
+            padding: 0 .2rem;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
+            background: rgba(0, 0, 0, .4);
+            &:active, &:focus, &:hover {
+              background: #7d7d7d;
+            }
+            a {
+              color: #fff;
+            }
+          }
+
+        }
       }
-      span{
-        font-size:.28rem;
-        color:#53a0f7;
-        position: relative;
-        bottom: .3rem;
+      > a {
+        font-size: .24rem;
+        position: absolute;
+        top: .45rem;
+        right: .1rem;
+        color: #3f84f6;
+        border: 1px solid #3f84f6;
+        border-radius: .2rem;
+        padding: .06rem .12rem;
       }
     }
     .shop-list {
@@ -317,7 +485,7 @@
             &:nth-child(2) {
               width:2.4rem;
               height:1.69rem;
-              border: .04rem solid #eee;
+              border: 1px solid #eee;
             }
             &:nth-child(1) {
               position:absolute;
@@ -404,7 +572,7 @@
     }
     .collect-list-type {
       background: #fff;
-      border-bottom: .04rem solid #acacac;
+      border-bottom: 1px solid #acacac;
       p {
         font-size: .32rem;
         margin: 0 0 0 .13rem;
@@ -414,5 +582,70 @@
         border-bottom: .06rem solid #418bf6;
       }
     }
+    ul.switch-list {
+      li {
+        display: inline-block;
+        width: 2.5rem;
+        height: .63rem;
+        line-height: .63rem;
+        text-align: center;
+        font-size: .28rem;
+        color: #666;
+        background: #fff;
+        border: 1px solid #b4b4b4;
+        border-right: none;
+        &.active {
+          background: #0067e7;
+          border: 1px solid #0067e7;
+          color: #fff;
+        }
+        &:first-child {
+          border-left: none;
+        }
+        &:last-child {
+          border-right: none;
+        }
+      }
+      &.vendor-switch {
+        li {
+          width: 50%;
+        }
+      }
+    }
+    .seek {
+      .seek-type {
+        margin-top: .15rem;
+        li {
+          font-size: .28rem;
+          color: #666;
+          display: inline-block;
+          width: 50%;
+          text-align: center;
+          div {
+            border-bottom: 1px solid #c1c4c9;
+            margin: 0 auto;
+            height: .46rem;
+            line-height: .46rem;
+          }
+          &.active {
+            color: #3f84f6;
+            div {
+              border-color: #3f84f6;
+            }
+          }
+        }
+      }
+    }
+    .search-content {
+      text-align: center;
+      padding: .25rem 0 0 0;
+      input {
+        border: 1px solid #376ff3;
+      }
+      span {
+        height: .46rem;
+        line-height: .46rem;
+      }
+    }
   }
 </style>

+ 2 - 6
pages/product/brand/_code.vue

@@ -25,13 +25,9 @@
     },
     fetch ({ store, params }) {
       return Promise.all([
-        store.dispatch('loadBrandDetail', { id: params.code })
+        store.dispatch('loadBrandDetail', { id: params.code }),
+        store.dispatch('product/loadSupplierInformation', { uuid: params.code, count: 5, page: 1 })
       ])
-    },
-    methods: {
-      listenChild: function (brand) {
-        this.$store.dispatch('loadBrandPages', {count: 10, filter: { brandid: brand.id }, page: brand.page})
-      }
     }
   }
 </script>

+ 53 - 33
pages/product/component/_uuid.vue

@@ -1,41 +1,61 @@
 <template>
   <div class="detail">
-    <component-menu/>
-    <component-detail/>
-    <store-info/>
+    <div v-if="componentDetail">
+      <component-menu/>
+      <component-detail/>
+      <store-info/>
+    </div>
+    <div v-else>
+      <error-page :title="'店铺'"></error-page>
+    </div>
   </div>
 </template>
 <script>
-  import { ComponentMenu, ComponentDetail, StoreInfo } from '~components/product'
-  export default {
-    layout: 'main',
-    components: {
-      ComponentMenu,
-      ComponentDetail,
-      StoreInfo
-    },
-    fetch ({ store, route }) {
-      return Promise.all([
-        store.dispatch('loadComponentDetail', {id: route.params.uuid}),
-        store.dispatch('loadComponentStore', {uuid: route.params.uuid}),
-        store.dispatch('loadComponentInformation',
-          {
-            count: 10,
-            page: 1,
-            sorting: {'minPriceRMB': 'ASC'},
-            filter: {
-              uuid: route.params.uuid,
-              ignoreUMall: false,
-              ignoreStore: false,
-              storeIds: '',
-              status: 601
-            }}),
-        store.dispatch('getUmallStoreId'),
-        store.dispatch('product/saveStores'),
-        store.dispatch('loadStoreStatus', { op: 'check' })
-      ])
-    },
-    created () {
+import { ComponentMenu, ComponentDetail, StoreInfo } from '~components/product'
+import { ErrorPage } from '~components/error'
+export default {
+  // validate({ params, redirect }) {
+  //   window.location.href = '/error'
+  // },
+  layout: 'main',
+  components: {
+    ComponentMenu,
+    ComponentDetail,
+    StoreInfo,
+    ErrorPage
+  },
+  fetch({ store, route }) {
+    return Promise.all([
+      store.dispatch('loadComponentDetail', { id: route.params.uuid }),
+      store.dispatch('loadComponentStore', { uuid: route.params.uuid }),
+      store.dispatch('loadComponentInformation', {
+        count: 10,
+        page: 1,
+        sorting: { minPriceRMB: 'ASC' },
+        filter: {
+          uuid: route.params.uuid,
+          ignoreUMall: false,
+          ignoreStore: false,
+          storeIds: '',
+          status: 601
+        }
+      }),
+      store.dispatch('getUmallStoreId'),
+      store.dispatch('product/saveStores'),
+      store.dispatch('loadStoreStatus', { op: 'check' })
+    ])
+  },
+  computed: {
+    componentDetail() {
+      return this.$store.state.componentDetail.detail.data
     }
+  },
+  mounted() {
+    this.$nextTick(() => {
+      // if (!this.$store.state.componentDetail.detail.data) {
+      //   this.$router.replace('/error')
+      // }
+    })
   }
+}
 </script>

+ 1 - 1
pages/product/kind/_id.vue

@@ -20,7 +20,7 @@
     fetch ({store, route}) {
       return Promise.all([
         store.dispatch('product/loadKindParentsWithBothers', {id: route.params.id}),
-        store.dispatch('product/loadKindBrands', {id: route.params.id}),
+        // store.dispatch('product/loadKindBrands', {id: route.params.id}),
         store.dispatch('product/pageComGoods', {kindid: route.params.id})
       ])
     },

+ 1 - 4
pages/register-saler/index.vue

@@ -33,12 +33,9 @@
 </script>
 <style>
   /* 公共模块 */
-  body{
-    background: #F5F5F5;
-    font-family: "Microsoft Yahei", "微软雅黑";
-  }
   .become-store{
     width: 100%;
+    background: #F5F5F5;
     margin: 0 auto;
   }
   .become-store .all-content{

+ 6 - 7
pages/vendor/index.vue

@@ -1,13 +1,12 @@
 <template>
   <div class="container" style="height: 300px;line-height: 300px;text-align: center;font-size: 24px;">
-    
-    <!-- 暂未开放卖家中心SSR版 -->
+    暂未开放卖家中心SSR版
   </div>
 </template>
 <script>
-
-export default {
-  layout: 'main',
-  middleware: 'authenticated'
-}
+export default {}
 </script>
+
+<style lang="scss" scoped>
+
+</style>

+ 10 - 1
plugins/axios.js

@@ -7,9 +7,10 @@ const service = axios.create({
   baseURL: '/'
 })
 
+const isServer = typeof window === 'undefined'
 service.interceptors.request.use(config => {
   // is server render, use ${baseUrl} directly rather than ${proxyUrl}
-  if (typeof window === 'undefined') {
+  if (isServer) {
     if (config.url.indexOf('/inquiry') === 0) {
       config.url = process.env.commonUrl + config.url
     } else {
@@ -17,6 +18,8 @@ service.interceptors.request.use(config => {
     }
     config.headers.cookie = store.state.option.cookies + '; ' + store.state.option.sessionId
     config.headers['User-Agent'] = store.state.option.userAgent
+  } else {
+    document.getElementById('loading').setAttribute('class', 'loading in')
   }
   return config
 }, error => {
@@ -37,8 +40,14 @@ service.interceptors.response.use(response => {
       }
     }
   }
+  if (!isServer) {
+    document.getElementById('loading').setAttribute('class', 'loading')
+  }
   return response
 }, error => {
+  if (!isServer) {
+    document.getElementById('loading').setAttribute('class', 'loading')
+  }
   return Promise.reject(error)
 })
 

+ 14 - 0
plugins/mixin.js

@@ -0,0 +1,14 @@
+/* 目前nuxt 版本如果不高于 1.0.0 并不支持vuex的方法,因此获取相对于的东西只能通过this.$store.state来获取
+   如果nuxt框架为 1.0.0以上,vuex属性状态这里可以优化
+
+*/
+import Vue from 'vue'
+// import { mapState } from 'vuex'
+
+Vue.mixin({
+  computed: {
+    user() {
+      return this.$store.state.option.user
+    }
+  }
+})

+ 22 - 0
plugins/vue-filter.js

@@ -0,0 +1,22 @@
+// 取消 全局注册 过于方法的原因是因为,有可能在调用该方法时候,过滤器未注册,导致页面会有一定时间内展示时间戳
+import Vue from 'vue'
+
+const filters = {
+  date: (date) => {
+    if (date) {
+      const d = new Date(Number(date))
+      const year = d.getFullYear()
+      const monthTemp = d.getMonth() + 1
+      const month = monthTemp < 10 ? '0' + monthTemp : '' + monthTemp
+      const day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate() + ' '
+      return year + '-' + month + '-' + day
+    } else {
+      return '-'
+    }
+  }
+}
+
+for (let key in filters) {
+  Vue.filter(key, filters[key])
+}
+

+ 1 - 1
post.sh

@@ -10,7 +10,7 @@ basepath=$(cd `dirname $0`; pwd)
 buildfile=$basepath/dist.tgz
 
 cnpm install
-npm run build
+#npm run build
 tar -czf $buildfile .
 curl -H "Expect:" -F "groupId=$groupId" -F "artifactId=$artifactId" -F "packaging=$packaging"  -F "version=$version" -F "file=@$buildfile" $repo_uri
 rm -rf $buildfile

+ 1 - 1
server.js

@@ -1,4 +1,4 @@
-const Nuxt = require('nuxt')
+const Nuxt = require('nuxt')
 const app = require('express')()
 const proxy = require('http-proxy-middleware')
 const cookiejar = require('cookiejar')

BIN
static/images/404-details.png


BIN
static/images/all/banner-cuxiao001.jpg


BIN
static/images/all/select-icon-full.png


BIN
static/images/applyPurchase/batch-icon.png


BIN
static/images/applyPurchase/link-buyer.png


BIN
static/images/applyPurchase/select2.png


BIN
static/images/floor/banner01.jpg


BIN
static/images/floor/banner02.jpg


BIN
static/images/mobile/@2x/applyPurchase/add-btn.png


BIN
static/images/mobile/@2x/applyPurchase/currency-arrow-down.png


BIN
static/images/mobile/@2x/applyPurchase/currency-arrow-up.png


BIN
static/images/mobile/@2x/applyPurchase/home/app-banner_01.jpg


BIN
static/images/mobile/@2x/applyPurchase/home/app-banner_02.jpg


BIN
static/images/mobile/@2x/applyPurchase/home/arrow-right.png


BIN
static/images/mobile/@2x/applyPurchase/home/brand.png


BIN
static/images/mobile/@2x/applyPurchase/home/home-bg.png


BIN
static/images/mobile/@2x/applyPurchase/home/phone.png


BIN
static/images/mobile/@2x/applyPurchase/home/seek-footer.png


BIN
static/images/mobile/@2x/applyPurchase/home/seek-title.png


BIN
static/images/mobile/@2x/applyPurchase/home/seek.png


BIN
static/images/mobile/@2x/applyPurchase/home/shop.png


BIN
static/images/mobile/@2x/applyPurchase/say-price-accept.png


BIN
static/images/mobile/@2x/applyPurchase/say-price-check.png


BIN
static/images/mobile/@2x/applyPurchase/say-price-default.png


BIN
static/images/mobile/@2x/applyPurchase/sub-btn.png


BIN
static/images/mobile/@2x/purChase/Isend.png


BIN
static/images/mobile/@2x/purChase/Issend.png


BIN
static/images/mobile/@2x/purChase/banner.png


BIN
static/images/mobile/@2x/purChase/code.png


BIN
static/images/mobile/@2x/purChase/codebg.png


BIN
static/images/mobile/@2x/purChase/money_icon.png


BIN
static/images/mobile/@2x/purChase/purChase_bg.png


BIN
static/images/mobile/@2x/purChase/time.png


BIN
static/images/store/common/goIn.png


BIN
static/images/vendor/edit.png


Some files were not shown because too many files changed in this diff