Browse Source

Merge remote-tracking branch 'origin/master' into counter_v2

# Conflicts:
#	components/main/count/Box.vue
#	components/main/count/Item.vue
ouxq 8 years ago
parent
commit
3ffd63b054
38 changed files with 598 additions and 113 deletions
  1. 242 0
      assets/scss/activity.css
  2. 8 0
      assets/scss/common.scss
  3. 1 1
      components/common/buyOrCar/buyComponent.vue
  4. 19 3
      components/common/page/pageComponent.vue
  5. 2 2
      components/default/Header.vue
  6. 10 15
      components/default/RightBar.vue
  7. 7 1
      components/home/Carousel.vue
  8. 3 0
      components/home/KindCategory.vue
  9. 4 4
      components/home/floor/Floor.vue
  10. 13 9
      components/product/ComponentGoods.vue
  11. 1 0
      components/product/brand/BrandComponent.vue
  12. 11 12
      components/product/component/ComponentDetail.vue
  13. 38 14
      components/product/component/StoreInfo.vue
  14. 18 2
      components/provider/NewStore.vue
  15. 3 3
      components/provider/Suppliers.vue
  16. 23 15
      components/search/GoodList.vue
  17. 1 1
      components/store/CommodityInfo.vue
  18. 12 7
      components/store/CommodityList.vue
  19. 1 1
      components/store/RecommendProduct.vue
  20. 5 5
      components/store/common/StoreHeader.vue
  21. 4 3
      nuxt.config.js
  22. 131 0
      pages/activity/business.vue
  23. 1 2
      pages/auth/login.vue
  24. 23 9
      pages/help/home.vue
  25. 0 1
      pages/news/index.vue
  26. 1 1
      pages/store/_uuid/_batchCode.vue
  27. 0 2
      run.sh
  28. BIN
      static/images/activity/business-banner.jpg
  29. BIN
      static/images/activity/business.png
  30. BIN
      static/images/activity/style01.jpg
  31. BIN
      static/images/activity/style02.jpg
  32. BIN
      static/images/activity/style03.jpg
  33. BIN
      static/images/activity/style04.jpg
  34. BIN
      static/images/activity/style05.jpg
  35. BIN
      static/images/activity/style06.jpg
  36. BIN
      static/images/activity/style07.jpg
  37. BIN
      static/images/activity/style08.jpg
  38. 16 0
      store/shop.js

+ 242 - 0
assets/scss/activity.css

@@ -0,0 +1,242 @@
+/*招商注册*/
+ul,li{
+  list-style: none;
+}
+.business{
+  width: 100%;
+  margin: 0 auto;
+}
+.business .banner{
+  width: 100%;
+  height: 676px;
+  margin: 0 auto;
+  background: url("/images/activity/business-banner.jpg") no-repeat center;
+}
+@media screen and (max-width: 1366px) {
+  .business .banner{
+    height: 560px;
+    background-size: 100% 100%;
+  }
+}
+.business  .session{
+  width: 100%;
+  margin: 0 auto;
+}
+.business  .session .content{
+  width: 1190px;
+  margin: 0 auto;
+}
+.business .introduction{
+  margin-top: 75px;
+}
+.business h3{
+  text-align: center;
+  font-size: 30px;
+  margin: 0;
+}
+.business .introduction .text{
+  font-size: 16px;
+  color: #666;
+  line-height: 35px;
+  margin: 50px 130px 140px 130px;
+  /*opacity:0;
+  transform:scale(0);
+  transition:.5s 0.1s;*/
+}
+.business .introduction.active .text{
+  opacity:1 !important; transform:none !important;
+}
+.business .join{
+  text-align: center;
+  width: 100%;
+  margin: 0 auto;
+}
+.business .introduction .join{
+  margin-bottom: 45px;
+}
+.business .join a{
+  width: 154px;
+  height: 46px;
+  display: inline-block;
+  line-height: 46px;
+  text-align: center;
+  background: #f51f1f;
+  font-size: 18px;
+  border-radius: 25px;
+  color: #fff;
+}
+.business .join a:hover{
+  background: #d32526;
+}
+.business .advantage{
+  background: #6a99fa;
+  height: 630px;
+}
+.business .advantage h3{
+  color: #fff;
+  padding: 95px 0 95px 0;
+}
+.business .advantage .advantage-list{
+  width: 100%;
+  margin: 0 auto;
+  display: inline-block;
+}
+.business .advantage .advantage-list ul{
+  width: 100%;
+  margin: 0 auto;
+  display: inline-block;
+  height: 235px;
+}
+.business .advantage .advantage-list ul  li{
+  float: left;
+  width: 174px;
+  height: 206px;
+  border-radius: 10px;
+  background: #fff;
+  margin: 0 6px;
+  overflow: hidden;
+  position: relative;
+  /*opacity:0;
+  transform:scale(0);
+  transition:.5s 0.1s;*/
+}
+/*.business .advantage.active .advantage-list ul  li{
+    opacity:1 !important; transform:none !important;
+}*/
+.business .advantage .advantage-list ul  li:hover{
+  cursor: pointer;
+  width: 200px;
+  height: 233px;
+  margin: 0 10px;
+  top: -16px;
+  transition: top 1s ease-out;
+}
+.business .advantage .advantage-list ul  li:hover p.title{
+  background: #61d2f3;
+  height: 70px;
+  line-height: 70px;
+  color: #fff;
+  font-size: 18px;
+}
+.business .advantage .advantage-list ul  li:hover p:last-child{
+  color: #333;
+}
+.business .advantage .advantage-list ul  li p{
+  display: inline-block;
+  width: 100%;
+}
+.business .advantage .advantage-list ul  li p.title{
+  height: 58px;
+  line-height: 58px;
+  background: #e1eafc;
+  text-align: center;
+  font-size: 14px;
+  color: #666;
+}
+.business .advantage .advantage-list ul  li p:last-child{
+  padding: 16px 20px;
+  color: #999;
+  font-size: 14px;
+  line-height: 20px;
+}
+.business .advantage .join{
+  margin-top: 85px;
+}
+.business .style{
+  height: 700px;
+}
+.business .style h3{
+  padding-top: 80px;
+}
+.business .style .style-list{
+  width: 100%;
+  margin: 0 auto;
+  display: inline-block;
+  margin-top: 55px;
+}
+.business .style .style-list ul{
+  width: 96%;
+  margin: 0 auto;
+  display: inline-block;
+}
+.business .style .style-list ul li{
+  float: left;
+  width: 25%;
+  text-align: center;
+}
+.business .style .style-list ul li:hover img{
+  transform: scale(1.01);
+}
+/*.business .style .style-list ul li:hover p{
+    color: #5078cb;
+}*/
+.business .style .style-list ul li img{
+  width: 108px;
+  height: 108px;
+}
+.business .style .style-list ul li p{
+  font-size: 16px;
+  color: #333;
+  line-height: 70px;
+  margin-bottom: 20px;
+}
+.business .style .join{
+  margin-top: 15px;
+}
+.business  .join-us{
+  background: #64c7f2;
+  height: 630px;
+  margin-bottom: 40px;
+}
+.business  .join-us h3{
+  color: #fff;
+  padding-top: 55px;
+}
+.business  .join-us .content{
+  height: 660px;
+  background: url("/images/activity/business.png") no-repeat center;
+}
+.business  .join-us  .join-step{
+  width: 94%;
+  margin: 0 auto;
+  margin-top: 307px;
+  display: inline-block;
+}
+.business  .join-us  .join-step div{
+  float: left;
+  width: 28%;
+  text-align: center;
+}
+.business  .join-us  .join-step div:first-child{
+  margin-left: 125px;
+}
+.business  .join-us  .join-step div h5{
+  margin: 0;
+  line-height: 30px;
+  font-size: 18px;
+  color: #fff;
+}
+.business  .join-us  .join-step div p{
+  line-height: 20px;
+  font-size: 14px;
+  color: #fff;
+}
+.business  .join-us .join{
+  margin-top: 90px;
+}
+.business .join a:hover{
+  transform: scale(1.1);
+  transition: transform .2s ease-out;
+}
+/*
+.business .join{
+    animation:come_on 2s infinite;
+}
+@keyframes come_on {
+    0% {
+        transform: scale(1); }
+    50% {
+        transform: scale(1.04); }
+    100% {
+        transform: scale(1); }
+}*/

+ 8 - 0
assets/scss/common.scss

@@ -618,3 +618,11 @@ div.el-tree-node__content{
   padding: 14px !important;
 }
 
+a {
+  color: #2d8cf0;
+  background: 0 0;
+  text-decoration: none;
+  outline: 0;
+  cursor: pointer;
+  transition: color .2s ease;
+}

+ 1 - 1
components/common/buyOrCar/buyComponent.vue

@@ -11,7 +11,7 @@
     methods: {
       buyNow: function (isBuy) {
         if (!this.$store.state.option.user.logged) {
-          this.$http.get('/login/page').then(response => {
+          this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
             if (response.data) {
               this.$router.push('/auth/login')
             }

+ 19 - 3
components/common/page/pageComponent.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="page-wrap" v-if="total/1.0/pageSize>1">
     <el-pagination
-      :current-page.sync="current"
+      :current-page.sync="nowPage"
       :page-size="pageSize"
       layout="prev, pager, next"
       :total="total"
@@ -23,7 +23,7 @@
   export default {
     data () {
       return {
-        nowPage: this.current
+        nowPage: 1
       }
     },
     watch: {
@@ -44,7 +44,7 @@
 </script>
 
 <style>
-  a {
+  .page-wrap a {
     color: #2d8cf0;
     background: 0 0;
     text-decoration: none;
@@ -52,8 +52,21 @@
     cursor: pointer;
     transition: color .2s ease;
   }
+  .el-pagination {
+    padding: 0;
+  }
   .el-pagination .btn-next, .el-pagination .btn-prev {
     color: #337ab7;
+    width: 33px;
+    height: 30px;
+  }
+  .el-pagination .btn-next {
+    border-top-right-radius: 4px;
+    border-bottom-right-radius: 4px;
+  }
+  .el-pagination .btn-prev {
+    border-top-left-radius: 4px;
+    border-bottom-left-radius: 4px;
   }
   .el-pager li{
     color: #337ab7;
@@ -61,6 +74,9 @@
     background-color: #fff;
     border: 1px solid #ddd;
     font-size: 10px;
+    width: 33px;
+    height: 30px;
+    border-right: none;
   }
   .el-pager li:not(.active):hover, .el-pagination button:hover {
     z-index: 3;

+ 2 - 2
components/default/Header.vue

@@ -80,10 +80,10 @@
         this.$router.push('/auth/logout')
       },
       onLoginClick () {
-        this.$http.get('/login/page').then(response => {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
           if (response.data) {
             this.$router.push('/auth/login')
-     //       window.location.href = response.data.content
+//            window.location.href = response.data.content
           }
         })
         // TODO 待Account Center改版

+ 10 - 15
components/default/RightBar.vue

@@ -145,35 +145,30 @@
         this.$store.dispatch('user/deleteHistory', {id: id})
         this.$store.dispatch('user/loadHistory')
       },
+      goLogin: function () {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+          if (response.data) {
+            this.$router.push('/auth/login')
+          }
+        })
+      },
       goHistory: function () {
         if (!this.user.logged) {
-          this.$http.get('/login/page').then(response => {
-            if (response.data) {
-              this.$router.push('/auth/login')
-            }
-          })
+          this.goLogin()
         } else {
           window.location.href = '/user#/browsingHistory'
         }
       },
       goCart: function () {
         if (!this.user.logged) {
-          this.$http.get('/login/page').then(response => {
-            if (response.data) {
-              this.$router.push('/auth/login')
-            }
-          })
+          this.goLogin()
         } else {
           window.location.href = '/user#/cart'
         }
       },
       goWebChat: function () {
         if (!this.user.logged) {
-          this.$http.get('/login/page').then(response => {
-            if (response.data) {
-              this.$router.push('/auth/login')
-            }
-          })
+          this.goLogin()
         } else {
           // 获得窗口的垂直位置
           let iTop = (window.screen.availHeight - 30 - 600) / 2

+ 7 - 1
components/home/Carousel.vue

@@ -6,9 +6,12 @@
         <div v-swiper:mySwiper="swiperOption">
           <div class="swiper-wrapper">
             <div class="swiper-slide" v-for="banner in banners.data">
-              <a :href="banner.hrefUrl" target="_blank">
+              <a :href="banner.hrefUrl" target="_blank" v-if="banner.hrefUrl">
                 <img :src="banner.pictureUrl"/>
               </a>
+              <span v-if="!banner.hrefUrl">
+                <img :src="banner.pictureUrl"/>
+              </span>
             </div>
             <div class="swiper-button-prev"><i class="iconfont icon-arrow-left"></i></div>
             <div class="swiper-button-next"><i class="iconfont icon-arrow-right"></i></div>
@@ -83,6 +86,9 @@
             display: block;
             height: $carousel_height;
           }
+          a[href='']:hover{
+            cursor: default;
+          }
         }
       }
     }

+ 3 - 0
components/home/KindCategory.vue

@@ -172,6 +172,9 @@
                 text-overflow: ellipsis;
                 white-space: nowrap;
               }
+              i{
+                font-size: 12px;
+              }
             }
 
             dd {

+ 4 - 4
components/home/floor/Floor.vue

@@ -74,8 +74,8 @@
         }
       }
       &.medium {
-        width: 389px;
-        height: 199px;
+        width: 390px;
+        height: 200px;
 
         img {
           position: absolute;
@@ -116,8 +116,8 @@
         }
       }
       &.small {
-        width: 219px;
-        height: 199px;
+        width: 220px;
+        height: 200px;
 
         img {
           margin-top: 15px;

+ 13 - 9
components/product/ComponentGoods.vue

@@ -25,26 +25,30 @@
         <td>
           <!--store/{{compGoods.storeId}}#/batchInfo/{{compGoods.batchCode}}-->
           <nuxt-link v-if="compGoods.batchCode" :to="`/store/${compGoods.storeId}/${compGoods.batchCode}`" target="_blank">
-            <img :src="compGoods.img || '/images/all/default.png'"/>
+            <img :src="compGoods.img?compGoods.img:compGoods.brand.logoUrl?compGoods.brand.logoUrl:'/images/all/default.png'"/>
           </nuxt-link>
           <img v-if="!compGoods.batchCode" :src="compGoods.img || '/images/all/default.png'"/>
           <!--store/{{compGoods.storeId}}#/home-->
           <nuxt-link :to="'/store/' + compGoods.storeId" class="contact" :title="compGoods.storeName" target="_blank">{{compGoods.storeName}}</nuxt-link>
         </td>
         <td class="brand-code">
-          <div class="brand"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
-          <div class="code"><nuxt-link :to="`/product/component/${compGoods.uuid}/`" :title="compGoods.code">{{compGoods.code}}</nuxt-link></div>
+          <div class="brand" v-if="compGoods.brand.nameEn"><nuxt-link :to="`/product/brand/${compGoods.brand.uuid}/`" title="compGoods.brand.nameEn">{{compGoods.brand.nameEn}}</nuxt-link></div>
+          <div class="brand" v-if="!compGoods.brand.nameEn">—</div>
+          <div class="code" v-if="compGoods.code"><nuxt-link :to="`/product/component/${compGoods.uuid}/`" :title="compGoods.code">{{compGoods.code}}</nuxt-link></div>
+          <div class="code" v-if="!compGoods.code">—</div>
         </td>
         <td>
-          <div class="package">{{compGoods.packaging || '暂无包装方式信息'}}</div>
-          <div class="date">{{compGoods.produceDate || '-'}}</div>
+          <div class="package" v-if="compGoods.packaging">{{compGoods.packaging}}</div>
+          <div v-if="!compGoods.produceDate && !compGoods.packaging">—</div>
+          <div class="date" v-if="compGoods.produceDate">{{compGoods.produceDate}}</div>
         </td>
         <td class="text-left">
-          <div class="goods">
-            库存:<span>{{compGoods.reserve || '暂无库存'}}</span>
+          <div class="goods" v-if="compGoods.reserve">
+            库存:<span>{{compGoods.reserve}}</span>
           </div>
-          <div class="from" v-if="compGoods.reserve > 0">
-            起拍:<span>{{compGoods.minBuyQty}}</span>
+          <div v-if="!compGoods.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+          <div class="from" v-if="compGoods.reserve && compGoods.reserve > 0">
+            起拍:<span v-if="compGoods.minBuyQty">{{compGoods.minBuyQty}}</span>
           </div>
           <!--<div class="multiple" v-if="compGoods.reserve > 0">
             倍数:<span>{{compGoods.minPackQty}}</span>

+ 1 - 0
components/product/brand/BrandComponent.vue

@@ -86,6 +86,7 @@
       },
       async pageCmpGoods (params) {
 //      pageCmpGoods (params) {
+        params.filter.brandid = this.brand.id
         let { data } = await this.$http.get('/api/product/component/list', { params })
         this.$store.commit('brandComponent/GET_COMPONENT_SUCCESS', data)
 //        this.$http.get('/api/product/component/list', { params }).then(response => {

+ 11 - 12
components/product/component/ComponentDetail.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="componentDetail">
     <div class="container">
-      <div class="menu">
+      <!--<div class="menu">
         <component-menu/>
-      </div>
+      </div>-->
       <div class="detail">
         <div class="component-img">
-          <img :src="list.img || '/images/component/default.png'"/>
+          <img :src="list.img?list.img:list.brand.logoUrl?list.brand.logoUrl:'/images/component/default.png'"/>
         </div>
         <div class="component-message">
           <div class="message-code">
@@ -63,7 +63,7 @@
   </div>
 </template>
 <script>
-  import { ComponentMenu } from '~components/product'
+//  import ComponentMenu from '~components/product/component/componentMenu.vue'
   export default {
     name: 'ComponentDetail',
     data () {
@@ -71,9 +71,6 @@
         dialogVisible: false
       }
     },
-    mounted () {
-      this.collectList()
-    },
     computed: {
       lists () {
         return this.$store.state.componentDetail.detail
@@ -96,21 +93,23 @@
               return true
             }
           }
+        } else {
+          return false
         }
       }
     },
-    components: {
-      ComponentMenu
-    },
+//    components: {
+//      ComponentMenu
+//    },
     methods: {
       collect (id) {
         if (this.user.logged) {
           this.dialogVisible = true
           let kind = 2
           this.$store.dispatch('product/saveEntity', {componentid: id, kind: kind})
-          this.collectList = true
+//          this.collectList = true
         } else {
-          this.$http.get('/login/page').then(response => {
+          this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
             if (response.data) {
               this.$router.push('/auth/login')
             }

+ 38 - 14
components/product/component/StoreInfo.vue

@@ -4,7 +4,7 @@
       <div class="storeIns">
         <div class="sign">选择商家:</div>
         <div class="storeInList" v-for="storeIn in store">
-          <div class="choose" :class="{'storeIn-active' : storeIn.isSelected, 'storeIn' : !storeIn.isSelected}" @click="addStore(storeIn)">
+          <div class="choose" :class="{'storeIn-active' : storeIn.isSelected, 'storeIn' : !storeIn.isSelected}" @click="store.length==1?'':addStore(storeIn)">
             <a class="storeLogo">
               <img :src="storeIn.logoUrl || '/images/component/default.png'" :alt="storeIn.storeName" :title="storeIn.storeName">
             </a>
@@ -46,20 +46,31 @@
           </tr>
         </thead>
         <tbody class="text-center">
-          <tr style="cursor: pointer;" v-for="list in storeList.content">
-            <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.code}}</a></td>
-            <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.produceDate}}</a></td>
-            <td><a :href="'/store/' + list.storeid + '/' + list.batchCode">{{list.packaging || '暂无包装方式'}}</a></td>
+          <tr style="cursor: pointer;" v-for="list in storeList.content" @click="goProductDetail(list.storeid, list.batchCode)">
+            <td>
+              <a v-if="list.code">{{list.code}}</a>
+              <a v-if="!list.code">—</a>
+            </td>
+            <td>
+              <a v-if="list.produceDate">{{list.produceDate}}</a>
+              <a v-if="!list.produceDate">—</a>
+            </td>
+            <td>
+              <a v-if="list.packaging">{{list.packaging}}</a>
+              <a v-if="!list.packaging">—</a>
+            </td>
             <td style="text-align: left;padding-left: 25px;">
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
-                <div>
+              <a>
+                <div v-if="list.reserve">
                   <span>库存:</span>
                   <span>{{list.reserve}}</span>
                 </div>
-                <div>
+                <div v-if="!list.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+                <div v-if="list.reserve && list.reserve>0">
                   <span>起拍:</span>
-                  <span>{{list.minBuyQty}}</span>
+                  <span v-if="list.minBuyQty">{{list.minBuyQty}}</span>
                 </div>
+
                 <!--<div>-->
                   <!--<span>倍数:</span>-->
                   <!--<span>{{list.minPackQty}}</span>-->
@@ -67,14 +78,15 @@
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-for="price in list.prices">
-                  <span>{{price.start}}</span>+
+                  <span v-if="list.prices">{{price.start}}</span>+
+                  <span v-if="!list.prices">—</span>
                 </div>
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-show="list.currencyName.indexOf('USD')==-1 || !list.prices">
                   <span>—</span>
                 </div>
@@ -84,7 +96,7 @@
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-show="list.currencyName.indexOf('RMB')==-1 || !list.prices">
                   <span>—</span>
                 </div>
@@ -94,13 +106,16 @@
               </a>
             </td>
             <td>
-              <a :href="'/store/' + list.storeid + '/' + list.batchCode">
+              <a>
                 <div v-show="list.b2cMinDelivery">
                   <span>交期:</span>
                   <span>{{list.b2cMinDelivery}}</span>
                   <span v-if="list.b2cMaxDelivery && list.b2cMaxDelivery !== list.b2cMinDelivery">-</span>
                   <span v-if="list.b2cMaxDelivery && list.b2cMaxDelivery !== list.b2cMinDelivery">{{list.b2cMaxDelivery}}</span>
                 </div>
+                <div v-if="!list.b2cMinDelivery">
+                  <span>—</span>
+                </div>
               </a>
             </td>
             <td>
@@ -216,6 +231,9 @@
           this.params.filter.ignoreStore = !this.params.filter.ignoreStore
         }
         this.$store.dispatch('loadComponentInformation', this.params)
+      },
+      goProductDetail: function (storeid, batchcode) {
+        window.location.href = '/store/' + storeid + '/' + batchcode
       }
     }
   }
@@ -251,6 +269,8 @@
   }
   .storeInfo .storeIn-active {
     width: 98px;
+    height: 49px;
+    line-height: 49px;
     float: left;
     border: 1px solid #5078cb;
     text-align: center;
@@ -265,6 +285,10 @@
     text-align: center;
     vertical-align: middle;
   }
+  .storeInList .choose a img{
+    max-width: 95px;
+    max-height: 46px;
+  }
   a.storeLogo>img,.storeIn-active a.storeLogo>img {
     max-width: 95px;
     max-height: 46px;

+ 18 - 2
components/provider/NewStore.vue

@@ -31,7 +31,7 @@
           已入驻商家<span>{{storeCount}}</span>家
         </div>
         <div>
-          <a href="/vendor#/store-apply"><button>立即入驻</button></a>
+          <a @click="goStoreApply()"><button>立即入驻</button></a>
         </div>
       </div>
     </div>
@@ -42,12 +42,28 @@
 export default {
   name: 'new-store',
   computed: {
+    user () {
+      return this.$store.state.option.user
+    },
     stores () {
       return this.$store.state.provider.storeCms.newStores.data ? this.$store.state.provider.storeCms.newStores.data.content : []
     },
     storeCount () {
       return this.$store.state.provider.storeCms.storeCount.data
     }
+  },
+  methods: {
+    goStoreApply: function () {
+      if (!this.user.logged) {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+          if (response.data) {
+            this.$router.push('/auth/login')
+          }
+        })
+      } else {
+        window.location.href = '/vendor#/store-apply'
+      }
+    }
   }
 }
 </script>
@@ -107,7 +123,7 @@ export default {
         height: 50px;
         display: inline-block;
         text-align: center;
-        line-height: 50px;
+        line-height: 45px;
         border: #e8e8e8 1px solid;
 
         img {

+ 3 - 3
components/provider/Suppliers.vue

@@ -6,7 +6,7 @@
         <td width="175"></td>
         <td width="auto"></td>
         <td width="200">
-          <div class="input-group">
+          <div class="input-group" style="display: table;">
             <input class="form-control" type="search" v-model="keyword" placeholder="请输入商家名称" @search="search()" />
             <span class="input-group-btn">
 							<button type="button" class="btn btn-default" @click="search()"><i class="iconfont">&#xe6fc;</i></button>
@@ -14,8 +14,8 @@
           </div>
         </td>
         <td width="150" style="vertical-align: middle"><span>入驻商家:</span><span class="text-message">{{stores ? stores.totalElements : 0}}</span><span>家</span></td>
-        <td width="150">
-          <a href="/vendor#/store-apply"><button class="btn btn-primary" style="margin-left: 6px;">立即入驻</button></a>
+        <td width="150" style="vertical-align: middle;">
+          <a href="/vendor#/store-apply" style="width: 100px; height: 30px; display: inline-block;"><button class="btn btn-primary" style="margin-left: 6px;">立即入驻</button></a>
         </td>
       </tr>
       </thead>

+ 23 - 15
components/search/GoodList.vue

@@ -55,33 +55,37 @@
           <tbody id="productList-content">
           <tr v-for="item in good_list.components">
             <td>
-              <nuxt-link :to="`/product/component/${item.uuid}`">
-                <img width="80px" height="80px" :src="item.img?item.img:'/images/component/default.png'">
+              <nuxt-link class="component-img-box" :to="`/product/component/${item.uuid}`">
+                <img :src="item.img?item.img:item.brand.logoUrl?item.brand.logoUrl:'/images/component/default.png'">
               </nuxt-link>
             </td>
             <td class="brand-code">
-              <div class="brand"><nuxt-link :to="`/product/brand/${item.brand.uuid}`" class="text-num" v-text="item.brand.nameEn"></nuxt-link></div>
-              <div class="code"><nuxt-link :to="`/product/component/${item.uuid}`" class="f16 text-bold text-num" v-text="item.code"></nuxt-link></div>
-              <div class="brand"><nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.kind.nameCn">
-              </nuxt-link></div>
+              <div class="brand" v-if="item.brand.nameEn"><nuxt-link :to="`/product/brand/${item.brand.uuid}`" class="text-num" v-text="item.brand.nameEn"></nuxt-link></div>
+              <div class="brand" v-if="!item.brand.nameEn">—</div>
+              <div class="code"  v-if="item.code"><nuxt-link :to="`/product/component/${item.uuid}`" class="f16 text-bold text-num" v-text="item.code"></nuxt-link></div>
+              <div class="brand" v-if="!item.code">—</div>
+              <div class="brand"  v-if="item.kind.nameCn"><nuxt-link :to="`/product/kind/${item.kindid}`" v-text="item.kind.nameCn"></nuxt-link></div>
+              <div class="brand" v-if="!item.kind.nameCn">—</div>
             </td>
             <td>
-              <div class="package" v-text="item.packaging?item.packaging:'暂无包装方式信息'"></div>
+              <div class="package" v-text="item.packaging"></div>
               <div class="date" v-text="item.produceDate"></div>
+              <div v-if="!item.packaging && !item.produceDate">—</div>
             </td>
             <td>
-              <div>
+              <div v-if="item.storeName">
                 <nuxt-link :to="'/store/' + item.storeId" v-text="item.storeName">
                 </nuxt-link>
-                <span v-if="!item.storeName">—</span>
               </div>
+              <div v-if="!item.storeName">—</div>
             </td>
             <td class="text-left">
-              <div class="goods">
-                库存:<span v-text="item.reserve || '暂无库存'"></span>
+              <div class="goods"  v-if="item.reserve">
+                库存:<span v-text="item.reserve"></span>
               </div>
-              <div class="from" v-if="item.reserve > 0">
-                起拍:<span v-text="item.minBuyQty"></span>
+              <div v-if="!item.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+              <div class="from" v-if="item.reserve && item.reserve > 0">
+                起拍:<span v-text="item.minBuyQty" v-if="item.minBuyQty"></span>
               </div>
              <!-- <div class="multiple" v-if="item.reserve > 0">
                 倍数:<span v-text="item.minPackQty"></span>
@@ -399,11 +403,15 @@
     border: 1px solid #e8e8e8;
   }
 
+  .product-list tbody>tr .component-img-box {
+    width: 80px;
+    height: 80px;
+  }
   .product-list tbody>tr img {
     border: 1px solid #e8e8e8;
     margin: 10px 0 5px 0;
-    width: 80px;
-    height: 80px;
+    max-width: 80px;
+    max-height: 80px;
   }
   .product-list tbody>tr .contact{
     font-size: 14px;

+ 1 - 1
components/store/CommodityInfo.vue

@@ -280,7 +280,7 @@ export default {
     },
     buyNow: function (isBuy, item) {
       if (!this.$store.state.option.user.logged) {
-        this.$http.get('/login/page').then(response => {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
           if (response.data) {
             this.$router.push('/auth/login')
           }

+ 12 - 7
components/store/CommodityList.vue

@@ -49,19 +49,23 @@
               </a>
             </td>
             <td class="brand-code">
-              <div class="brand" v-text="commodity.brandNameEn"></div>
-              <div class="code" v-text="commodity.code"></div>
+              <div class="brand" v-if="commodity.brandNameEn" v-text="commodity.brandNameEn"></div>
+              <div class="brand" v-if="!commodity.brandNameEn">—</div>
+              <div class="code" v-if="commodity.code" v-text="commodity.code"></div>
+              <div class="code" v-if="!commodity.code">—</div>
             </td>
             <td>
-              <div class="package" v-text="commodity.packaging || '暂无包装信息'"></div>
-              <div class="date" v-text="commodity.produceDate">2016-12-01</div>
+              <div class="package" v-if="commodity.packaging" v-text="commodity.packaging"></div>
+              <div class="package" v-if="!commodity.packaging && !commodity.produceDate">—</div>
+              <div class="date" v-if='commodity.produceDate' v-text="commodity.produceDate">2016-12-01</div>
             </td>
             <td style="text-align: left;vertical-align: middle;">
-              <div class="goods">
+              <div class="goods" v-if="commodity.reserve">
                 库存:<span v-text="commodity.reserve">31500</span>
               </div>
-              <div class="from">
-                起拍:<span v-text="commodity.minBuyQty">300</span>
+              <div v-if="!commodity.reserve" style="text-align: center;margin-left: 0;"><span>—</span></div>
+              <div class="from" v-if="commodity.reserve && commodity.reserve>0">
+                起拍:<span v-if="commodity.minBuyQty" v-text="commodity.minBuyQty">300</span>
               </div>
               <!--<div class="multiple">
                 倍数:<span>1</span>
@@ -88,6 +92,7 @@
                 <span v-if="commodity.b2cMinDelivery != commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery + '-' + commodity.b2cMaxDelivery"></span>
                 <span v-if="commodity.b2cMinDelivery == commodity.b2cMaxDelivery" v-text="commodity.b2cMinDelivery"></span>
               </div>
+              <div v-if="!commodity.b2cMinDelivery"><span>—</span></div>
             </td>
             <td>
               <buy :item="commodity"></buy>

+ 1 - 1
components/store/RecommendProduct.vue

@@ -44,7 +44,7 @@
     methods: {
       buyNow: function (isBuy, item) {
         if (!this.$store.state.option.user.logged) {
-          this.$http.get('/login/page').then(response => {
+          this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
             if (response.data) {
               this.$router.push('/auth/login')
             }

+ 5 - 5
components/store/common/StoreHeader.vue

@@ -27,14 +27,14 @@
             </div>
             <div style="background: #FFFFFF;" v-if="isOpen">
               <ul class = "shop-contact list-unstyled" style="padding: 15px 0; margin-bottom: 0; border-top: #e8e8e8 1px solid; margin-top: 20px;">
-                <li v-if="storeInfo.enterprise.enTel&&storeInfo.enterprise.enTel.length > 0">
+                <li v-if="storeInfo.enterprise.enTel">
                   <span>电话:</span><span v-text="storeInfo.enterprise.enTel"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.enFax&&storeInfo.enterprise.enFax.length > 0">
+                <li v-if="storeInfo.enterprise.enFax">
                   <span>传真:</span><span v-text="storeInfo.enterprise.enFax"></span>
                 </li>
-                <li v-if="storeInfo.enterprise.address&&storeInfo.enterprise.address.length > 0">
-                  <span>地址:</span><span v-text="storeInfo.enterprise.address"></span>
+                <li v-if="storeInfo.enterprise.address || storeInfo.enterprise.enAddress">
+                  <span>地址:</span><span v-text="storeInfo.enterprise.address || storeInfo.enterprise.enAddress"></span>
                 </li>
                 <li class="text-right">
                   <nuxt-link :to="{ name: 'store-uuid-description', params: { uuid: storeInfo.uuid } }">了解更多&gt;</nuxt-link>
@@ -98,7 +98,7 @@ export default {
     },
     focus (id, name) {
       if (!this.user.logged) {
-        this.$http.get('/login/page').then(response => {
+        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
           if (response.data) {
             this.$router.push('/auth/login')
           }

+ 4 - 3
nuxt.config.js

@@ -1,6 +1,6 @@
 const path = require('path')
 const isProdMode = Object.is(process.env.NODE_ENV, 'production')
-const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://www.usoftmall.com/' : 'http://192.168.253.60:9090/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.60:9090/platform-b2c/')
 
 module.exports = {
   router: {
@@ -97,7 +97,8 @@ module.exports = {
     src: '~plugins/vue-empty.js',
     ssr: false
   }, {
-    src: '~plugins/element-ui.js'
+    src: '~plugins/element-ui.js',
+    ssr: true
   }, {
     src: '~plugins/filters.js',
     ssr: false
@@ -106,5 +107,5 @@ module.exports = {
     ssr: false
   }],
   /* TODO 暂时代理到商城测试版,之后再做出调整 */
-  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**']
+  proxyTable: ['/api/**', '/search/**', '/user/**', '/login/**', '/register/**', '/logout/**', '/static/**', '/vendor**', '/user**', '/trade/**', '/recommendation/**', '/store-service/**', '/basic/**', '/logout**', '/operation/**', '/help**', '/product**', '/store**', '/order/proxy**', '/report/**', '/store/**#/**', '/kdn/**', '/product/**Submit', '/admin**', '/product/**Submit/**', '/release/**', '/auth/store/**', '/produce/**']
 }

+ 131 - 0
pages/activity/business.vue

@@ -0,0 +1,131 @@
+<template>
+  <div class="business">
+    <!--banner-->
+    <div class="banner"></div>
+    <!--介绍-->
+    <div class="session introduction">
+      <div class="content">
+        <h3>优软商城</h3>
+        <div class="text">
+          优软商城是由深圳市优软商城科技有限公司,为真正地解决电子信息行业的众多难题,秉持回归互联网精神的“分享与链接”,<br/>
+          基于垂直细分理念打造的一个独立的第三方电子交易商城。目前优软商城已经收录了3000家的原厂品牌,700多万现货型号.<br/>
+          针对电子信息行业的难题,优软商城将为客户提供更简单,更放心的解决方案。<br/>
+          我们严格把关供应商资质,从源头上杜绝虚假信息,做到付款交期如实,借助物流仓储的一站式服务帮您实现交易高效、库存无忧。<br/>
+        </div>
+        <div class="join">
+          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+        </div>
+      </div>
+    </div>
+    <div class="session advantage">
+      <div class="content">
+        <h3>六大特色功能</h3>
+        <div class="advantage-list">
+          <ul>
+            <li>
+              <p class="title">标准器件库</p>
+              <p>原厂型号,从源头上杜绝假货,品质更放心,售后有保障。</p>
+            </li>
+            <li>
+              <p class="title">元器件选型</p>
+              <p>3000家原厂品牌,700万产品型号,一键搜索,选您所需。</p>
+            </li>
+            <li>
+              <p class="title">现货交易</p>
+              <p>现货交易,如期如实,一周交货,生产高效不断链。</p>
+            </li>
+            <li>
+              <p class="title">库存寄售</p>
+              <p>死库料号,无需开店,免费注册,即可上架售卖。</p>
+            </li>
+            <li>
+              <p class="title">样品申领</p>
+              <p>海量原装料号,先试用再下单,采购零误差。</p>
+            </li>
+            <li>
+              <p class="title">电子社区</p>
+              <p>齐聚全球大人、发烧友和行业专家,分享行业快讯,交流高新技术难题。</p>
+            </li>
+          </ul>
+        </div>
+        <div class="join">
+          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+        </div>
+      </div>
+    </div>
+    <div class="session style">
+      <div class="content">
+        <h3>商家入驻  优势多多</h3>
+        <div class="style-list">
+          <ul>
+            <li>
+              <img src="/images/activity/style01.jpg" alt="">
+              <p>真实客户</p>
+            </li>
+            <li>
+              <img src="/images/activity/style02.jpg" alt="">
+              <p>免费入驻</p>
+            </li>
+            <li>
+              <img src="/images/activity/style03.jpg" alt="">
+              <p>免费广告</p>
+            </li>
+            <li>
+              <img src="/images/activity/style04.jpg" alt="">
+              <p>海量订单</p>
+            </li>
+            <li>
+              <img src="/images/activity/style05.jpg" alt="">
+              <p>极速上传</p>
+            </li>
+            <li>
+              <img src="/images/activity/style06.jpg" alt="">
+              <p>零佣金</p>
+            </li>
+            <li>
+              <img src="/images/activity/style07.jpg" alt="">
+              <p>库存寄售</p>
+            </li>
+            <li>
+              <img src="/images/activity/style08.jpg" alt="">
+              <p>订单通知</p>
+            </li>
+          </ul>
+        </div>
+        <div class="join">
+          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+        </div>
+      </div>
+    </div>
+    <div class="session join-us">
+      <div class="content">
+        <h3>成为优软商城卖家</h3>
+        <div class="join-step">
+          <div>
+            <h5>申请成为卖家</h5>
+            <p>提交入驻申请</p>
+          </div>
+          <div>
+            <h5>资质审核</h5>
+            <p>上传企业认证资料</p>
+          </div>
+          <div>
+            <h5>开通后台</h5>
+            <p>审核通过,上传产品、报价</p>
+          </div>
+        </div>
+        <div class="join">
+          <a href="http://account.ubtob.com/sso/register?returnURL=http%253A%252F%252Fwww.usoftmall.com%252Flogin%252Fproxy&appId=mall" target="_blank">立即入驻</a>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    layout: 'main'
+  }
+</script>
+<style scoped>
+  @import '~assets/scss/activity.css';
+</style>

+ 1 - 2
pages/auth/login.vue

@@ -36,7 +36,7 @@ export default {
       })
     },
     async crossAfter (content) {
-      if (!content && content === '') {
+      if (!content || content === '') {
         this.$router.replace('/')
       }
 
@@ -44,7 +44,6 @@ export default {
         let { data } = await this.$http.post('/login/crossAfter', {}, { params: { replyTxt: content } })
 
         this.$store.dispatch('loadUserInfo', data)
-
         window.location.href = data.returnUrl || '/'
       } catch (err) {
         this.$router.replace('/')

+ 23 - 9
pages/help/home.vue

@@ -31,13 +31,25 @@
   </div>
 </template>
 <script>
-  // 升序
-  function compare (property) {
-    return function (a, b) {
-      var value1 = a[property]
-      var value2 = b[property]
-      return value1 - value2
+//   升序
+//  function compare (property) {
+//    return function (a, b) {
+//      var value1 = a[property]
+//      var value2 = b[property]
+//      return value1 - value2
+//    }
+//  }
+  function sortBy (arr, property) {
+    for (let i = 0; i < arr.length; i++) {
+      for (let j = i; j < arr.length; j++) {
+        if (arr[i][property] > arr[j][property]) {
+          let tmp = arr[i]
+          arr[i] = arr[j]
+          arr[j] = tmp
+        }
+      }
     }
+    return arr
   }
   import { left, helpHeader } from '~components/help'
   export default {
@@ -53,10 +65,12 @@
     },
     computed: {
       helpNav () {
-        let list = this.$store.state.help.snapsho.data.sort(compare('detno'))
-        if (list) {
+        let list = this.$store.state.help.snapsho.data || []
+        if (list.length > 0) {
+          list = sortBy(list, 'detno')
           for (let i = 0; i < list.length; i++) {
-            list[i].children = list[i].children.sort(compare('detno'))
+            let tem = sortBy(list[i].children, 'detno')
+            list[i].children = tem
           }
         }
         return list

+ 0 - 1
pages/news/index.vue

@@ -28,7 +28,6 @@
     methods: {
       listenChild: function (nPage) {
         this.nowPage = nPage
-        console.log(this.nowPage)
         this.$store.dispatch('newsData/loadAllNews', { page: this.nowPage, pageSize: this.pageSize })
       }
     }

+ 1 - 1
pages/store/_uuid/_batchCode.vue

@@ -11,7 +11,7 @@ export default {
   layout: 'shop',
   fetch ({ store, route }) {
     return Promise.all([
-      store.dispatch('shop/findStoreInfoFromUuid', route.params),
+//      store.dispatch('shop/findStoreInfoFromUuid', route.params),
       store.dispatch('shop/findCommodityOnBatchInfo', route.params)
     ])
   },

+ 0 - 2
run.sh

@@ -4,9 +4,7 @@ echo "NODE_ENV: $NODE_ENV"
 echo "BASE_URL: $BASE_URL"
 
 if [ "$NODE_ENV" == 'production' ]; then
-  npm run build
   npm run start
 else
-  npm run dev-build
   npm run dev-start
 fi

BIN
static/images/activity/business-banner.jpg


BIN
static/images/activity/business.png


BIN
static/images/activity/style01.jpg


BIN
static/images/activity/style02.jpg


BIN
static/images/activity/style03.jpg


BIN
static/images/activity/style04.jpg


BIN
static/images/activity/style05.jpg


BIN
static/images/activity/style06.jpg


BIN
static/images/activity/style07.jpg


BIN
static/images/activity/style08.jpg


+ 16 - 0
store/shop.js

@@ -10,6 +10,19 @@ function StoreFocusList ({ commit }, params = {}) {
       commit('storeInfo/GET_FOCUSLIST_FAILURE', err)
     })
 }
+// 根据UUID获取某店铺信息
+function findStoreInfoFromUuid ({ commit }, params = {}) {
+  commit('storeInfo/REQUEST_STORE_INFO')
+  return axios.get('/api/store-service/stores', { params })
+    .then(response => {
+      commit('storeInfo/GET_STORE_INFO_SUCCESS', response.data)
+      return Promise.all([
+        StoreFocusList({ commit }, {id: response.data.id})
+      ])
+    }, err => {
+      commit('storeInfo/GET_STORE_INFO_FAILURE', err)
+    })
+}
 
 export const actions = {
   // 根据UUID获取某店铺信息
@@ -35,6 +48,9 @@ export const actions = {
         return axios.get(`/api/commodity/component/${commodity.uuid}`)
           .then(response => {
             commit('storeInfo/GET_COMPONENT_SUCCESS', response.data)
+            return Promise.all([
+              findStoreInfoFromUuid({ commit }, {uuid: commodity.storeid})
+            ])
           }, err => {
             commit('storeInfo/GET_COMPONENT_FAILURE', err)
           })