Bladeren bron

Merge remote-tracking branch 'origin/feature-yc-201813' into feature-yc-201813

# Conflicts:
#	nuxt.config.js
#	plugins/axios.js
yangc 7 jaren geleden
bovenliggende
commit
2b99e2c071
33 gewijzigde bestanden met toevoegingen van 1462 en 670 verwijderingen
  1. 4 3
      assets/scss/mobileCenter.scss
  2. 25 23
      components/applyPurchase/PublishApply.vue
  3. 6 1
      components/home/count/countItem.vue
  4. 68 60
      components/home/count/displayCard.vue
  5. 43 18
      components/home/floor/FloorList.vue
  6. 8 8
      components/mobile/Home.vue
  7. 2 2
      components/mobile/applyPurchase/SayPriceInfo.vue
  8. 262 167
      components/mobile/brand/ComponentDetail.vue
  9. 292 4
      components/mobile/common/StatisticsMobile.vue
  10. 4 154
      components/mobile/store/StoreDetail.vue
  11. 6 1
      nuxt.config.js
  12. 2 0
      pages/index.vue
  13. 132 0
      pages/mobile/center/user/collect/message.vue
  14. 12 1
      pages/mobile/center/user/index.vue
  15. 13 1
      pages/mobile/center/vendor/index.vue
  16. 132 0
      pages/mobile/center/vendor/message.vue
  17. 4 2
      pages/mobile/center/vendor/product.vue
  18. 311 218
      pages/mobile/product/_batchCode.vue
  19. 16 2
      pages/mobile/shop/index.vue
  20. 16 5
      pages/mobile/wechat/index.vue
  21. 2 0
      plugins/axios.js
  22. 18 0
      plugins/mixin.js
  23. BIN
      static/images/all/home-apply.jpg
  24. BIN
      static/images/applyPurchase/rank-title1.png
  25. BIN
      static/images/mobile/@2x/home/countbg.png
  26. BIN
      static/images/mobile/@2x/productDetail/desc-bg2.jpg
  27. BIN
      static/images/mobile/center/user/message.png
  28. BIN
      static/images/mobile/center/user/msgBell.png
  29. BIN
      static/images/mobile/product/productdetail_label.png
  30. 24 0
      store/messageShow.js
  31. 22 0
      store/messageShow/messageCount.js
  32. 22 0
      store/messageShow/messageList.js
  33. 16 0
      utils/baseUtils.js

+ 4 - 3
assets/scss/mobileCenter.scss

@@ -63,13 +63,14 @@
     }
   }
   .collect-block {
-    height: 2.33rem;
+    height: 3.49rem;
     padding: 0 .24rem;
     .content-line {
       height: 1.16rem;
       line-height: 1.16rem;
-      &:first-child {
-        border-bottom: .01rem solid #d3d3d3;
+      border-bottom: .01rem solid #d3d3d3;
+      &:last-child {
+        border-bottom: none;
       }
       img {
         width: .8rem;

+ 25 - 23
components/applyPurchase/PublishApply.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="publish-apply">
-    <div class="good-purchaser">
+    <!--<div class="good-purchaser">
       <p class="good-purchaser-title">
         <img src="/images/applyPurchase/good-purchaser-title.png" alt="">
       </p>
@@ -10,10 +10,10 @@
           <span v-text="goodMan.name"></span>
         </li>
       </ul>
-    </div>
+    </div>-->
     <div class="publish-area">
       <div class="publish-form-area">
-        <p>单个求购</p>
+        <p>单个发布</p>
         <div>
           <div class="form-item">
             <span>
@@ -93,7 +93,7 @@
         <a @click="goPublish()">发布求购</a>
       </div>
       <div class="publish-upload">
-        <h1>批量求购</h1>
+        <h1>批量发布</h1>
         <h2>3秒一键配单采购</h2>
         <label>
           <img src="/images/applyPurchase/upload.png" alt="" />
@@ -116,9 +116,9 @@
       <table>
         <thead>
           <tr>
-            <th width="62">排名</th>
-            <th width="160">型号</th>
-            <th width="92">求购次数</th>
+            <th width="73">排名</th>
+            <th width="272">型号</th>
+            <th width="100">求购次数</th>
           </tr>
         </thead>
         <tbody>
@@ -543,7 +543,7 @@
       float: left;
       text-align: center;
     }
-    .good-purchaser {
+    /*.good-purchaser {
       width: 225px;
       .good-purchaser-title {
         height: 55px;
@@ -574,14 +574,15 @@
           }
         }
       }
-    }
+    }*/
     .publish-area {
-      width: 549px;
+      width: 644px;
       text-align: center;
       .publish-form-area {
-        width: 243px;
+        width: 289px;
         float: left;
         height: 100%;
+        margin-left: 12px;
         p {
           padding-top: 8px;
           font-size: 22px;
@@ -598,6 +599,7 @@
               width: 114px;
               text-align: right;
               display: inline-block;
+              color: #333;
               i {
                 position: relative;
                 top: 2px;
@@ -651,9 +653,9 @@
             }
             input {
               font-size: 12px;
-              width: 106px;
-              height: 18px;
-              line-height: 18px;
+              width: 162px;
+              height: 20px;
+              line-height: 20px;
               border-radius: 2px;
               padding: 0 3px;
               box-shadow: none;
@@ -666,14 +668,14 @@
           }
         }
         >a {
-          width: 90px;
+          width: 100px;
           height: 25px;
           line-height: 25px;
           background: #3975f4;
           color: #fefefe;
           font-size: 16px;
           display: block;
-          margin: 0 auto;
+          margin: -8px 29px 0px 150px;
           border-radius: 3px;
           cursor: pointer;
         }
@@ -733,12 +735,12 @@
       }
     }
     .apply-rank {
-      width: 317px;
+      width: 451px;
       margin-right: 0;
-      background: url('/images/applyPurchase/rank-title.png') no-repeat;
+      background: url('/images/applyPurchase/rank-title1.png') no-repeat;
       background-color: #fff;
-      background-size: 319px 74px;
-      background-position: -3px -2px;
+      background-size: 451px 74px;
+      background-position: -1px -2px;
       table {
         margin: 76px auto 0;
         width: 98%;
@@ -770,7 +772,7 @@
                 color: #f6682f;
                 font-size: 12px;
                 >div {
-                  width: 62px;
+                  width: 74px;
                   span {
                     font-size: 16px;
                   }
@@ -778,12 +780,12 @@
               }
               &:nth-child(2) {
                 >div {
-                  width: 160px;
+                  width: 273px;
                 }
               }
               &:nth-child(3) {
                 >div {
-                  width: 92px;
+                  width: 102px;
                 }
               }
               >div {

+ 6 - 1
components/home/count/countItem.vue

@@ -1,7 +1,8 @@
 <template>
   <div class="count-item">
       <span>{{ nums }}</span>
-      <span v-text="isMore?'万':'个'" v-if="!isShow"></span>
+      <span v-text="isMore?'万':'个'" v-if="!isShow && logo !== 0"></span>
+      <span v-text="isMore?'万':'家'" v-if="!isShow && logo === 0"></span>
       <span v-if="isShow">亿</span>
   </div>
 </template>
@@ -12,6 +13,10 @@
       value: {
         default: 0,
         type: Number
+      },
+      logo: {
+        default: 0,
+        type: Number
       }
     },
     data () {

+ 68 - 60
components/home/count/displayCard.vue

@@ -1,46 +1,24 @@
 <template>
-  <div class="display-card">
+  <div class="display-card" v-if="cardShow">
     <span @click="cardClose" v-if="cardShow" class="cardClose"><img src="/images/all/close.png"></span>
      <div class="content" v-if="cardShow">
        <div>
          <ul class="list-unstyled">
-           <li v-for="(item, index) in title" :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
+           <li ref="pingdanListWrapper" v-for="(item, index) in title"  :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
              <span>{{item}}</span>
            </li>
          </ul>
          <ul class="list-unstyled">
-           <li v-for="(c, index) in counts.data" :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
-             <count-item :value ="c.count"></count-item>
+           <li ref="pingdanListWrapper" v-for="(c, index) in counts"  :style="'top: -' + 30 * timerIndex + 'px'" :class="{'top': isTop}">
+             <count-item :value ="c.count" :logo ="c.logo"></count-item>
            </li>
          </ul>
        </div>
-       <div>
-         <p><span v-html="all"></span><span style="color: #333">家</span>
-         </p>
-       </div>
-       <div>
-         <p v-if="payMoney">
-           <span v-html="payMoney"></span>
-         </p>
-         <p v-else><span>0元</span></p>
-       </div>
-       <div>
-         <p v-if="payMoneyLast">
-           <span v-html="payMoneyLast"></span>
-         </p>
-         <p v-else><span>0元</span></p>
-       </div>
-       <div>
-         <p v-if="inquirySheet">
-           <span v-html="inquirySheet"></span><span style="color: #333">条</span>
+       <div v-for="item in itemCounts">
+         <p><span v-html="item.count"></span>
+           <span style="color: #333" v-if="item.type === 3">家</span>
+           <span style="color: #333" v-if="item.type === 2">条</span>
          </p>
-         <p v-else><span>0条</span></p>
-       </div>
-       <div>
-         <p v-if="inquirySheetLast">
-           <span v-html="inquirySheetLast"></span><span style="color: #333">条</span>
-         </p>
-         <p v-else><span>0条</span></p>
        </div>
        <a class="enter" @click="goStoreApply()">
          <img src="/images/all/enter2.png">
@@ -50,6 +28,7 @@
 </template>
 <script>
   import CountItem from './countItem.vue'
+  import {whichTransitionEvent} from '~utils/baseUtils.js'
   export default {
     name: 'display-card',
     data () {
@@ -58,7 +37,7 @@
         timerIndex: 0,
         isTop: false, // 判断是否滚动至顶,
         timer: {}, // 定时器实体
-        title: [ '品牌', '现货', '规格书' ]
+        title: [ '品牌', '现货', '规格书', '店铺' ]
       }
     },
     components: {
@@ -73,12 +52,24 @@
       changeInterval: function (flag) {
         if (flag) {
           this.timer = setInterval(() => {
-            this.timerIndex ++
-            this.isTop = (this.timerIndex % 3 === 0)
-            if (this.isTop) {
-              this.timerIndex = 0
-            }
-          }, 3000)
+            this.isTop = false
+            let isChange = true
+            this.timerIndex++
+            let _transitionEvent = whichTransitionEvent()
+            _transitionEvent && this.$refs.pingdanListWrapper[0].addEventListener(
+                   _transitionEvent, () => {
+                       console.log(isChange)
+                       if (isChange) {
+                         let title = this.title.shift()
+                         let count = this.counts.shift()
+                         this.title.push(title)
+                         this.counts.push(count)
+                         this.timerIndex = 0
+                         isChange = false
+                         this.isTop = true
+                       }
+              })
+          }, 4000)
         } else {
           clearInterval(this.timer)
         }
@@ -107,7 +98,7 @@
             }
             num += '<span style="color: #333">万</span>'
           } else {
-            if (type === 1 || type === 2) {
+            if (type === 1) {
               num += '<span style="color: #333">元</span>'
             } else {
               num += ''
@@ -123,9 +114,9 @@
             num = arr[0] * Math.pow(10, arr[1])
           }
           if (num > 99999999) {
-            num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '亿'
+            num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '<span style="color: #333">亿</span>'
           } else if (num > 9999) {
-            num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '万'
+            num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '<span style="color: #333"></span>'
           } else {
             num += ''
           }
@@ -149,26 +140,43 @@
         return this.$store.state.count.allCount.data
       },
       payMoneyLast () {
-        return this.allCount[0] ? this.formatNumber(this.allCount[0].count, 2) : 0
+        return this.allCount[0] ? this.formatNumber(this.allCount[0].count, 1) : 0
       },
       payMoney () {
         return this.allCount[1] ? this.formatNumber(this.allCount[1].count, 1) : 0
       },
       inquirySheet () {
-        let sheetNum = this.$store.state.count.inquirySheet.data.count
-        return this.formatDouble(sheetNum)
+        let sheetNum = this.$store.state.count.inquirySheet.data
+        return sheetNum ? this.formatDouble(sheetNum.count) : 0
       },
       inquirySheetLast () {
-        let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
-        return this.formatDouble(lastSheetNum)
+        let lastSheetNum = this.$store.state.count.inquirySheetLast.data
+        return lastSheetNum ? this.formatDouble(lastSheetNum.count) : 0
       },
       all () {
         let count = this.$store.state.supplier.merchant.merchantAll.data
-        let supplierCount = count.content ? count.totalElements + '' : '0'
+        let supplierCount = count.content ? count.totalElements + '' : 0
         return this.formatNumber(supplierCount, 0)
       },
+      itemCounts () {
+        let arr = []
+        arr.push({count: this.all ? this.all : 0, type: 3}, {count: this.payMoney ? this.payMoney : 0, type: 1}, {count: this.payMoneyLast ? this.payMoneyLast : 0, type: 1}, {count: this.inquirySheet ? this.inquirySheet : 0, type: 2}, {count: this.inquirySheetLast ? this.inquirySheetLast : 0, type: 2})
+        return arr
+      },
+      list () {
+        let list = JSON.parse(JSON.stringify(this.$store.state.provider.stores.storeList.data))
+        return list
+      },
       counts () {
-        return this.$store.state.product.common.counts
+        let arr = []
+        let countM = this.$store.state.product.common.counts.data
+        if (countM) {
+          countM.forEach((value, key, $data) => {
+            arr.push({count: value.count, logo: 1})
+          })
+        }
+        arr.push({count: this.list.totalElements, logo: 0})
+        return arr
       },
       enterprise () {
         return this.user.data.enterprise
@@ -224,15 +232,15 @@
                   position: relative;
                   top: 0;
                   transition: top 1s;
-                  -moz-transition: top 1s; /* Firefox 4 */
-                  -webkit-transition: top 1s; /* Safari and Chrome */
-                  -o-transition: top 1s; /* Opera */
-                 /* &.top {
+                  /*-moz-transition: top 1s; !* Firefox 4 *!*/
+                  /*-webkit-transition: top 1s; !* Safari and Chrome *!*/
+                  /*-o-transition: top 1s; !* Opera *!*/
+                  &.top {
                     transition: top 0s;
-                    -moz-transition: top 0s; !* Firefox 4 *!
-                    -webkit-transition: top 0s; !* Safari and Chrome *!
-                    -o-transition: top 0s; !* Opera *!
-                  }*/
+                    /*-moz-transition: top 0s; !* Firefox 4 *!*/
+                    /*-webkit-transition: top 0s; !* Safari and Chrome *!*/
+                    /*-o-transition: top 0s; !* Opera *!*/
+                  }
                 }
               }
             &:last-child{
@@ -254,12 +262,12 @@
                 -moz-transition: top 1s; /* Firefox 4 */
                 -webkit-transition: top 1s; /* Safari and Chrome */
                 -o-transition: top 1s; /* Opera */
-                /*&.top {
+                &.top {
                   transition: top 0s;
-                  -moz-transition: top 0s; !* Firefox 4 *!
-                  -webkit-transition: top 0s; !* Safari and Chrome *!
-                  -o-transition: top 0s; !* Opera *!
-                }*/
+                  -moz-transition: top 0s; /* Firefox 4 */
+                  -webkit-transition: top 0s; /* Safari and Chrome */
+                  -o-transition: top 0s; /* Opera */
+                }
               }
             }
           }

+ 43 - 18
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.jpg" 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">
@@ -16,7 +16,10 @@
                 <div class="list-head">
                   <span>发布时间</span>
                   <span>买家名称</span>
+                  <span>品牌</span>
+                  <span>类目(产品名称)</span>
                   <span>型号</span>
+                  <span>规格</span>
                   <span>操作</span>
                 </div>
                 <ul>
@@ -26,7 +29,10 @@
                       <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 :title="purchaseMan.inbrand">{{purchaseMan.inbrand || '-'}}</div>
+                    <div :title="purchaseMan.prodTitle">{{purchaseMan.prodTitle || '-'}}</div>
+                    <div :title="purchaseMan.cmpCode">{{purchaseMan.cmpCode || '-'}}</div>
+                    <div :title="purchaseMan.spec">{{purchaseMan.spec || '-'}}</div>
                     <div>
                       <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>
@@ -283,20 +289,21 @@
     margin-top: 20px;
     .seek-banner {
       > li{
-        float: left;
-        padding-left: 14px;
+        /*float: left;*/
+        /*padding-left: 14px;*/
         position: relative;
-        &:first-child{
-          padding-left: 0;
-        }
+        /*&:first-child{*/
+          /*padding-left: 0;*/
+        /*}*/
       }
     }
     .banner-cuxiao {
-      width: 660px;
+      width: 1190px;
       height: 253px;
-      background: url('/images/all/banner-cuxiao02.png') no-repeat;
+      background: url('/images/all/home-apply.jpg') no-repeat;
+      /*background-size: 1190px auto;*/
       .wrap {
-        width: 436px;
+        width: 874px;
         .title {
           color: #f57a2e;
           font-size: 20px;
@@ -320,17 +327,26 @@
           span {
             display: inline-block;
             &:nth-child(1) {
-              width: 70px;
+              width: 97px;
             }
             &:nth-child(2) {
-              width: 144px;
+              width: 164px;
             }
             &:nth-child(3) {
-              width: 106px;
+              width: 139px;
             }
             &:nth-child(4) {
               width: 115px;
             }
+            &:nth-child(5) {
+              width: 160px;
+            }
+            &:nth-child(6) {
+              width: 99px;
+            }
+            &:nth-child(7) {
+              width: 91px;
+            }
           }
         }
         ul {
@@ -362,17 +378,26 @@
                 color: #f57a2e;
               }
               &:nth-child(1) {
-                width: 70px;
+                width: 97px;
               }
               &:nth-child(2) {
-                width: 144px;
+                width: 164px;
               }
               &:nth-child(3) {
-                width: 106px;
+                width: 139px;
               }
               &:nth-child(4) {
                 width: 115px;
               }
+              &:nth-child(5) {
+                width: 160px;
+              }
+              &:nth-child(6) {
+                width: 99px;
+              }
+              &:nth-child(7) {
+                width: 91px;
+              }
               a {
                 width: 64px;
                 height: 22px;
@@ -411,8 +436,8 @@
       }
       .purchase {
         position: absolute;
-        left: 515px;
-        top: 184px;
+        right: 101px;
+        top: 175px;
         width: 100px;
         height: 28px;
         line-height: 28px;

+ 8 - 8
components/mobile/Home.vue

@@ -209,14 +209,14 @@
         let info = localStorage.getItem('USOFTMALLWECHATINFO')
         // 如果本地有缓存 则证明存在openid
         if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger' && !this.$route.query.code && !info) {
-          window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
-          // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://gwzcfb.natappfree.cc&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
-        } else if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger') {
-          if (info) {
-            this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
-          } else {
-            this.$store.dispatch('GerWechatInfo', {code: this.$route.query.code})
-          }
+            window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+            // window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxd29bbca61728b189&redirect_uri=http://gwzcfb.natappfree.cc&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+          } else if (ua.match(/micromessenger/i) && ua.match(/micromessenger/i)[0] === 'micromessenger') {
+            if (info) {
+              this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
+            } else {
+              this.$store.dispatch('GerWechatInfo', {code: this.$route.query.code})
+            }
         }
       })
     }

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

@@ -288,7 +288,7 @@
           }, err => {
             console.log(err)
 //              this.$message.success('系统错误')
-            this.onRemind('系统错误')
+            this.onRemind(err.response.data.message || '系统错误')
           })
       },
       onRemind: function (str) {
@@ -302,7 +302,7 @@
             item.agreed = 0
             this.onRemind('拒绝报价成功')
           }, err => {
-            this.onRemind('拒绝报价失败,系统错误')
+            this.onRemind(err.response.data.message || '拒绝报价失败,系统错误')
             console.log(err)
           })
       },

+ 262 - 167
components/mobile/brand/ComponentDetail.vue

@@ -9,10 +9,10 @@
         <span>类目(产品名称):</span>
         <span>{{component.kind.nameCn || '-'}}</span>
       </div>
-      <div class="base-detail-item">
-        <span>规&nbsp;&nbsp;&nbsp;&nbsp;格:</span>
-        <span>{{component.spec || '-'}}</span>
-      </div>
+      <!--<div class="base-detail-item">-->
+      <!--<span>规&nbsp;&nbsp;&nbsp;&nbsp;格:</span>-->
+      <!--<span>{{component.spec || '-'}}</span>-->
+      <!--</div>-->
       <div class="base-detail-item attach" @click="goAttach(component.attach)">
         <span v-if="component.attach">规格书:<img src="/images/mobile/@2x/productDetail/pdf.png" alt=""><span>查看</span></span>
         <span v-else>规格书:-</span>
@@ -33,63 +33,77 @@
       </div>
     </div>
     <div class="product-store" v-if="activeType == 'store'">
-      <table v-if="searchLists&&searchLists.length > 0">
-        <thead id="product-head">
-          <tr>
-            <th style="width: 1.55rem;">商家</th>
-            <th style="width: 1.59rem;">生产日期</th>
-            <th style="width: 2.58rem;">价格梯度</th>
-            <th style="width: 1.77rem;">交期(天)</th>
-          </tr>
-        </thead>
-        <thead class="active" v-show="isScrollOverTab">
-          <tr>
-            <th style="width: 1.55rem;">商家</th>
-            <th style="width: 1.59rem;">生产日期</th>
-            <th style="width: 2.58rem;">价格梯度</th>
-            <th style="width: 1.77rem;">交期(天)</th>
-          </tr>
-        </thead>
-        <tbody id="product-body">
-          <tr v-for="store in searchLists">
-            <td class="store-name">
-              <nuxt-link :to="'/mobile/shop/' + store.storeid">
-                {{store.storeName || '-' | storeNameFilter}}
-              </nuxt-link>
-            </td>
-            <td>
-              <div v-if="!store.packaging && !store.breakUp && !store.produceDate">-</div>
-              <div>{{store.produceDate}}</div>
-              <div>{{store.packaging}}</div>
-              <div>{{store.breakUp?'可拆卖':'不可拆卖'}}</div>
-            </td>
-            <td class="price-level-wrap">
-              <div v-if="!store.prices || store.prices.length == 0">-</div>
-              <div class="price-number fl">
-                <div v-for="price in store.prices">{{price.start}}+</div>
-              </div>
-              <div class="price-number fr">
-                <div v-for="price in store.prices" class="price-level">
-                  <span v-if="store.currencyName.indexOf('RMB')!==-1">¥{{price.rMBPrice | currency}}</span>
-                  <span v-if="store.currencyName.indexOf('USD')!==-1">${{price.uSDPrice | currency}}</span>
-                </div>
-              </div>
-            </td>
-            <td class="push-date">
-              <div v-if="store.b2cMinDelivery">
-                <span>{{store.b2cMinDelivery}}</span>
-                <span v-if="store.b2cMaxDelivery && store.b2cMaxDelivery !== store.b2cMinDelivery">-</span>
-                <span v-if="store.b2cMaxDelivery && store.b2cMaxDelivery !== store.b2cMinDelivery">{{store.b2cMaxDelivery}}</span>
-              </div>
-              <div v-if="store.minBuyQty"><span class="order-tag">订</span>{{store.minBuyQty}}起订</div>
-              <div v-if="store.reserve"><span class="order-tag reserve-tag">库</span>{{store.reserve}}</div>
-              <div v-if="!store.b2cMinDelivery">
-                <span>—</span>
-              </div>
-            </td>
-          </tr>
-        </tbody>
-      </table>
+      <div v-for="(item, index) in searchLists">
+        <div class="middle">
+          <div class="storeName" @click="goProductDetail(item)">
+            {{item.storeName || '-' | storeNameFilter}}
+          </div>
+          <div class="list">
+            <div class="fl">
+              <div class="name">品牌:</div>
+              <div class="text">{{item.brandNameEn}}</div>
+            </div>
+          </div>
+          <div class="list">
+            <div class="fl" style="width: 100%">
+              <div class="name">类目(产品名称):</div>
+              <div class="text" style="color: #3f84f6">{{item.kindNameCn || '-'}}</div>
+            </div>
+
+          </div>
+          <div class="list">
+            <div class="fl" style="width: 100%">
+              <div class="name">型号:</div>
+              <div class="text">{{item.code || '-'}}</div>
+            </div>
+          </div>
+          <div class="list">
+            <div class="fl" style="width: 100%">
+              <div class="name">规格:</div>
+              <div class="text">{{item.spec || '-'}}</div>
+            </div>
+          </div>
+
+          <div class="list">
+            <div class="fl" style="width: 100%">
+              <div class="name">包装:</div>
+              <div class="text">{{item.packaging || '无包装信息'}}</div>
+              <div class="textinfo" v-if="item.breakUp">可拆卖</div>
+            </div>
+          </div>
+
+          <div class="list">
+            <div class="name">生产日期:</div>
+            <div class="text" :title="item.produceDate">{{item.produceDate || '-'}}</div>
+          </div>
+
+          <div class="list">
+            <div class="fl" style="width: 100%; ">
+              <div class="name">交期(天):</div>
+              <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery != item.b2cMinDelivery)" v-text="item.b2cMinDelivery + '-'+ item.b2cMaxDelivery"></div>
+              <div class="text" style="color: #ef5042" v-if="item.b2cMaxDelivery && (item.b2cMaxDelivery == item.b2cMinDelivery)" v-text="item.b2cMinDelivery"></div>
+              <div v-if="item.minBuyQty" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag">订</span>{{item.minBuyQty}}起订</div>
+              <div v-if="item.reserve" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag reserve-tag">库</span>{{item.reserve}}</div>
+            </div>
+          </div>
+          <div class="list">
+            <div class="name left">价格梯度<p>(pcs):</p></div>
+            <div class="table left">
+              <ul>
+                <li class="title">
+                  <div>分段数量/PCS</div>
+                  <div>分段单价</div>
+                </li>
+                <li v-for="price in item.prices">
+                  <div>{{price.start}}+</div>
+                  <div v-if="item.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
+                  <div v-else>${{price.rMBPrice}}</div>
+                </li>
+              </ul>
+            </div>
+          </div>
+        </div>
+      </div>
     </div>
     <div v-if="(storeList.totalElements == 0 && activeType == 'store') || (component.properties && component.properties.length == 0 && activeType == 'param')" class="no-store">
       <img src="/images/mobile/@2x/car@2x.png" alt="">
@@ -100,10 +114,11 @@
     <remind-box :title="collectResult" :timeoutCount="timeoutCount"></remind-box>
     <loading v-show="isSearchingMore"></loading>
     <login-box @onLoginBoxClose="showLoginBox = false" v-if="showLoginBox" :url="url"></login-box>
+    <pull-up :searchMore="fetching" :allPage="allPage" :page="params.page" @pullUpAction="getMoreStore"></pull-up>
   </div>
 </template>
 <script>
-  import {RemindBox, Loading, LoginBox} from '~components/mobile/common'
+  import {RemindBox, Loading, LoginBox, PullUp} from '~components/mobile/common'
   export default {
     data () {
       return {
@@ -134,17 +149,21 @@
     components: {
       RemindBox,
       Loading,
-      LoginBox
+      LoginBox,
+      PullUp
     },
     mounted: function () {
-      let _this = this
-      _this.$nextTick(function () {
-        window.addEventListener('scroll', function () {
-          _this.scroll()
-        }, false)
-      })
+      // let _this = this
+      // _this.$nextTick(function () {
+      //   window.addEventListener('scroll', function () {
+      //     _this.scroll()
+      //   }, false)
+      // })
     },
     computed: {
+      fetching () {
+        return this.$store.state.componentInformation.information.fetching
+      },
       component () {
         return this.$store.state.componentDetail.detail.data
       },
@@ -244,16 +263,19 @@
       }
     },
     methods: {
+      goProductDetail: function (com) {
+        this.$router.push('/mobile/shop/' + com.storeid)
+      },
       scroll: function () {
         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
         if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchingMore && this.params.page < this.allPage) {
           this.getMoreStore()
         }
-        let tbodyObj = document.getElementById('product-body')
-        let theadObj = document.getElementById('product-head')
-        if (theadObj) {
-          this.isScrollOverTab = tbodyObj.getBoundingClientRect().top - theadObj.getBoundingClientRect().height - 5 <= theadObj.getBoundingClientRect().height
-        }
+        // let tbodyObj = document.getElementById('product-body')
+        // let theadObj = document.getElementById('product-head')
+        // if (theadObj) {
+        //   this.isScrollOverTab = tbodyObj.getBoundingClientRect().top - theadObj.getBoundingClientRect().height - 5 <= theadObj.getBoundingClientRect().height
+        // }
       },
       getMoreStore: function () {
         if (!this.isSearchingMore) {
@@ -300,19 +322,21 @@
 <style lang="scss" scoped>
   .component-detail {
     font-size: .28rem;
-    margin-bottom: 1.2rem;
+    margin-bottom: 0.98rem;
     background: #f7f7f7;
     padding-top: .2rem;
+    padding-bottom: 0.2rem;
     .base-detail {
-      margin: 0 .27rem .2rem .27rem;
+      /*margin: 0 .27rem .2rem .27rem;*/
       padding: .18rem .36rem 0 .36rem;
-      border-radius: .1rem;
-      background: url('/images/mobile/@2x/productDetail/desc-bg.png')no-repeat;
+      /*border-radius: .1rem;*/
+      background: url('/images/mobile/@2x/productDetail/desc-bg2.jpg')no-repeat;
       background-size: cover;
-      height: 3.96rem;
+      height: 4.11rem;
       position: relative;
+      box-shadow: 0 0 5px #8a8a8a;
       .base-detail-item {
-        margin-top: .14rem;
+        margin-top: 0.3rem;
         position: relative;
         color: #fff;
         &:nth-child(1) {
@@ -340,7 +364,7 @@
         }
         &.product-description {
           height: 1.58rem;
-          margin-top: .2rem;
+          margin-top: .6rem;
         }
         .description {
           line-height: .4rem;
@@ -369,11 +393,13 @@
       }
     }
     .product-switch-item {
+      margin-top: 0.15rem;
       text-align: center;
       background: #fff;
+      border-bottom: 1px solid #d8d8d8;
       .mobile-switch-btn {
         background: #fff;
-        color: #666;
+        color: #333;
         display: inline-block;
         height: .64rem;
         line-height: .64rem;
@@ -421,95 +447,164 @@
         }
       }
     }
-    .product-store {
-      margin: .2rem 0;
-      table {
-        width: 100%;
-        font-size: .28rem;
-        thead {
-          background: #d5e5fb;
-          &.active {
-            position: fixed;
-            top: .88rem;
-            z-index: 2;
+    .middle {
+      .order-tag {
+        display: inline-block;
+        font-size: .18rem;
+        color: #fff;
+        font-weight: bold;
+        background: #ee1717;
+        height: .27rem;
+        width: .27rem;
+        line-height: .27rem;
+        text-align: center;
+        border-radius: .05rem;
+        position: relative;
+        top: -.05rem;
+        margin-right: .05rem;
+        &.reserve-tag {
+          background: #07bb1c;
+        }
+      }
+      text-align: left;
+      padding: 0 0 0.24rem;
+      background: #fff;
+      margin: 0.24rem 0.24rem 0;
+      border-radius: 5px;
+      border: 1px solid #e3e5e8;
+      .storeName{
+        color: #3f84f6;
+        font-size: 0.28rem;
+        line-height: 0.6rem;
+        border-bottom: 1px solid #d3d3d3;
+        margin-bottom: 0.18rem;
+        padding-left: 0.24rem;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        font-weight: bold;
+      }
+      .pms {
+        color: #f57710;
+        border: 1px solid #f57710;
+        border-radius: 0.4rem;
+        background: #fff;
+        font-size: 0.24rem;
+        height: 0.4rem;
+        line-height: 0.4rem;
+        width: 0.8rem;
+        text-align: center;
+      }
+      .list {
+        padding: 0 0.24rem;
+        .left {
+          float: left;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .textinfo {
+          font-size: 0.18rem;
+          margin-left: 0.1rem;
+          display: inline-block;
+          background: #3f84f6;
+          color: #fff;
+          font-weight: bold;
+          border-radius: 3px;
+          width: 0.8rem;
+          height: 0.32rem;
+          line-height: 0.32rem;
+          text-align: center
+        }
+        .button {
+          font-size: 0.3rem;
+          color: #1a58dd;
+          width: 0.92rem;
+          height: 0.43rem;
+          line-height: 0.43rem;
+          text-align: center;
+          border-radius: 5px;
+          border:1px solid #1a58dd;
+          display: inline-block;
+          margin-right: 0.2rem;
+        }
+        margin-bottom: 0.18rem;
+        &::after{
+          clear: both;
+          display: block;
+          content: ' ';
+          visibility: hidden;
+          zoom: 1;
+        }
+        .fl {
+          width: 4.4rem;
+          float: left;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        .fr {
+          text-align: left;
+          width: 2.6rem;
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+        }
+        &.list-long {
+          .fl {
+            width: 100% !important;
           }
-          tr {
-            th {
-              font-weight: bold;
+        }
+        .name {
+          color: #333;
+          font-size: 0.28rem;
+          display: inline-block;
+        }
+        .text {
+          display: inline-block;
+          color: #333;
+          font-size: 0.28rem
+        }
+        .table {
+          width: 5rem;
+          margin-bottom: 0;
+          margin-top: 0;
+          margin-left: 0.1rem;
+          li {
+            height: 0.43rem;
+            line-height: 0.43rem;
+            border-left: .01rem solid #c5c5c5;
+            font-size: .28rem;
+            &::after {
+              clear: both;
+              display: block;
+              content: ' ';
+              visibility: hidden;
+              zoom: 1;
+            }
+            div {
               text-align: center;
-              height: .78rem;
-              line-height: .78rem;
-              >span {
-               font-size: .22rem;
-              }
+              width: 50%;
+              float: left;
+              border-right: .01rem solid #c5c5c5;
+              border-bottom: .01rem solid #c5c5c5;
             }
-          }
-        }
-        tbody {
-          background: #fff;
-          tr {
-            border-bottom: 0.2rem solid #f7f7f7;
-            td {
-              padding: .2rem .1rem;
-              &.store-name {
-                color: #418bf6;
-                a {
-                  padding: 0;
-                  display: block;
-                  width: 1.2rem;
-                  overflow: hidden;
-                  margin-left: .16rem;
-                }
-              }
-              &.price-level-wrap {
-                text-align: center;
-              }
-              > div {
-                overflow: hidden;
-                text-overflow: ellipsis;
-                white-space: nowrap;
-                max-width: 1.58rem;
-              }
-              .price-number {
-                display: inline-block;
-                vertical-align: middle;
-                margin-bottom: 0;
-                width: .9rem;
-              }
-              div {
-                margin-bottom: .2rem;
-                text-align: left;
-                &:last-child {
-                  margin-bottom: 0;
-                }
-              }
-              &.push-date {
-              text-align: left;
-                div {
-                  text-align: left;
-                }
+            &:nth-child(odd) {
+              background: #ddd;
+              color: #333;
+              font-size: 0.28rem;
             }
-              .price-level:last-child {
-                color: #fc5708;
-              }
-              .order-tag {
-                display: inline-block;
-                font-size: .18rem;
-                color: #fff;
-                font-weight: bold;
-                background: #ee1717;
-                height: .27rem;
-                width: .27rem;
-                line-height: .27rem;
-                text-align: center;
-                border-radius: .05rem;
-                position: relative;
-                top: -.05rem;
-                margin-right: .05rem;
-                &.reserve-tag {
-                  background: #07bb1c;
-                }
-              }
+            &:nth-child(even) {
+              background: #fcfcfc;
+              color: #333;
+              font-size: 0.28rem;
+            }
+            &:nth-last-of-type(1){
+              color: #f31919;
+            }
+            &.title {
+              font-size: 0.28rem;
+              color: #333;
             }
           }
         }

+ 292 - 4
components/mobile/common/StatisticsMobile.vue

@@ -1,4 +1,4 @@
-<template>
+<!--<template>
   <div class="statistics">
     <ul class="list-inline" :style="{top: widthTop + 'rem'}" :class="{no_tran: widthTop == 2.4}">
       <li v-for="(item, index) in itemData" :style="index % 2 == 0 ? 'text-align: right;padding-right: .3rem;' : 'text-align: left;padding-left: .3rem;'">
@@ -14,6 +14,20 @@
         </span>
       </li>
     </ul>
+    <ul class="list-inline" :style="{top: widthTop + 'rem'}" :class="{no_tran: widthTop == 2.4}">
+      <li v-for="(item, index) in itemData" :style="index % 2 == 0 ? 'text-align: right;padding-right: .3rem;' : 'text-align: left;padding-left: .3rem;'">
+        <span class="number" v-if="item.type === 2">
+          <img :src="`/images/mobile/@2x/home/count${index + 1}.jpg`" alt="">
+          <span v-html="formatDouble(item.count)" style="vertical-align: middle"></span>
+          <span class="unit">条</span>
+        </span>
+        <span class="number" v-else>
+          <img :src="`/images/mobile/@2x/home/count${index + 1}.jpg`" alt="">
+          <span v-html="formatNumber(item.count, index)" style="vertical-align: middle"></span>
+          <span class="unit" v-if="item.type === 3">家</span>
+        </span>
+      </li>
+    </ul>
   </div>
 </template>
 <script>
@@ -66,6 +80,8 @@
         } else {
           if (type === 6 || type === 7) {
             num += '<span style="color: #333">元</span>'
+          } else if (type === 0 || type === 1 || type === 2) {
+            num += '<span style="color: #333">个</span>'
           } else {
             num += ''
           }
@@ -130,19 +146,24 @@
 <style lang="scss" scoped>
   .statistics{
     position:relative;
-    height: .6rem;
+  /*  height: 0.6rem;*/
+    height: 8rem;
     border-radius:.3rem;
     background: #fff;
     margin:0 .05rem .2rem;
-    overflow: hidden;
+    /*overflow: hidden;*/
+    background: url('/images/mobile/@2x/home/countbg.png') no-repeat center;
     ul{
+      float: left;
+      width:50%;
       position:absolute;
       transition: .5s all linear;
+      border: 1px solid red;
       &:no_tran{
         transition:none;
       }
       li{
-        width:50%;
+        width:100%;
         height:.6rem;
         line-height: .6rem;
         font-size: .28rem;
@@ -182,4 +203,271 @@
       }
     }
   }
+</style>-->
+<template>
+  <div class="statistics">
+    <ul class="list-inline pull-left" ref="pingdanListWrapper" :style="{top: topLeft + 'rem'}" :class="{no_tran: topLeft == 2.4}">
+      <li v-for="(item, index) in itemData" v-if="index <= 4">
+        <span  class="number">
+          <span class="name" v-html="count[index]"></span>
+          <span class="num" v-html="formatNumber(item.count, index)"></span>
+          <span class="unit" v-if="item.type === 3">家</span>
+        </span>
+      </li>
+    </ul>
+    <ul class="list-inline pull-right" ref="pingdanListWrapper" :style="{top: topRight + 'rem'}" :class="{no_tran: topRight == 2.4}">
+      <li v-for="(item, index) in itemData" v-if="index > 4">
+        <span class="number">
+          <span class="name" v-html="count[index]"></span>
+          <span class="month" v-if="index === 5">(上月)</span>
+          <span class="month" v-if="index === 6">(本月)</span>
+          <span class="num" v-html="formatDouble(item.count)"></span>
+          <span class="unit" v-if="item.type === 2">条</span>
+        </span>
+      </li>
+    </ul>
+  </div>
+</template>
+<script>
+  import {whichTransitionEvent} from '~utils/baseUtils.js'
+  export default {
+    name: 'StatisticsView',
+    data () {
+      return {
+        step: 1,
+        count: ['现货', '品牌', '规格书', '供应商', '店铺', '询价求购', '询价求购', '上年交易', '本年交易'],
+        topLeft: 0,
+        topRight: 0,
+        timerIndex: 0,
+        timer: {}, // 定时器实体
+        imgbox: {
+            'src': ''
+        }
+      }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        this.changeIntervalL()
+        this.changeIntervalR()
+      })
+    },
+    methods: {
+//      changeIntervalL () {
+//        setInterval(() => {
+//          this.topLeft += -1
+//          let arr1 = this.itemData.slice(0, 5)
+//          let arr2 = arr1.shift()
+//          arr1.push(arr2)
+//          if (this.topLeft === -5) {
+//            this.topLeft = 0
+//          }
+//        }, 2400)
+//      },
+//      changeIntervalR () {
+//        setInterval(() => {
+//          this.topRight += -1
+//          let arr1 = this.itemData.slice(5, 9)
+//          let arr2 = arr1.shift()
+//          arr1.push(arr2)
+//          this.itemDataTemp.push(this.itemData)
+//          if (this.topRight === -4) {
+//            this.topRight = 0
+//          }
+//        }, 3000)
+//      },
+      changeIntervalL: function (flag) {
+        if (flag) {
+          this.timer = setInterval(() => {
+            this.isTop = false
+            let isChange = true
+            this.timerIndex++
+            let _transitionEvent = whichTransitionEvent()
+            _transitionEvent && this.$refs.pingdanListWrapper[0].addEventListener(
+              _transitionEvent, () => {
+                console.log(isChange)
+                if (isChange) {
+                  let title = this.itemData.slice(0, 5).shift()
+                  this.title.push(title)
+                  this.timerIndex = 0
+                  isChange = false
+                  this.isTop = true
+                }
+              })
+          }, 2400)
+        } else {
+          clearInterval(this.timer)
+        }
+      },
+      changeIntervalR: function (flag) {
+        if (flag) {
+          this.timer = setInterval(() => {
+            this.isTop = false
+            let isChange = true
+            this.timerIndex++
+            let _transitionEvent = whichTransitionEvent()
+            _transitionEvent && this.$refs.pingdanListWrapper[0].addEventListener(
+              _transitionEvent, () => {
+                console.log(isChange)
+                if (isChange) {
+                  let title = this.itemData.slice(5, 9).shift()
+                  this.title.push(title)
+                  this.timerIndex = 0
+                  isChange = false
+                  this.isTop = true
+                }
+              })
+          }, 3000)
+        } else {
+          clearInterval(this.timer)
+        }
+      },
+      formatNumber (num, type) {
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          let str2 = num.toString()
+          num = Math.floor(num / 100000000)
+          if (parseInt(str2.charAt(str2.length - 8)) > 8) {
+            num = num + 1
+          }
+          num = num + '亿'
+        } else if (num > 9999) {
+          let str = num.toString()
+          num = Math.floor(num / 10000)
+          if (parseInt(str.charAt(str.length - 4)) > 4) {
+            num = num + 1
+          }
+          num += '万'
+        } else {
+          if (type >= 7) {
+            num += '元'
+          } else if (type <= 2) {
+            num += '个'
+          } else {
+            num += ''
+          }
+        }
+        return num
+      },
+      formatDouble (num) {
+        if (num.toString().indexOf('E') !== -1) {
+          let arr = num.toString().split('E')
+          num = arr[0] * Math.pow(10, arr[1])
+        }
+        if (num > 99999999) {
+          num = (num / 100000000).toFixed(2).slice(num.length - 1, 4) + '亿'
+        } else if (num > 9999) {
+          num = (num / 10000).toFixed(2).slice(num.length - 1, 4) + '万'
+        } else {
+          num += ''
+        }
+        return num
+      }
+    },
+    computed: {
+      allCount () {
+        return this.$store.state.count.allCount.data
+      },
+      inquirySheet () {
+        let sheetNum = this.$store.state.count.inquirySheet.data.count
+        return this.formatDouble(sheetNum)
+      },
+      inquirySheetLast () {
+        let lastSheetNum = this.$store.state.count.inquirySheetLast.data.count
+        return this.formatDouble(lastSheetNum)
+      },
+      all () {
+        let count = this.$store.state.supplier.merchant.merchantAll.data
+        return count.content ? count.totalElements : '0'
+      },
+      counts () {
+        return this.$store.state.product.common.counts
+      },
+      list () {
+        let list = JSON.parse(JSON.stringify(this.$store.state.provider.stores.storeList.data))
+        console.log(list)
+        return list.totalElements
+      },
+      itemData () {
+        let str = []
+        if (this.counts.data) {
+          this.counts.data.forEach((value, key, $data) => {
+            str.push({id: $data[key].item, count: $data[key].count, type: 1})
+          })
+        }
+        str.push({id: '供应商', count: this.all ? this.all : 0, type: 3})
+        str.push({id: '本月询价单', count: this.$store.state.count.inquirySheet.data ? this.$store.state.count.inquirySheet.data.count : 0, type: 2})
+        str.push({id: '上月询价单', count: this.$store.state.count.inquirySheetLast.data ? this.$store.state.count.inquirySheetLast.data.count : 0, type: 2})
+        if (this.allCount) {
+          this.allCount.forEach((value, key, $data) => {
+            str.push({id: $data[key].item, count: $data[key].count, type: 1})
+          })
+        }
+        str.push({id: '店铺', count: this.list ? this.list : 0, type: 3})
+        str = [str[1], str[0], str[2], str[3], str[8], str[5], str[4], str[6], str[7]]
+        return str
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .statistics{
+    position:relative;
+    height: 1rem;
+    border-radius:.48rem;
+    background: #fff;
+    margin:0 .05rem .2rem;
+    overflow: hidden;
+    background: url('/images/mobile/@2x/home/countbg.png') no-repeat center;
+    background-size: auto 0.96rem;
+    ul{
+      width:50%;
+      position:relative;
+      transition: .5s all linear;
+      &:first-child{
+        margin-left: .0rem;
+      }
+      &:no_tran{
+        transition:none;
+      }
+      li{
+        width:100%;
+        text-align: center;
+        height:1rem;
+        line-height: 0.92rem;
+        font-size: .28rem;
+        font-weight: bold;
+        white-space: nowrap;
+        overflow: hidden;
+        vertical-align:top;
+        span{
+          &.number{
+            display: inline-block;
+            color:red;
+            font-size: 0.32rem;
+            height: .6rem;
+            vertical-align:middle;
+            line-height:.6rem;
+            font-weight: bold;
+            .name, .month{
+              color: #fff;
+              vertical-align:middle;
+            }
+            .month{
+              font-size: 0.22rem;
+            }
+            .unit, .num{
+              color: #feff00;
+              vertical-align:middle;
+            }
+            .num{
+              padding-left: .1rem;
+            }
+          }
+        }
+      }
+    }
+  }
 </style>

+ 4 - 154
components/mobile/store/StoreDetail.vue

@@ -138,30 +138,8 @@
                 <div v-if="item.reserve" style="display: inline-block;margin-left: 0.2rem"><span class="order-tag reserve-tag">库</span>{{item.reserve}}</div>
               </div>
             </div>
-            <!--<div class="list">-->
-              <!--<div class="fl">-->
-                <!--<div class="name">最小包装数:</div>-->
-                <!--<div class="text">{{item.minPackQty}}</div>-->
-              <!--</div>-->
-              <!--<div class="fr">-->
-                <!--<div class="name">库存:</div>-->
-                <!--<div class="text">{{item.reserve}}</div>-->
-              <!--</div>-->
-            <!--</div>-->
-
-            <!--<div class="list">-->
-              <!--<div class="fl">-->
-                <!--<div class="name">包装方式:</div>-->
-                <!--<div class="text">{{item.packaging || '无包装信息'}}</div>-->
-              <!--</div>-->
-              <!--<div class="fr">-->
-                <!--<div class="name">最小起订量:</div>-->
-                <!--<div class="text" style="color: #f31919">{{item.minBuyQty}}</div>-->
-              <!--</div>-->
-            <!--</div>-->
-
             <div class="list">
-              <div class="name left">价格梯度<p>(pcs):</p></div>
+              <div class="name left">价格梯度<p>(pcs):</p></div>
               <div class="table left">
                 <ul>
                   <li class="title">
@@ -180,62 +158,7 @@
           </div>
           </div>
       </div>
-      <!--<table v-if="commodities.content&&commodities.content.length > 0">-->
-        <!--<thead id="product-head" >-->
-          <!--<tr>-->
-            <!--<th style="width: 1.77rem;">型号/品牌</th>-->
-            <!--<th style="width: 1.75rem;">包装</th>-->
-            <!--<th style="width: 2.2rem;">价格梯度</th>-->
-            <!--<th style="width: 1.77rem;">交期(天)</th>-->
-          <!--</tr>-->
-        <!--</thead>-->
-        <!--<thead class="active" v-show="isScrollOverTab">-->
-          <!--<tr>-->
-            <!--<th style="width: 1.77rem;">型号/品牌</th>-->
-            <!--<th style="width: 1.75rem;">包装</th>-->
-            <!--<th style="width: 2.2rem;">价格梯度</th>-->
-            <!--<th style="width: 1.77rem;">交期(天)</th>-->
-          <!--</tr>-->
-        <!--</thead>-->
-        <!--<tbody id="product-body">-->
-        <!--<tr v-for="commodity in searchLists" @click="goProductDetail(commodity)">-->
-          <!--<td class="store-name">-->
-            <!--<div>{{commodity.code}}</div>-->
-            <!--<div>{{commodity.brandNameCn}}</div>-->
-          <!--</td>-->
-          <!--<td>-->
-            <!--<div v-if="!commodity.packaging && !commodity.breakUp && !commodity.produceDate">-</div>-->
-            <!--<div>{{commodity.packaging}}</div>-->
-            <!--<div>{{commodity.breakUp?'可拆卖':'不可拆卖'}}</div>-->
-            <!--<div>{{commodity.produceDate}}</div>-->
-          <!--</td>-->
-          <!--<td class="price-level-wrap">-->
-            <!--<div v-if="!commodity.prices || commodity.prices.length == 0">-</div>-->
-            <!--<div class="price-number fl">-->
-              <!--<div v-for="price in commodity.prices">{{price.start}}+</div>-->
-            <!--</div>-->
-            <!--<div class="price-number fr">-->
-              <!--<div v-for="price in commodity.prices" class="price-level">-->
-                <!--<span v-if="commodity.currencyName.indexOf('RMB')!==-1">¥{{price.rMBPrice | currency}}</span>-->
-                <!--<span v-if="commodity.currencyName.indexOf('USD')!==-1">${{price.uSDPrice | currency}}</span>-->
-              <!--</div>-->
-            <!--</div>-->
-          <!--</td>-->
-          <!--<td>-->
-            <!--<div v-if="commodity.b2cMinDelivery">-->
-              <!--<span>{{commodity.b2cMinDelivery}}</span>-->
-              <!--<span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>-->
-              <!--<span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">{{commodity.b2cMaxDelivery}}</span>-->
-            <!--</div>-->
-            <!--<div v-if="commodity.minBuyQty"><span class="order-tag">订</span>{{commodity.minBuyQty}}起订</div>-->
-            <!--<div v-if="commodity.reserve"><span class="order-tag reserve-tag">库</span>{{commodity.reserve}}</div>-->
-            <!--<div v-if="!commodity.b2cMinDelivery">-->
-              <!--<span>—</span>-->
-            <!--</div>-->
-          <!--</td>-->
-        <!--</tr>-->
-        <!--</tbody>-->
-      <!--</table>-->
+
       <empty-status :type="isSearch ? 'search' : 'collect'"
                     :text="isSearch ? `抱歉,暂无与“${remindKeyword}”匹配的产品信息`: '抱歉,暂无产品信息'"
                     :showLink="false"
@@ -570,81 +493,6 @@
         }
       }
     }
-    .providerList {
-      border-top: .31rem solid #f1f3f7;
-      .content {
-        padding: 0.24rem 0.24rem;
-        background: #fff;
-        .linetext {
-          margin-bottom: 0.24rem;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          white-space: nowrap;
-          &:nth-last-of-type(1){
-            margin-bottom: 0rem;
-          }
-        }
-        .fl {
-          float: left;
-          border-right: 1px dashed #e0e0e4;
-          width: 4.68rem;
-        }
-        .fr {
-          float: right;
-          margin: 0.18rem 0.24rem;
-          margin-right: 0rem;
-          font-size: 0.3rem;
-          &.addtop {
-            margin-top: 0.6rem;
-            .add {
-              background: #0067e7;
-              color: #fff;
-              &.noadd{
-                background: #cccbcb;
-                color: #fff;
-                border:1px solid #cccbcb;
-              }
-            }
-          }
-          div {
-            width: 2.1rem;
-            height: 0.6rem;
-            text-align: center;
-            line-height: 0.6rem;
-            border-radius: 3px;
-            &.look{
-              background: #0067e7;
-              color: #fff;
-            }
-            &.add{
-              background: #fff;
-              color: #0067e7;
-              border: 1px solid #0067e7;
-            }
-            &.delete{
-              background: #fff;
-              color: #f70415;
-              border: 1px solid #f70415;
-            }
-            &.noadd{
-              background: #cccbcb;
-              color: #fff;
-              border:1px solid #cccbcb;
-            }
-          }
-          div:nth-child(1){
-            margin-bottom: 0.26rem
-          }
-        }
-        &::after{
-          clear: both;
-          display: block;
-          content: ' ';
-          visibility: hidden;
-          zoom: 1;
-        }
-      }
-    }
     .middle {
       .order-tag {
         display: inline-block;
@@ -669,6 +517,7 @@
       background: #fff;
       margin: 0.24rem 0.24rem 0;
       border-radius: 5px;
+      border: 1px solid #e3e5e8;
       .pms {
         color: #f57710;
         border: 1px solid #f57710;
@@ -753,6 +602,7 @@
           width: 5rem;
           margin-bottom: 0;
           margin-top: 0;
+          margin-left: 0.1rem;
           li {
             height: 0.43rem;
             line-height: 0.43rem;

+ 6 - 1
nuxt.config.js

@@ -8,6 +8,8 @@ const commonUrl = process.env.COMMON_URL || (isProdMode ? 'https://api-inquiry.u
 const materialUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-product.usoftmall.com/' : 'http://218.17.158.219:24000/')
 // 公共cms
 const cmsUrl = process.env.CMS_URL || (isProdMode ? 'https://cms.usoftmall.com' : 'http://10.1.51.123:8080/jpress')
+// 消息
+const messageUrl = process.env.MATERIAL_URL || (isProdMode ? 'https://api-message.ubtob.com/' : 'http://192.168.253.6:24000/message')
 
 module.exports = {
   router: {
@@ -91,7 +93,8 @@ module.exports = {
     baseUrl,
     commonUrl,
     materialUrl,
-    cmsUrl
+    cmsUrl,
+    messageUrl
   },
   plugins: [
     {
@@ -183,6 +186,8 @@ module.exports = {
     '/vendor/**': baseUrl,
     '/internalmessage-service/**': baseUrl,
     '/wx/**': baseUrl,
+    '/messages**': messageUrl,
+    '/messages/**': messageUrl,
     '/cmsApi**': cmsUrl
   }
 }

+ 2 - 0
pages/index.vue

@@ -87,6 +87,7 @@
         store.dispatch('loadAllCount', {_status: 'actived', usedFor: 'mall_home_banner'}),
         store.dispatch('loadInquirySheet', {year: nowYear, month: nowMonth}),
         store.dispatch('loadInquirySheetLast', {year: nowYear, month: LastMonth}),
+        store.dispatch('provider/findStoreListInMobil', {page: 1, count: 10, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: ''}),
         store.dispatch('loadBatchCommodities', {batchCodeList: store.state.option.url === 'http://www.usoftmall.com' ? [
           'BT2018013000000043',
           'BT2018013000000026',
@@ -120,6 +121,7 @@
         store.dispatch('loadAllCount', {_status: 'actived', usedFor: 'mall_home_banner'}),
         store.dispatch('loadInquirySheet', {year: nowYear, month: nowMonth}),
         store.dispatch('loadInquirySheetLast', {year: nowYear, month: LastMonth}),
+        store.dispatch('provider/findStoreListInMobil', {page: 1, count: 10, type: 'ORIGINAL_FACTORY-DISTRIBUTION-AGENCY-CONSIGNMENT', keyword: ''}),
         store.dispatch('applyPurchase/loadMobileHomeList', {pageNumber: 1, pageSize: 5, enUU: store.state.option.user.data.enterprise ? store.state.option.user.data.enterprise.uu : null})
       ])
     },

+ 132 - 0
pages/mobile/center/user/collect/message.vue

@@ -0,0 +1,132 @@
+<template>
+  <div class="mobile-center">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>消息</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-content">
+      <div v-if="messageList.content && messageList.content.length" class="message-list" v-bind:key="item.id" v-for="item in messageList.content">
+        <div class="content">
+          <div class="new-dot">
+            <b v-if="item.isRead === 0"></b>
+            <img src="/images/mobile/center/user/message.png" alt="">
+          </div>
+          <div class="message">
+            <p>{{item.createTime | time}}</p>
+            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/vendor#/seekPurchase?type=1' : item.type === 'MALL公共询价' ? '/user#/seekPurchase' : item.type === '商城公共询价采纳结果' ? '/vendor#/vendorPurchaseOffer' : ''"
+               v-if="item.type"
+               :title="item.content" class="info" target="_blank">{{item.content}}</a>
+            <a v-else :title="item.content" class="noLink info">{{item.content}}</a>
+          </div>
+        </div>
+      </div>
+      <empty-status v-if="!messageList.content.length"  :showLink="true" :text="'抱歉,暂无消息'"></empty-status>
+    </div>
+    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobileNoHeader',
+    data () {
+      return {
+        count: 10,
+        page: 1
+      }
+    },
+    fetch ({ store }) {
+      let user = store.state.option.user.data
+      return Promise.all([
+        // 获取消息列表
+        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+      ])
+    },
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      },
+      messageList () {
+        return this.$store.state.messageShow.messageList.list.data
+      },
+      fetching () {
+        return this.messageList.fetching
+      },
+      allPage () {
+        return Math.floor(this.messageList.totalElements / this.messageList.size) + Math.floor(this.messageList.totalElements % this.messageList.size > 0 ? 1 : 0)
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    methods: {
+      reloadList: function () {
+        this.$store.dispatch('messageShow/getAllMessage', { receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, consumerApp: 'MALL', page: this.page, count: this.count, sorting: {'createTime': 'DESC'} })
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.reloadList()
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-content {
+    margin-top: .6rem !important;
+    padding: .2rem;
+    background: #f1f3f6;
+    .com-none-state {
+      padding-bottom: 100%;
+    }
+    .message-list {
+      background: #fff;
+      padding: 0 .15rem 0 .2rem;
+      .content {
+        padding: .14rem 0;
+        overflow: hidden;
+        border-bottom: 1px solid #d3d3d3;
+        .new-dot {
+          position: relative;
+          b{
+            position: absolute;
+            left: .2rem;
+            top: .25rem;
+            width: .16rem;
+            height: .16rem;
+            border-radius: 50%;
+            background: #fc0405;
+          }
+        }
+        img{
+          margin: .3rem 0 0 .12rem;
+          float: left;
+          width: .8rem;
+          height: .8rem;
+        }
+        .message{
+          margin-left: .24rem;
+          float: left;
+          width: 5.4rem;
+          p{
+            display: inherit;
+            margin-bottom: .1rem;
+            text-align: right;
+            font-size: .24rem;
+            color: #666;
+          }
+          a.info{
+            font-size: .28rem;
+            color: #333;
+          }
+        }
+      }
+    }
+  }
+  .message-list:last-child .content{
+     border-bottom: none;
+   }
+</style>

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

@@ -37,6 +37,11 @@
           <span>店铺关注<span class="text">({{storeCount.data || 0}})</span></span>
           <i class="iconfont icon-xiangyou"></i>
         </nuxt-link>
+        <nuxt-link tag="div" to="/mobile/center/user/collect/message" class="content-line">
+          <img src="/images/mobile/center/user/message.png" alt="">
+          <span>消息<span class="text">({{messageCount.count || 0}})</span></span>
+          <i class="iconfont icon-xiangyou"></i>
+        </nuxt-link>
       </div>
     </div>
     <publish-seek :showSayPriceBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="onRemind"></publish-seek>
@@ -57,9 +62,11 @@
       }
     },
     fetch ({store}) {
+      let user = store.state.option.user.data
       return Promise.all([
         store.dispatch('product/loadCompCollectInfo'),
-        store.dispatch('shop/loadStoreCollectInfo')
+        store.dispatch('shop/loadStoreCollectInfo'),
+        store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0})
       ])
     },
     components: {
@@ -72,6 +79,10 @@
       },
       storeCount () {
         return this.$store.state.shop.storeInfo.collectCount.data
+      },
+      messageCount () {
+        // console.log(this.$store.state.messageShow.messageCount.count.data)
+        return this.$store.state.messageShow.messageCount.count.data
       }
     },
     methods: {

+ 13 - 1
pages/mobile/center/vendor/index.vue

@@ -46,6 +46,13 @@
           <i class="iconfont icon-xiangyou"></i>
         </div>
       </div>
+      <nuxt-link tag="div" to="/mobile/center/vendor/message" class="block-wrap collect-block">
+        <div class="content-line">
+          <img src="/images/mobile/center/user/message.png" alt="">
+          <span>消息<span class="text">({{messageCount.count || 0}})</span></span>
+          <i class="iconfont icon-xiangyou"></i>
+        </div>
+      </nuxt-link>
     </div>
     <remind-box :title="remindText" :timeoutCount="timeoutCount"></remind-box>
   </div>
@@ -62,8 +69,10 @@
       }
     },
     fetch ({ store }) {
+      let user = store.state.option.user.data
       return Promise.all([
-        store.dispatch('loadStoreStatus', { op: 'check' })
+        store.dispatch('loadStoreStatus', { op: 'check' }),
+        store.dispatch('messageShow/loadMessageCount', {receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', isRead: 0})
       ])
     },
     components: {
@@ -72,6 +81,9 @@
     computed: {
       storeInfo () {
         return this.$store.state.option.storeStatus.data
+      },
+      messageCount () {
+        return this.$store.state.messageShow.messageCount.count.data
       }
     },
     methods: {

+ 132 - 0
pages/mobile/center/vendor/message.vue

@@ -0,0 +1,132 @@
+<template>
+  <div class="mobile-center">
+    <div class="com-mobile-header mobile-center-header">
+      <a @click="goLastPage"><i class="iconfont icon-fanhui"></i></a>
+      <p>消息</p>
+      <p class="en-name"><img :src="`/images/mobile/center/${user.data.enterprise.uu ? 'en' : 'self'}.png`" alt="">{{currentEnName}}</p>
+    </div>
+    <div class="mobile-content">
+      <div v-if="messageList.content && messageList.content.length" class="message-list" v-bind:key="item.id" v-for="item in messageList.content">
+        <div class="content">
+          <div class="new-dot">
+            <b v-if="item.isRead === 0"></b>
+            <img src="/images/mobile/center/user/message.png" alt="">
+          </div>
+          <div class="message">
+            <p>{{item.createTime | time}}</p>
+            <a :href="item.type === 'MALL跳转卖家待报价页面' ? '/vendor#/seekPurchase?type=1' : item.type === 'MALL公共询价' ? '/user#/seekPurchase' : item.type === '商城公共询价采纳结果' ? '/vendor#/vendorPurchaseOffer' : ''"
+               v-if="item.type"
+               :title="item.content" class="info" target="_blank">{{item.content}}</a>
+            <a v-else :title="item.content" class="noLink info">{{item.content}}</a>
+          </div>
+        </div>
+      </div>
+      <empty-status v-if="!messageList.content.length"  :showLink="true" :text="'抱歉,暂无消息'"></empty-status>
+    </div>
+    <pull-up :searchMore="fetching" :allPage="allPage" :page="page" @pullUpAction="onPullUpAction"></pull-up>
+  </div>
+</template>
+<script>
+  import { RemindBox, PullUp, EmptyStatus } from '~components/mobile/common'
+  export default {
+    middleware: 'authenticated',
+    layout: 'mobileNoHeader',
+    data () {
+      return {
+        count: 10,
+        page: 1
+      }
+    },
+    fetch ({ store }) {
+      let user = store.state.option.user.data
+      return Promise.all([
+        // 获取消息列表
+        store.dispatch('messageShow/getAllMessage', { receiverUu: user.userUU, receiverEnuu: user.enterprise.uu, consumerApp: 'MALL', count: 10, page: 1, sorting: {'createTime': 'DESC'} })
+      ])
+    },
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      },
+      messageList () {
+        return this.$store.state.messageShow.messageList.list.data
+      },
+      fetching () {
+        return this.messageList.fetching
+      },
+      allPage () {
+        return Math.floor(this.messageList.totalElements / this.messageList.size) + Math.floor(this.messageList.totalElements % this.messageList.size > 0 ? 1 : 0)
+      }
+    },
+    components: {
+      RemindBox,
+      PullUp,
+      EmptyStatus
+    },
+    methods: {
+      reloadList: function () {
+        this.$store.dispatch('messageShow/getAllMessage', { receiverUu: this.user.data.userUU, receiverEnuu: this.user.data.enterprise.uu, consumerApp: 'MALL', page: this.page, count: this.count, sorting: {'createTime': 'DESC'} })
+      },
+      onPullUpAction: function () {
+        this.page++
+        this.reloadList()
+      }
+    }
+  }
+</script>
+<style lang="scss" scoped>
+  .mobile-content {
+    margin-top: .6rem !important;
+    padding: .2rem;
+    background: #f1f3f6;
+    .com-none-state {
+      padding-bottom: 100%;
+    }
+    .message-list {
+      background: #fff;
+      padding: 0 .15rem 0 .2rem;
+      .content {
+        padding: .14rem 0;
+        overflow: hidden;
+        border-bottom: 1px solid #d3d3d3;
+        .new-dot {
+          position: relative;
+          b{
+            position: absolute;
+            left: .2rem;
+            top: .25rem;
+            width: .16rem;
+            height: .16rem;
+            border-radius: 50%;
+            background: #fc0405;
+          }
+        }
+        img{
+          margin: .3rem 0 0 .12rem;
+          float: left;
+          width: .8rem;
+          height: .8rem;
+        }
+        .message{
+          margin-left: .24rem;
+          float: left;
+          width: 5.4rem;
+          p{
+            display: inherit;
+            margin-bottom: .1rem;
+            text-align: right;
+            font-size: .24rem;
+            color: #666;
+          }
+          a.info{
+            font-size: .28rem;
+            color: #333;
+          }
+        }
+      }
+    }
+  }
+  .message-list:last-child .content{
+     border-bottom: none;
+   }
+</style>

+ 4 - 2
pages/mobile/center/vendor/product.vue

@@ -1050,7 +1050,7 @@
       text-align: center;
     }
     .list {
-      height: 0.46rem;
+      /*height: 0.46rem;*/
       .left {
         float: left;
         overflow: hidden;
@@ -1062,7 +1062,7 @@
         font-size: 0.3rem;
       }
       .button {
-        font-size: 0.28rem;
+        font-size: 0.26rem;
         color: #1a58dd;
         width: 0.92rem;
         text-align: center;
@@ -1070,6 +1070,8 @@
         border:1px solid #1a58dd;
         display: inline-block;
         margin-right: 0.2rem;
+        line-height: 0.4rem;
+        height: 0.4rem;
       }
       margin-bottom: 0.18rem;
       &::after{

+ 311 - 218
pages/mobile/product/_batchCode.vue

@@ -1,44 +1,88 @@
 <template>
   <div class="mobile-content commodity-detail">
     <div class="logo-wrap">
+      <div class="wrap-title"><span class="line"></span>图片信息</div>
       <img :src="commodity.img || '/images/store/common/default.png'" alt="">
     </div>
-    <div class="content-wrap">
-      <div class="content-line cl-title">
-        <span class="code text-ellipse inline-block">{{commodity.code}}</span>
-        <div class="focus-wrap inline-block" :class="{'active': isFocus}">
-          <i class="iconfont icon-shoucang" @click="collectStore"></i>
-          <span>店铺关注</span>
-        </div>
+    <div class="product-info">
+      <div class="wrap-title"><span class="line"></span>产品信息</div>
+      <div class="focus-wrap inline-block" :class="{'active': isFocus}">
+        <i class="iconfont icon-shoucang" @click="collectStore"></i>
+        <div>店铺<br />关注</div>
       </div>
-      <div class="content-line cl-price1">
-        <div class="fl">
-          <p class="price-tag">价格:</p>
-          <span>数量:</span>
+      <div class="middle">
+        <div class="list">
+          <div class="fl">
+            <div class="name">品牌:</div>
+            <div class="text">{{commodity.brandNameEn}}</div>
+          </div>
         </div>
-        <ul>
-          <li class="text-ellipse inline-block price-level" v-for="price in priceLevel1">
-            <p><span>{{isRMB ? '¥' : '$'}}</span>
-              {{isRMB ? price.rMBPrice : price.uSDPrice}}
-            </p>
-            <span>{{price.start}}+</span>
-          </li>
-        </ul>
-        <i :class="`iconfont icon-arrow-${isMore ? 'up' : 'down'}`" @click="isMore = !isMore" v-if="priceLevel2.length"></i>
-      </div>
-      <div class="content-line cl-price2" v-if="priceLevel2.length && isMore">
-        <ul>
-          <li class="text-ellipse inline-block price-level" v-for="price in priceLevel2">
-            <p><span>$</span>159.00</p>
-            <span>1+</span>
-          </li>
-        </ul>
+        <div class="list">
+          <div class="fl">
+            <div class="name">类目(产品名称):</div>
+            <div class="text">{{commodity.kindNameCn || '-'}}</div>
+          </div>
+        </div>
+        <div class="list">
+          <div class="name">规格:</div>
+          <div class="text">{{commodity.spec || '-'}}</div>
+        </div>
+        <div class="list">
+          <div class="name">包装方式:</div>
+          <div class="text">{{commodity.packaging || '无包装信息'}}</div>
+        </div>
+        <div class="list">
+          <div class="name">最小包装数:</div>
+          <div class="text">{{commodity.minPackQty}}</div>
+        </div>
+
+        <div class="list">
+          <div class="com-info">
+            <span class="name">库存</span>:<span v-text="commodity.reserve || 0"></span><em style="margin-left: 3px;">PCS</em>
+            (<span v-text="commodity.minBuyQty || 1"></span>个起订)
+            <span class="can-div-sell" v-if="commodity.breakUp">可拆卖</span>
+          </div>
+        </div>
+
+        <div class="list">
+          <div class="name">交期(天):</div>
+          <div class="text red" v-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery != commodity.b2cMinDelivery)" v-text="commodity.b2cMinDelivery + '-'+ commodity.b2cMaxDelivery"></div>
+          <div class="text rd" v-if="commodity.b2cMaxDelivery && (commodity.b2cMaxDelivery == commodity.b2cMinDelivery)" v-text="commodity.b2cMinDelivery"></div>
+        </div>
+
+        <!--<div class="list">-->
+          <!--<div class="name">最小起订量:</div>-->
+          <!--<div class="text" style="color: #f31919">{{commodity.minBuyQty}}</div>-->
+        <!--</div>-->
+
+        <!--<div class="list">-->
+          <!--<div class="name">生产日期:</div>-->
+          <!--<div class="text" :title="item.produceDate">{{commodity.produceDate || '-'}}</div>-->
+        <!--</div>-->
+
+        <div class="list">
+          <div class="name left">价格梯度:</div>
+          <div class="table left">
+            <ul>
+              <li class="title">
+                <div>分段数量/PCS</div>
+                <div>分段单价</div>
+              </li>
+              <li v-for="price in commodity.prices">
+                <div>{{price.start}}+</div>
+                <div v-if="commodity.currencyName == 'RMB'">¥{{price.rMBPrice}}</div>
+                <div v-else>${{price.rMBPrice}}</div>
+              </li>
+            </ul>
+          </div>
+        </div>
+
       </div>
       <div class="content-line link cl-price2">
-        <ul>
+        <ul class="clearfix">
           <nuxt-link :to="`/mobile/shop/${storeInfo.uuid}`" tag="li" class="text-ellipse inline-block price-level">
-            <i class="iconfont icon-shouye-copy"></i>
-            <p>店铺</p>
+            <i class="iconfont icon-dianpu"></i>
+            <p style="margin-left:0.25rem;">店铺</p>
           </nuxt-link>
           <li class="text-ellipse inline-block price-level" @click="showStoreInfo = true">
             <i class="iconfont icon-kefu1"></i>
@@ -51,43 +95,11 @@
         </ul>
       </div>
     </div>
-    <div class="item-wrap">
-      <p>产品信息</p>
-      <div class="com-info">
-        <span class="name">品牌</span>:<span v-text="commodity.brandNameEn"></span>
-      </div>
-      <div class="com-info">
-        <span class="name no-letter">类目(产品名称)</span>:<span v-text="commodity.kindNameCn || '无类目信息'"></span>
-      </div>
-      <div class="com-info">
-        <span class="name">规格</span>:<span v-text="commodity.spec || '无规格信息'"></span>
-      </div>
-      <div class="com-info">
-        <span class="name">包装</span>:<span v-text="commodity.packaging || '无包装信息'"></span>
-      </div>
-      <div class="com-info">
-        <span class="name">最小包装数</span>:<span v-text="commodity.minPackQty || '无最小包装数信息'"></span>
-      </div>
-      <div class="com-info">
-        <span class="name">库存</span>:<span v-text="commodity.reserve || 0"></span><em style="margin-left: 3px;">PCS</em>
-        (<span v-text="commodity.minBuyQty || 1"></span>个起订)
-        <span class="can-div-sell" v-if="commodity.breakUp">可拆卖</span>
-      </div>
-      <div class="com-info">
-        <span class="name">交期</span>:
-        <div class="delivery inline-block">
-          <span v-text="commodity.b2cMinDelivery || 0"></span>
-          <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery">-</span>
-          <span v-if="commodity.b2cMaxDelivery && commodity.b2cMaxDelivery !== commodity.b2cMinDelivery" v-text="commodity.b2cMaxDelivery || 0"></span>
-          <span>(天)</span>
-        </div>
-      </div>
-    </div>
     <div class="params-wrap">
-      <p>产品参数</p>
+      <div class="wrap-title"><span class="line"></span>产品参数</div>
       <ul v-if="component.properties && component.properties.length">
         <li v-for="prop in component.properties" v-if="prop.property">
-          <span class="inline-block text-ellipse" v-text="prop.property.labelCn"></span>
+          <span class="inline-block text-ellipse"> {{prop.property.labelCn}}:</span>
           <span class="inline-block text-ellipse" v-text="prop.value || '—'"></span>
         </li>
       </ul>
@@ -140,6 +152,7 @@
     },
     computed: {
       commodity () {
+        console.log(this.$store.state.shop.storeInfo.commodity.data)
         return this.$store.state.shop.storeInfo.commodity.data
       },
       isRMB () {
@@ -215,210 +228,290 @@
 </script>
 <style lang="scss" scoped>
   .commodity-detail {
-    .logo-wrap {
-      height: 5.18rem;
-      line-height: 5.18rem;
-      background: #fff;
-      text-align: center;
-      img {
-       /* border: .01rem solid #ccc;*/
-        max-width: 4.06rem;
-        max-height: 3.27rem;
+    background: #f1f3f6;
+    .wrap-title {
+      color: #333;
+      font-size: 0.28rem;
+      border-bottom: 1px solid #d3d3d3;
+      height: 0.5rem;
+      text-align: left;
+      padding: 0 0 0.1rem 0.05rem;
+      margin: 0.17rem 0.25rem 0.13rem 0.25rem;
+      line-height: 0.5rem;
+      .line{
+        width: 0.05rem;
+        background: #3f84f6;
+        display: inline-block;
+        vertical-align: top;
+        margin-right: 0.08rem;
+        height: 0.28rem;
+        margin-top: 0.09rem;
       }
     }
-    .content-wrap {
-      -webkit-box-shadow: 0 -2px 7px 0 rgba(143, 141, 141, 0.25);
-      -moz-box-shadow: 0 -2px 7px 0 rgba(143, 141, 141, 0.25);
-      box-shadow: 0 -2px 7px 0 rgba(143, 141, 141, 0.25);
-      border-bottom: .1rem solid #f4f4f4;
-      .content-line {
-        height: 1.04rem;
-        border-bottom: .01rem solid #d9d9d9;
-        &.cl-title {
-          padding: .14rem 0 .14rem .2rem;
-          .code {
-            font-size: .3rem;
-            font-weight: bold;
-            width: 6.22rem;
-            padding-right: .3rem;
-            border-right: .01rem solid #e1e1e1;
-            line-height: .76rem;
+    .product-info {
+      position: relative;
+      background: #fff;
+      margin: 0.2rem;
+      border: 1px solid #e3e5e8;
+      padding-bottom: 0.2rem;
+      .focus-wrap {
+        text-align: center;
+        position: absolute;
+        background-image: url('/images/mobile/product/productdetail_label.png');
+        width: 0.93rem;
+        height: 1.27rem;
+        background-size: 100% 100%;
+        font-size: 0.24rem;
+        color: #666;
+        right: 0px;
+        top: 0px;
+        i {
+          color: #cacaca;
+        }
+        &.active {
+          i {color: rgb(255, 120, 0);}
+        }
+      }
+      .middle {
+        border-radius: 5px;
+        padding: 0.24rem 0.24rem 0px;
+        background: #fff;
+        .pms {
+          color: #f57710;
+          border: 1px solid #f57710;
+          border-radius: 0.4rem;
+          background: #fff;
+          font-size: 0.24rem;
+          height: 0.4rem;
+          line-height: 0.4rem;
+          width: 0.8rem;
+          text-align: center;
+        }
+        .list {
+          overflow: hidden;
+          text-overflow: ellipsis;
+          white-space: nowrap;
+          .left {
+            float: left;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
           }
-          .focus-wrap {
-            width: .9rem;
+          .textinfo {
+            color: #0067e7;
+            font-size: 0.28rem;
+          }
+          .button {
+            font-size: 0.28rem;
+            color: #1a58dd;
+            width: 0.92rem;
             text-align: center;
-            margin-left: .15rem;
-            i {
-              font-size: .4rem;
-              display: block;
-              color: #dddddd;
-            }
-            span {
-              font-size: .2rem;
-            }
-            &.active {
-              i {
-                color: #ff7803;
-              }
-            }
+            border-radius: 5px;
+            border:1px solid #1a58dd;
+            display: inline-block;
+            margin-right: 0.2rem;
           }
-        }
-        .price-level {
-          text-align: center;
-          font-size: .24rem;
-          border-right: .01rem solid #b0b0b0;
-          &:last-child {
-            border-right: none;
+          margin-bottom: 0.18rem;
+          &::after{
+            clear: both;
+            display: block;
+            content: ' ';
+            visibility: hidden;
+            zoom: 1;
           }
-          p {
-            font-size: .38rem;
-            color: #f42d29;
+          .fl {
+            width: 3.8rem;
+            float: left;
             overflow: hidden;
             text-overflow: ellipsis;
             white-space: nowrap;
-            max-width: 1.88rem;
-            margin: 0 auto;
-            span {
-              font-size: .22rem;
-            }
           }
-        }
-        &.cl-price1 {
-          padding: .1rem .18rem 0;
-          .fl {
-            font-size: .24rem;
-            text-align: center;
-            margin-top: .08rem;
-            .price-tag {
-              width: .69rem;
-              height: .34rem;
-              line-height: .34rem;
-              text-align: center;
-              background: #f42d29;
-              border-radius: .1rem;
-              color: #fff;
-              margin: .02rem 0 .06rem;
+          .fr {
+            text-align: left;
+            width: 2rem;
+            overflow: hidden;
+            text-overflow: ellipsis;
+            white-space: nowrap;
+          }
+          &.list-long {
+            .fl {
+              width: 100% !important;
             }
           }
-          ul {
+          .name {
+            color: #666;
+            font-size: 0.3rem;
             display: inline-block;
-            li {
-              width: 1.96rem;
-            }
           }
-          i {
-            font-size: .32rem;
+          .text {
+            display: inline-block;
+            color: #333;
+            font-size: 0.28rem;
+            &.red {
+              color: #e6353d;
+            }
           }
-        }
-        &.cl-price2 {
-          padding-top: .1rem;
-          ul {
-            text-align: center;
+          .table {
+            width: 4.93rem;
+            margin-bottom: 0;
+            margin-top: 0;
             li {
-              width: 2.83rem;
+              height: 0.43rem;
+              line-height: 0.43rem;
+              border-left: .01rem solid #c5c5c5;
+              font-size: .28rem;
+              &::after {
+                clear: both;
+                display: block;
+                content: ' ';
+                visibility: hidden;
+                zoom: 1;
+              }
+              div {
+                text-align: center;
+                width: 50%;
+                float: left;
+                border-right: .01rem solid #c5c5c5;
+                border-bottom: .01rem solid #c5c5c5;
+              }
+              &:nth-child(odd) {
+                background: #ddd;
+                color: #666;
+                font-size: 0.28rem;
+              }
+              &:nth-child(even) {
+                background: #fcfcfc;
+                color: #666;
+                font-size: 0.28rem;
+              }
+              &:nth-last-of-type(1){
+                color: #f31919;
+              }
+              &.title {
+                font-size: 0.28rem;
+                color: #333;
+              }
             }
           }
         }
-        &.link {
-          padding-top: .18rem;
-          ul {
-            li {
-              width: 33%;
+      }
+      .com-info {
+        line-height: .5rem;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        font-size:0.28rem;
+        .name {
+          color: #666;
+        }
+        .can-div-sell {
+          font-size: 0.18rem;
+          margin-left: 0.1rem;
+          display: inline-block;
+          height: .3rem;
+          line-height: .3rem;
+          width: .7rem;
+          text-align: center;
+          background: #3f84f6;
+          color: #fff;
+          font-weight: bold;
+          border-radius: 3px;
+        }
+      }
+      .content-line {
+        border-radius: 5px;
+        ul {
+          li {
+            width: 2rem;
+            height:0.54rem;
+            line-height: 0.54rem;
+            float: left;
+            margin-right: 0.25rem;
+            font-size: 0.28rem;
+            color: #fff;
+            border-radius: 0.08rem;
+            i {
+              display: inline-block;
+              margin-right: 0.1rem;
+              margin-left: 0.1rem;
               &.active {
-                i {
-                  color: #d81e06;
-                }
+                color: #eb062b;
               }
             }
-            i {
-              font-size: .39rem;
-              &.icon-kefu1 {
-                font-size: .44rem;
-                position: relative;
-                top: -.05rem;
-                color: #ff6000;
-                & + p {
-                  margin-top: -.07rem;
-                }
-              }
-              &.icon-shouye-copy {
-                color: #3f84f6;
-              }
+            &:nth-last-of-type(1) {
+              margin-right: 0;
+              background: #fff;
+              color: #3f84f6;
+              border: 1px solid #3f84f6;
+            }
+            &:nth-child(1) {
+              background: #3f84f6;
+              border: 1px solid #3f84f6;
+              margin-left: 0.2rem;
+            }
+            &:nth-child(2) {
+              background: #ff6000;
+              border: 1px solid #ff6000;
             }
             p {
-              font-size: .2rem;
-              color: #333;
+              display: inline-block;
+              text-align: center;
+              line-height: 0.5rem;
+              vertical-align: top;
             }
           }
         }
       }
     }
+    .logo-wrap {
+      height: 5.18rem;
+      background: #fff;
+      text-align: center;
+      margin: 0.2rem;
+      border: 1px solid #e3e5e8;
+      img {
+       /* border: .01rem solid #ccc;*/
+        max-width: 4.06rem;
+        max-height: 3.27rem;
+        margin-top: 0.4rem;
+      }
+    }
     .params-wrap {
+      border: 1px solid #e3e5e8;
+      border-radius: 5px;
+      margin: 0.2rem;
       background: #fff;
-      padding: .29rem .23rem;
+      padding: 0 0 .29rem;
       p {
         font-size: .26rem;
         text-align: center;
         margin-bottom: .24rem;
       }
       ul {
-        border-left: .01rem solid #d9d9d9;
-        border-top: .01rem solid #d9d9d9;
         background: #fff;
-        font-size: .24rem;
+        font-size: .28rem;
+        padding: 0 0.24rem;
         li {
-          border-bottom: .01rem solid #d9d9d9;
+          /*border-bottom: .01rem solid #d9d9d9;*/
           span {
-            border-right: .01rem solid #d9d9d9;
+            /*border-right: .01rem solid #d9d9d9;*/
             height: .67rem;
             line-height: .67rem;
             text-align: center;
-            padding: 0 .15rem;
+            /*padding: 0 .15rem;*/
             &:first-child {
-              width: 50%;
+              /*width: 50%;*/
+              color: #666;
             }
             &:last-child {
-              width: 50%;
-              text-align: left;
+              color: #333;
+              /*width: 50%;*/
+              /*text-align: left;*/
             }
           }
         }
       }
     }
-    .item-wrap {
-      padding: .3rem 0;
-      border-bottom: .1rem solid #f4f4f4;
-      p {
-        font-size: .26rem;
-        text-align: center;
-        margin-bottom: .24rem;
-        font-weight: bold;
-      }
-      .com-info {
-        padding-left: .5rem;
-        padding-right: .2rem;
-        line-height: .5rem;
-        overflow: hidden;
-        text-overflow: ellipsis;
-        white-space: nowrap;
-        .name {
-          color: #666;
-        }
-        .can-div-sell {
-          font-size: 0.18rem;
-          margin-left: 0.1rem;
-          display: inline-block;
-          height: .3rem;
-          line-height: .3rem;
-          width: .7rem;
-          text-align: center;
-          background: #3f84f6;
-          color: #fff;
-          font-weight: bold;
-          border-radius: 3px;
-        }
-      }
-    }
   }
   .com-none-state {
     padding: .2rem 0;

+ 16 - 2
pages/mobile/shop/index.vue

@@ -22,10 +22,21 @@
               <img :src="item.logoUrl || '/images/component/default.png'">
             </div>
             <div class="list-item-phone">
-              <p>电话:<span>{{item.enterprise.enTel}}</span></p>
+              <!--<div v-if="store.enterprise.enPhone"> <a :href="'tel:' + store.enterprise.enPhone" @click="clickPhone = true" :class="{'click-phone': clickPhone}">{{store.enterprise.enPhone}}</a></div>-->
+              <!--<div v-else><span>-</span></div>-->
+              <!--<p>电话:<span>{{item.enterprise.enTel || '-'}}</span></p>-->
+              <p v-if="item.enterprise.enTel" @click.stop="">
+                电话:<a :href="'tel:' + item.enterprise.enTel" >{{item.enterprise.enTel}}</a>
+              </p>
+              <p v-else>电话:<span>-</span></p>
+              <!--<p>手机:<span>{{item.enterprise.enPhone || '-'}}</span></p>-->
+              <p v-if="item.enterprise.enPhone" @click.stop="">
+                手机:<a :href="'tel:' + item.enterprise.enPhone" >{{item.enterprise.enPhone}}</a>
+              </p>
+              <p v-else>手机:<span>-</span></p>
               <p>传真:<span>{{item.enterprise.enFax}}</span></p>
               <!--<p>商家介绍: <nuxt-link :to="'/mobile/merchantDescription/'+item.uuid">点击查看</nuxt-link></p>-->
-              <p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>
+              <!--<p>联系商家:<a @click="selectStoreInfo(item, $event)">点击查看</a></p>-->
               <i class="iconfont icon-shoucang" :style="item.isFocus=='true'?'color:#ff7800':'color:#bbb'" @click="focusStore(item, $event)"></i>
             </div>
           </div>
@@ -288,6 +299,9 @@
       border-bottom: .1rem solid #e2e4e6;
      /* padding-bottom:.1rem;*/
       box-shadow: 0 .03rem .01rem 0 #cdcbcb96;
+      .click-phone{
+        color: #f44336;
+      }
       h3{
         font-size: .32rem;
         line-height: .4rem;

+ 16 - 5
pages/mobile/wechat/index.vue

@@ -16,7 +16,7 @@
         <li class="telphone">
           <input placeholder="请输入手机号" type="tel" maxlength="11" @blur="telphoneBlur" v-model="telphoneNum"/>
         </li>
-        <li class="info">
+        <li class="wechat-view-info">
           <div v-show="telerror">
             请输入正确的手机号码
           </div>
@@ -80,9 +80,16 @@
        }
     },
     mounted() {
+      let info = localStorage.getItem('USOFTMALLWECHATINFO')
+      localStorage.setItem('RETURNURL', this.$route.query.url || '')
+      if (!info && !this.$route.query.code) {
+        window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxb3274b676737a319&redirect_uri=https://www.usoftmall.com/mobile/wechat&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
+      } else if (info) {
+        this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
+      } else {
+        this.$store.dispatch('GerWechatInfo', {code: this.$route.query.code})
+      }
       this.$nextTick(() => {
-      // let info = localStorage.getItem('USOFTMALLWECHATINFO')
-      // this.$store.commit('option/REQUEST_WECHATINFO_STATUS_SUCCESS', JSON.parse(info))
         if (this.BScroll) {
           this.BScroll.refresh()
         } else {
@@ -98,7 +105,11 @@
         userAccount.spaceUU = item.uu
         this.$http.get('/newLogin/other', {params: userAccount}).then(res => {
           this.$store.dispatch('loadUserInfo').then(() => {
-             if (this.$route.query.url && this.$route.query.url !== '') {
+             let _url = localStorage.getItem('RETURNURL')
+             if (_url !== '') {
+               localStorage.removeItem('RETURNURL')
+               this.$router.replace(_url)
+             } else if (this.$route.query.url && this.$route.query.url !== '') {
                 this.$router.replace(this.$route.query.url)
              } else {
                this.goLastPage()
@@ -225,7 +236,7 @@
     ul li {
       padding-bottom: 0.1rem;
       min-height: 0.4rem;
-      &.info {
+      &.wechat-view-info {
         color: #3872f4;
         font-size: 0.24rem;
         margin-left: 0.64rem;

+ 2 - 0
plugins/axios.js

@@ -21,6 +21,8 @@ service.interceptors.request.use(config => {
       config.url = process.env.materialUrl + config.url
     } else if (config.url.indexOf('/cmsApi') === 0) {
       config.url = process.env.cmsUrl + config.url
+    } else if (config.url.indexOf('/messages') === 0) {
+      config.url = process.env.messageUrl + config.url
     } else {
       config.url = process.env.baseUrl + config.url
     }

+ 18 - 0
plugins/mixin.js

@@ -75,5 +75,23 @@ Vue.mixin({
         this.initSctoll.refresh()
       }
     }
+  },
+  filters: {
+    time: function (time) {
+      if (typeof time === 'number') {
+        if (!time) {
+          return '无'
+        } else {
+          let d = new Date(time)
+          let year = d.getFullYear()
+          let month = d.getMonth() + 1
+          let day = d.getDate() < 10 ? '0' + d.getDate() : '' + d.getDate()
+          let hour = d.getHours() < 10 ? '0' + d.getHours() : '' + d.getHours()
+          let minutes = d.getMinutes() < 10 ? '0' + d.getMinutes() : '' + d.getMinutes()
+          let seconds = d.getSeconds() < 10 ? '0' + d.getSeconds() : '' + d.getSeconds()
+          return year + '-' + month + '-' + day + ' ' + hour + ':' + minutes + ':' + seconds
+        }
+      }
+    }
   }
 })

BIN
static/images/all/home-apply.jpg


BIN
static/images/applyPurchase/rank-title1.png


BIN
static/images/mobile/@2x/home/countbg.png


BIN
static/images/mobile/@2x/productDetail/desc-bg2.jpg


BIN
static/images/mobile/center/user/message.png


BIN
static/images/mobile/center/user/msgBell.png


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


+ 24 - 0
store/messageShow.js

@@ -0,0 +1,24 @@
+import axios from '~plugins/axios'
+
+export const actions = {
+  // 获取未读消息数量
+  loadMessageCount({ commit }, params = {}) {
+    commit('messageCount/REQUEST_MESSAGE_COUNT')
+    return axios.get('/messages/count', {params})
+      .then(response => {
+        commit('messageCount/REQUEST_MESSAGE_COUNT_SUCCESS', response.data)
+      }, err => {
+        commit('messageCount/REQUEST_MESSAGE_COUNT_FAILURE', err)
+      })
+  },
+  // 获取全部消息
+  getAllMessage({ commit }, params = {}) {
+    commit('messageList/REQUEST_MESSAGE_LIST')
+    return axios.get('/messages', {params})
+      .then(response => {
+        commit('messageList/GET_MESSAGE_LIST_SUCCESS', response.data)
+      }, err => {
+        commit('messageList/GET_MESSAGE_LIST_FAILURE', err)
+      })
+  }
+}

+ 22 - 0
store/messageShow/messageCount.js

@@ -0,0 +1,22 @@
+/**
+ * 未读消息数量展示
+ */
+export const state = () => ({
+  count: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_MESSAGE_COUNT (state) {
+    state.count.fetching = true
+  },
+  REQUEST_MESSAGE_COUNT_FAILURE (state) {
+    state.count.fetching = false
+  },
+  REQUEST_MESSAGE_COUNT_SUCCESS (state, result = []) {
+    state.count.fetching = false
+    state.count.data = result
+  }
+}

+ 22 - 0
store/messageShow/messageList.js

@@ -0,0 +1,22 @@
+/**
+ * 未读消息数量展示
+ */
+export const state = () => ({
+  list: {
+    fetching: false,
+    data: []
+  }
+})
+
+export const mutations = {
+  REQUEST_MESSAGE_LIST (state) {
+    state.list.fetching = true
+  },
+  GET_MESSAGE_LIST_FAILURE (state) {
+    state.list.fetching = false
+  },
+  GET_MESSAGE_LIST_SUCCESS (state, result = []) {
+    state.list.fetching = false
+    state.list.data = result
+  }
+}

+ 16 - 0
utils/baseUtils.js

@@ -211,3 +211,19 @@ export const deepCopy = function (target) {
   }
   return newObj
 }
+
+export function whichTransitionEvent() {
+  var t
+  var el = document.createElement('fakeelement')
+  var transitions = {
+    transition: 'transitionend',
+    OTransition: 'oTransitionEnd',
+    MozTransition: 'transitionend',
+    WebkitTransition: 'webkitTransitionEnd'
+  }
+  for (t in transitions) {
+    if (el.style[t] !== undefined) {
+      return transitions[t]
+    }
+  }
+}