Browse Source

合并代码

yangc 8 years ago
parent
commit
2c1f1b50f9
49 changed files with 3469 additions and 459 deletions
  1. 1 0
      app.html
  2. 2 2
      assets/scss/help.css
  3. 1 1
      components/common/buyOrCar/buyComponent.vue
  4. 48 16
      components/common/upload/upload.vue
  5. 6 6
      components/default/Footer.vue
  6. 55 12
      components/default/Header.vue
  7. 11 11
      components/home/Advert.vue
  8. 13 14
      components/main/count/Box.vue
  9. 1 0
      components/news/Right.vue
  10. 45 2
      components/product/ComponentGoods.vue
  11. 244 22
      components/product/component/ComponentDetail.vue
  12. 38 4
      components/product/component/StoreInfo.vue
  13. 17 0
      components/register-saler/RegHeader.vue
  14. 189 0
      components/register-saler/Register.vue
  15. 7 0
      components/register-saler/index.js
  16. 894 0
      components/register-saler/register/StepFirst.vue
  17. 117 0
      components/register-saler/register/StepSecond.vue
  18. 1099 0
      components/register-saler/register/StepThird.vue
  19. 45 2
      components/search/GoodList.vue
  20. 6 6
      components/search/Kind.vue
  21. 1 4
      components/searchStore/StoreContent.vue
  22. 2 2
      components/store/BaseInfo.vue
  23. 5 1
      components/store/CommodityInfo.vue
  24. 6 2
      components/store/CommodityList.vue
  25. 1 1
      components/store/ComponentInfo.vue
  26. 5 1
      components/store/RecommendProduct.vue
  27. 25 0
      layouts/default.vue
  28. 45 0
      layouts/errorPage.vue
  29. 99 0
      layouts/main.vue
  30. 76 0
      layouts/shop.vue
  31. 2 8
      middleware/authenticated.js
  32. 2 2
      nuxt.config.js
  33. 15 0
      pages/auth/login.vue
  34. 9 0
      pages/error/index.vue
  35. 0 2
      pages/news/_id.vue
  36. 321 336
      pages/register-saler/index.vue
  37. 8 1
      pages/searchStore/_keyword.vue
  38. 7 1
      pages/store/_uuid/index.vue
  39. 0 0
      static/data/city.json
  40. 1 0
      static/data/profession.json
  41. BIN
      static/images/all/dot.png
  42. BIN
      static/images/all/icon_nianxian.jpg
  43. BIN
      static/images/all/loading.gif
  44. BIN
      static/images/all/pdf.png
  45. BIN
      static/images/all/upload-bg.png
  46. BIN
      static/images/component/circle-arrow-down.png
  47. BIN
      static/images/component/circle-arrow-up.png
  48. BIN
      static/images/register/open-store.jpg
  49. BIN
      static/images/register/seller.jpg

+ 1 - 0
app.html

@@ -6,6 +6,7 @@
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/element-ui/1.3.7/theme-default/index.css"/>
   <link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_0d1jjt5tukcblnmi.css"/>
   <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/Swiper/3.4.2/css/swiper.css"/>
+  <!--<link rel="stylesheet" type="text/css" href="https://at.alicdn.com/t/font_452262_1qlk0md3oua6ecdi.css"/>-->
   {{ HEAD }}
   <script>
     var _hmt = _hmt || [];

+ 2 - 2
assets/scss/help.css

@@ -47,7 +47,7 @@
   padding-left: 15px;
   text-decoration: none;
   color: #333;
-  background:url("/images/help/openblack.png") no-repeat left;
+  background:url("../../static/images/help/openblack.png") no-repeat left;
 }
 
 .help-list li a:hover{
@@ -84,7 +84,7 @@
 .help-list ul.list-body li a.cur,.help-list ul li a.cur{
   text-decoration: none;
   font-size: 14px;
-  background:url("/images/help/openblackR.png") no-repeat left;
+  background:url("../../static/images/help/openblackR.png") no-repeat left;
 }
 
 /*

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

@@ -94,7 +94,7 @@
             }
           }
         }
-//        window.location.href = 'user#/order/pay/' + this.enidfilter(this.buy_info.orderid)
+        // window.location.href = 'user#/order/pay/' + this.enidfilter(this.buy_info.orderid)
       },
       enidfilter: function (str) {
         if (str) {

+ 48 - 16
components/common/upload/upload.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <div class="preview">
-      <img :src="qualifications.url==''?'/images/all/upload-apply.png':qualifications.url" class="previewImage"/>
+      <img :src="qualifications.url==''?'images/all/upload-apply.png': isPdf?'/images/all/timg.png':qualifications.url" class="previewImage"/>
       <input type="file" v-if="!qualifications.url" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" />
     </div>
     <div class="hover-show" v-if="qualifications.url">
@@ -21,12 +21,22 @@
 </template>
 <script>
   export default {
+    props: ['typeData', 'url'],
     data () {
       return {
         qualifications: {
-          url: ''
+          url: '',
+          type: ''
         },
-        isShow: false
+        isShow: false,
+        isPdf: false
+      }
+    },
+    watch: {
+      url: function (val, oldVal) {
+        if (val && val !== '') {
+          this.qualifications.url = val
+        }
       }
     },
     methods: {
@@ -35,26 +45,48 @@
         let param = new FormData()
         param.append('file', file, file.name)
         param.append('chunk', '0')
-        let config = {
-          headers: {'Content-Type': 'multipart/form-data'}
+        if (file.type !== 'application/pdf') {
+          let config = {
+            headers: {'Content-Type': 'multipart/form-data'}
+          }
+          this.$http.post('/api/images', param, config)
+            .then(response => {
+              this.isPdf = false
+              this.qualifications.url = response.data[0].path
+              this.qualifications.type = typeof this.typeData === 'undefined' ? '' : this.typeData
+              this.$emit('uploadAction', this.qualifications)
+            })
+        } else {
+          let config = {
+            headers: {'Content-Type': file.type}
+          }
+          this.$http.post('/file', param, config)
+            .then(response => {
+              this.isPdf = true
+              this.qualifications.url = response.data[0].path
+              this.qualifications.type = typeof this.typeData === 'undefined' ? '' : this.typeData
+              this.$emit('uploadAction', this.qualifications)
+            }, err => {
+              console.log(err)
+            })
         }
-        this.$http.post('/api/images', param, config)
-          .then(response => {
-            this.qualifications.url = response.data[0].path
-            this.$emit('uploadAction', this.qualifications.url)
-          }, err => {
-            console.log(err)
-            this.$message.error('图片上传失败,请重试')
-          })
       },
       showImg (imgUrl) {
-        this.qualifications.url = imgUrl
-        this.isShow = true
+        if (!this.isPdf) {
+          this.qualifications.url = imgUrl
+          this.isShow = true
+        } else {
+          window.open(imgUrl)
+        }
       },
       deleteImg () {
         this.qualifications.url = ''
-        this.$emit('uploadAction', this.qualifications.url)
+        this.qualifications.type = this.typeData
+        this.$emit('uploadAction', this.qualifications)
       }
     }
   }
 </script>
+<style>
+
+</style>

+ 6 - 6
components/default/Footer.vue

@@ -5,17 +5,17 @@
         <div class="item">
           <h5>用户指南</h5>
           <ul class="list-unstyled">
-            <li><a href="http://www.usoftmall.com/help#/issue/50" target="_blank">服务条款</a></li>
-            <li><a href="http://www.usoftmall.com/help#/issue/16" target="_blank">买卖条例</a></li>
-            <li><a href="http://www.usoftmall.com/help#/issue/51" target="_blank">代收代付协议</a></li>
+            <li><a href="http://www.usoftmall.com/help/helpDetail/50" target="_blank">服务条款</a></li>
+            <li><a href="http://www.usoftmall.com/help/helpDetail/16" target="_blank">买卖条例</a></li>
+            <li><a href="http://www.usoftmall.com/help/helpDetail/51" target="_blank">代收代付协议</a></li>
           </ul>
         </div>
         <div class="item">
           <h5>关于我们</h5>
           <ul class="list-unstyled">
-            <li><a href="http://www.usoftmall.com/help#/issue/1" target="_blank">公司简介</a></li>
-            <li><a href="http://www.usoftmall.com/help#/issue/28" target="_blank">公司地址</a></li>
-            <li><a href="http://www.usoftmall.com/help#/issue/1" target="_blank">联系我们</a></li>
+            <li><a href="http://www.usoftmall.com/help/helpDetail/1" target="_blank">公司简介</a></li>
+            <li><a href="http://www.usoftmall.com/help/helpDetail/28" target="_blank">公司地址</a></li>
+            <li><a href="http://www.usoftmall.com/help/helpDetail/1" target="_blank">联系我们</a></li>
           </ul>
         </div>
         <div class="item">

+ 55 - 12
components/default/Header.vue

@@ -10,13 +10,15 @@
         </div>
         <div class="navbar-right">
           <template v-if="user.logged">
-            <div class="item-wrap dropdown">
+            <div class="item-wrap dropdown" @mouseleave="showEnterprises = false">
               <div class="item dropdown-toggle">
-                欢迎您,{{ user.data.userName }}&nbsp;<a @click="logout()">[退出]</a>
+                欢迎您,{{ user.data.userName }}&nbsp;|&nbsp;
+                <a @click="logout()">[退出]</a>
+                <span>{{enterprise.enName}}</span>
               </div>
               <ul class="dropdown-menu">
                 <li class="menu-item-first">
-                  <span class="member-text" :title="enterprise.enName"><i class="fa fa-map-marker"></i>&nbsp;{{ enterprise.enName }}</span>
+                  <span class="member-text" :title="enterprise.enName"><i class="fa fa-map-marker"></i>&nbsp;{{ enterprise.uu?enterprise.enName: user.data.userName + '(个人账户)' }}</span>
                   <a class="pull-right" @click="toggleEnterprises()" v-if="user.data.enterprises && user.data.enterprises.length > 0">
                     {{ showEnterprises ? '取消' : '切换' }}
                   </a>
@@ -26,7 +28,7 @@
                     v-if="showEnterprises && en.uu!=enterprise.uu">
                   <a @click="switchEnterprise(en)" :title="en.enName">{{ en.enName }}</a>
                 </li>
-                <li class="menu-item"  v-if="showEnterprises">
+                <li class="menu-item"  v-if="showEnterprises && enterprise.uu">
                   <a @click="switchEnterprise({uu: 0})"><span v-text="user.data.userName"></span>(个人账户)</a>
                 </li>
               </ul>
@@ -37,7 +39,7 @@
             <!--<a class="item" :href="url + '/user'">买家中心</a>
             <a class="item" :href="url + '/vendor'">卖家中心</a>-->
             <a class="item" href="/user#/index">买家中心</a>
-            <a class="item" href="/vendor#/index" v-if="enterprise.uu">卖家中心</a>
+            <a class="item" @click="toVendor">卖家中心</a>
           </template>
           <template v-else>
             <a class="item" @click="onLoginClick()">登录</a>
@@ -66,9 +68,9 @@
       enterprise () {
         let ens = this.user.data.enterprises
         if (ens && ens.length) {
-          return ens.find(item => item.current) || {enName: this.user.data.userName + '个人账户'}
+          return ens.find(item => item.current) || {enName: '个人账户'}
         } else {
-          return {enName: this.user.data.userName + '个人账户'}
+          return {enName: '个人账户'}
         }
       },
       url () {
@@ -79,7 +81,7 @@
       logout () {
         this.$http.get('/logout/crossBefore').then(response => {
           if (response.data) {
-            window.location.href = response.data.logoutUrl + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
+            window.location.href = response.data.logoutUrl + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
           }
         })
       },
@@ -106,8 +108,38 @@
         this.toggleEnterprises()
         this.$http.get(`/user/authentication/${en.uu}`).then(() => {
           this.$store.dispatch('loadUserInfo')
-//          window.location.reload()
+          let href = window.location.href
+          let hrefPath = href.slice(href.length - 14, href.length)
+          if (hrefPath === 'register-saler' && en.uu !== 0 && en.isVendor === 313) {
+            window.location.href = '/vendor#/index'
+          } else {
+            window.location.reload()
+          }
         })
+      },
+      toVendor: function () {
+        let isSelf = true
+        let tempEnterprise = {}
+        let ens = this.user.data.enterprises
+        if (ens && ens.length) {
+          ens.forEach(function (item) {
+            if (item.current) {
+              isSelf = false
+              tempEnterprise = item
+            }
+          })
+        } else {
+          isSelf = true
+        }
+        if (isSelf) {
+          window.location.href = '/register-saler'
+        } else {
+          if (tempEnterprise.isVendor === 313) {
+            window.location.href = '/vendor#/index'
+          } else {
+            window.location.href = '/register-saler'
+          }
+        }
       }
     },
     beforeMount () {
@@ -209,9 +241,20 @@
 
             .dropdown-toggle {
               line-height: $nav-height;
-
-              a:hover {
-                color: $red !important;
+              a {
+                margin-left: 15px;
+                float: right;
+                &:hover {
+                  color: $red !important;
+                }
+              }
+              span {
+                display: inline-block;
+                max-width: 190px;
+                overflow: hidden;
+                text-overflow: ellipsis;
+                white-space: nowrap;
+                float: right;
               }
             }
 

+ 11 - 11
components/home/Advert.vue

@@ -22,37 +22,37 @@
           spaceBetween: 20
         },
         adverts: [{
-          url: 'http://www.usoftmall.com/store/worldshine#/home',
+          url: 'http://www.usoftmall.com/store/worldshine',
           img: '/images/adverts/1.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/adtracon#/home',
+          url: 'http://www.usoftmall.com/store/adtracon',
           img: '/images/adverts/2.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/compa#/home',
+          url: 'http://www.usoftmall.com/store/compa',
           img: '/images/adverts/3.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/corestaff#/home',
+          url: 'http://www.usoftmall.com/store/corestaff',
           img: '/images/adverts/4.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/chipled#/home',
+          url: 'http://www.usoftmall.com/store/chipled',
           img: '/images/adverts/5.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/opd#/home',
+          url: 'http://www.usoftmall.com/store/opd',
           img: '/images/adverts/6.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/jrxy#/home',
+          url: 'http://www.usoftmall.com/store/jrxy',
           img: '/images/adverts/7.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/hbt#/home',
+          url: 'http://www.usoftmall.com/store/hbt',
           img: '/images/adverts/8.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/yjycoin#/home',
+          url: 'http://www.usoftmall.com/store/yjycoin',
           img: '/images/adverts/9.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/d3567635164a4811a5ba9e9adbcdcc87#/home',
+          url: 'http://www.usoftmall.com/store/d3567635164a4811a5ba9e9adbcdcc87',
           img: '/images/adverts/10.jpg'
         }, {
-          url: 'http://www.usoftmall.com/store/winsen#/home',
+          url: 'http://www.usoftmall.com/store/winsen',
           img: '/images/adverts/11.jpg'
         }]
       }

+ 13 - 14
components/main/count/Box.vue

@@ -32,21 +32,20 @@
       counts () {
         return this.$store.state.product.common.counts
       }
+    },
+    mounted () {
+      this.$nextTick(() => {
+        // 刷新统计信息
+        setInterval(() => {
+          this.loadCounts()
+        }, 30000)
+      })
+    },
+    methods: {
+      loadCounts () {
+        this.$store.dispatch('loadProductCounts', { _status: 'actived' })
+      }
     }
-//    mounted () {
-//      this.$nextTick(() => {
-//        this.loadCounts()
-//        // 刷新统计信息
-//        setInterval(() => {
-//          this.loadCounts()
-//        }, 30000)
-//      })
-//    },
-//    methods: {
-//      loadCounts () {
-//        this.$store.dispatch('loadProductCounts', { _status: 'actived' })
-//      }
-//    }
   }
 </script>
 <style lang="scss" scoped>

+ 1 - 0
components/news/Right.vue

@@ -108,6 +108,7 @@
     display: table-cell;
     vertical-align: middle;
     border-bottom: 1px dashed #ccc;
+    width: 717px;
   }
   .thumbnail-news {
     width: 160px;

+ 45 - 2
components/product/ComponentGoods.vue

@@ -101,8 +101,16 @@
         </td>
       </tr>
       <tr v-if="componentGoods.totalElements == 0">
-        <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;">
-          <i class="fa fa-smile-o fa-lg"></i> 暂无产品信息
+        <td colspan="12">
+          <div class="empty">
+            <p class="empty-img">
+              <img src="/images/brandList/empty-cart.png">
+            </p>
+            <div class="empty-info">
+              <p class="grey"> 暂无产品信息 </p>
+              <a href="javascript:history.go(-1)"><i class="fa fa-mail-reply fa-xs"></i>返回上一页</a>
+            </div>
+          </div>
         </td>
       </tr>
       </tbody>
@@ -205,6 +213,41 @@
 </script>
 
 <style scoped>
+  /**/
+  .product-list tbody>tr .empty{
+    overflow: hidden;
+    margin: 0!important;
+    height:130px;
+    display:inline-flex;
+    align-items: center;
+  }
+  .product-list tbody>tr .empty .empty-img{
+    margin:0;
+    border:0;
+    min-width:143px;
+    min-height:72px;
+  }
+  .product-list tbody>tr .empty .empty-img img {
+    margin: 0;
+    border: 0;
+    min-width: 143px;
+    min-height: 72px;
+  }
+  .product-list tbody>tr .empty-info{
+    line-height: 14px;
+    width: 143px;
+  }
+  .product-list tbody>tr .grey{
+    color: #999;
+    font-size: 14px;
+  }
+  .product-list tbody>tr .empty .empty-info>a{
+    font-size: 14px;
+    color: #5078cb;
+  }
+  .product-list tbody>tr .empty .empty-info i{
+    margin-right:5px;
+  }
   .product-list{
     width: 1190px;
     margin-bottom: 20px;

+ 244 - 22
components/product/component/ComponentDetail.vue

@@ -14,38 +14,72 @@
           </div>
           <div class="hr-grey"></div>
           <div class="row">
-            <div class="form-group row" v-if="list.kind">
-              <div class="message-item">类目</div>
+            <div class="message-detail" v-if="list.brand">
+              <div class="message-item">品牌</div>
               <div class="colon">:</div>
-              <div><a class="message-body blue" target="_blank" :href="`/product/kind/${list.kindid}`">{{list.kind.nameCn}}</a></div>
+              <div :title="list.brand.nameCn"><a class="message-body blue" target="_blank" :href="`/product/brand/${list.brand.uuid}`">{{list.brand.nameCn}}</a></div>
             </div>
-            <div class="form-group row" v-if="list.brand">
-              <div class="message-item">品牌</div>
+            <div class="message-detail">
+              <div class="message-item">产品生命周期</div>
               <div class="colon">:</div>
-              <div><a class="message-body blue" target="_blank" :href="`/product/brand/${list.brand.uuid}`">{{list.brand.nameCn}}</a></div>
+              <div class="message-body">
+                {{list.lifecycle | lifecycleFilter}}
+              </div>
             </div>
-            <div class="form-group row">
+            <div class="message-detail">
               <div class="message-item">总库存量</div>
               <div class="colon">:</div>
               <div class="message-body">{{list.reserve || '暂无库存'}}</div>
             </div>
-            <div class="form-group row">
-              <div class="message-item">封装</div>
-              <div class="colon">:</div>
-              <div class="message-body">{{list.encapsulation || '暂无信息'}}</div>
+            <div class="message-detail">
+              <div class="message-item">产品描述</div>
+              <div class="colon" style="margin-right: 17px">:</div>
+              <div class="description"
+                   :class="{'more-description':showMoreDesc}"
+                   v-if="list.description">
+                {{[list.description, showMoreDesc] | descriptionFilter}}
+                <span @click="showMoreDesc = !showMoreDesc" v-if="list.description.length > 30">
+                  <img :src="!showMoreDesc?'/images/component/circle-arrow-down.png':'/images/component/circle-arrow-up.png'" alt="">
+                  <!--<i class="iconfont" :class="{'icon-shouqi':showMoreDesc,'icon-shouqi1':!showMoreDesc}"></i>-->
+                  <span v-text="showMoreDesc ? '收起' : '展开'"></span>
+                </span>
+              </div>
+              <div class="description" v-if="!list.description">-</div>
             </div>
-            <div class="form-group row">
-              <div class="message-item">下载</div>
+            <div class="message-detail">
+              <div class="message-item">规格书</div>
               <div class="colon">:</div>
-              <div class="message-body"><a @click="toAttach(list.attach)" v-if="list.attach">规格书</a><span v-if="!list.attach">暂无规格书</span></div>
+              <div class="message-body">
+                <img src="/images/all/pdf.png" alt="" @click="toAttach(list.attach)" v-if="list.attach">
+                <span v-if="!list.attach">暂无</span>
+              </div>
             </div>
+            <div class="message-detail"></div>
             <div class="form-group">
-               <button type="text" v-if="!collectList" @click="collect(list.id)" class="btn btn-default btn-stroe" style="line-height: 26px;">加入收藏</button>
-               <button class="btn btn-default btn-stroe" v-if="collectList" disabled="disabled">已收藏</button>
+               <button type="text" v-if="!collectList" @click="collect(list.id)" class="btn btn-default btn-store">加入收藏</button>
+               <button class="btn btn-default btn-store" v-if="collectList" disabled="disabled">已收藏</button>
             </div>
           </div>
         </div>
       </div>
+      <div class="product-params">
+        <p class="product-params-header">产品参数<span>(仅供参考,以实际产品为准)</span>
+          <span v-if="list.properties && list.properties.length > 6" class="show-more-param" @click="showMoreParam = !showMoreParam"><span>{{showMoreParam?'收起':'更多'}}</span><i class="fa" :class="{'fa fa-angle-down': !showMoreParam,'fa fa-angle-up': showMoreParam }"></i></span>
+        </p>
+        <ul v-if="list.properties && (list.properties.length > 1 || (list.properties.length == 1 && list.properties[0].value))">
+          <li v-for="prop in properties">
+            <span>{{prop.property.labelCn || '-'}}</span>
+            <span :title="prop.value&&prop.value.length > 25 ? switchParams(prop.value, 0): ''">{{prop.value || '-'}}</span>
+          </li>
+          <li v-if="!isEven(properties.length)">
+            <span>-</span>
+            <span>-</span>
+          </li>
+        </ul>
+        <div class="empty-param" v-else>
+          <img src="/images/all/empty-cart.png" alt="">该产品暂无参数
+        </div>
+      </div>
     </div>
     <!--关注-->
     <el-dialog
@@ -68,7 +102,9 @@
     name: 'ComponentDetail',
     data () {
       return {
-        dialogVisible: false
+        dialogVisible: false,
+        showMoreDesc: false,
+        showMoreParam: false
       }
     },
     computed: {
@@ -78,6 +114,9 @@
       list () {
         return this.lists.data
       },
+      properties () {
+        return this.list.properties && this.list.properties.length > 6 ? this.showMoreParam ? this.list.properties : this.list.properties.slice(0, 6) : this.list.properties
+      },
       user () {
         return this.$store.state.option.user
       },
@@ -96,12 +135,39 @@
         } else {
           return false
         }
+      },
+      stores () {
+        return this.$store.state.componentStore.store.data
+      },
+      store () {
+        return this.stores[0] ? this.stores[0] : []
       }
     },
 //    components: {
 //      ComponentMenu
 //    },
+    filters: {
+      descriptionFilter: function ([str, type]) {
+        return !type ? str.length > 30 ? str.substring(0, 30) : str : str
+      },
+      lifecycleFilter: function (code) {
+        if (code === 815) {
+          return '正常'
+        } else if (code === 816) {
+          return '即将停产'
+        } else if (code === 817) {
+          return '停产'
+        } else if (code === 818) {
+          return '新品'
+        } else {
+          return '-'
+        }
+      }
+    },
     methods: {
+      isEven: function (num) {
+        return num % 2 === 0
+      },
       collect (id) {
         if (this.user.logged) {
           this.dialogVisible = true
@@ -126,7 +192,28 @@
         } else {
           window.open(url)
         }
+      },
+      switchParams: function (str, index) {
+        let tmp = ''
+        if (str.length > index + 25) {
+          tmp += str.substring(index, index + 25)
+          tmp += '\n' + this.switchParams(str, index + 25)
+        } else {
+          tmp += str.substring(index, str.length - 1)
+        }
+        return tmp
       }
+//      getRealLen: function (str) {
+//        let len = 0
+//        for (let i = 0; i < str.length; i++) {
+//          if (str.charCodeAt(i) > 127 || str.charCodeAt(i) === 94) {
+//            len += 2
+//          } else {
+//            len++
+//          }
+//        }
+//        return len
+//      }
     }
   }
 </script>
@@ -157,7 +244,7 @@
     padding: 0;
   }
   .detail{
-    margin-bottom: 20px;
+    margin-bottom: 36px;
   }
   .componentDetail .container .component-img {
     width: 260px;
@@ -199,13 +286,12 @@
     background-color: #ccc;
   }
   .componentDetail .container .component-message .row {
-    margin: 12px 0;
-    width: 890px;
-    height: 16px;
+    margin: 18px 0 0 0;
+    position: relative;
   }
   .componentDetail .container .component-message .message-item {
     float:left;
-    width:60px;
+    min-width: 60px;
     text-align: justify;
     text-align-last: justify;
     font-size: 14px;
@@ -217,6 +303,46 @@
   .componentDetail .container .component-message .message-body {
     float: left;
     font-size: 14px;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    width: 93px;
+  }
+  .componentDetail .container .component-message .message-body >img {
+    cursor: pointer;
+  }
+  .componentDetail .container .component-message .description {
+    position: relative;
+  }
+  .componentDetail .container .component-message .description >span {
+    cursor: pointer;
+    display: inline-block;
+    float: right;
+    position: relative;
+    bottom: 2px;
+  }
+  .componentDetail .container .component-message .description >span >img {
+    vertical-align: middle;
+  }
+  .componentDetail .container .component-message .description >span >span {
+    color: #5078cb;
+    vertical-align: middle;
+  }
+  .componentDetail .container .component-message .description.more-description {
+    padding: 13px 13px 30px 13px;
+    border: 1px solid #e5e5e5;
+    border-top: none;
+    position: absolute;
+    right: 94px;
+    width: 508px;
+    background: #f5f6f8;
+    z-index: 1;
+    line-height: 22.7px;
+  }
+  .componentDetail .container .component-message .description.more-description >span {
+    position: absolute;
+    right: 10px;
+    bottom: 7px;
   }
   .componentDetail .container .component-message .message-body a {
     color: #337ab7;
@@ -272,4 +398,100 @@
     max-width: 95px;
     max-height: 46px;
   }
+  .componentDetail .btn-store {
+    width: 82px;
+    height: 30px;
+    color: #fff;
+    background: #5078cb;
+    border: 1px solid #5078cb;
+    position: relative;
+    top: 27px;
+  }
+  .product-params {
+    width: 100%;
+  }
+  .product-params .product-params-header {
+    height: 34px;
+    line-height: 34px;
+    background: #d8e5ff;
+  }
+  .product-params p.product-params-header {
+    margin-bottom: 0;
+    padding-left: 9px;
+    font-weight: bold;
+  }
+  .product-params p.product-params-header span {
+    font-size: 12px;
+  }
+  .product-params p.product-params-header .show-more-param {
+    float: right;
+    font-weight: normal;
+    font-size: 14px;
+    margin-right: 16px;
+    cursor: pointer;
+    height: 34px;
+  }
+  .product-params >ul {
+    background: #fff;
+    margin-bottom: 37px;
+  }
+  .product-params >ul li {
+    display: inline-block;
+    border-bottom: 1px solid #e5e5e5;
+    float: left;
+  }
+  .product-params >ul li span {
+    display: inline-block;
+    width: 297.2px;
+    height: 32px;
+    line-height: 32px;
+    text-align: center;
+    border-right: 1px solid #e5e5e5;
+    vertical-align: middle;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
+    padding: 0 15px;
+    float: left;
+  }
+  .product-params >ul li span:nth-child(1) {
+    font-weight: bold;
+  }
+  .product-params >ul li:nth-child(odd) {
+    border-left: 1px solid #e5e5e5;
+  }
+  .product-params >ul li:nth-child(4n), .product-params >ul li:nth-child(4n-1) {
+    background: #f5f6f8;
+  }
+  .component-message .message-detail {
+    display: inline-block;
+    height: 48px;
+    line-height: 48px;
+    border-left: 1px solid #e5e5e5;
+    border-bottom: 1px solid #e5e5e5;
+    width: 300px;
+    overflow: hidden;
+    padding: 0 11px;
+    vertical-align: middle;
+  }
+  .component-message .message-detail:nth-child(even) {
+    width: 596px;
+    border-right: 1px solid #e5e5e5;
+  }
+  .component-message .message-detail:nth-child(odd) {
+    width: 200px;
+  }
+  .component-message .message-detail:nth-child(1),.component-message .message-detail:nth-child(2) {
+    border-top: 1px solid #e5e5e5;
+  }
+  .component-message .message-detail:nth-child(4n),.component-message .message-detail:nth-child(4n-1) {
+    background: #f5f6f8;
+  }
+  .empty-param {
+    text-align: center;
+    padding: 20px 0;
+    color: #999;
+    font-size: 12px;
+    border: 1px solid #ddd;
+  }
 </style>

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

@@ -125,7 +125,17 @@
             </td>
           </tr>
           <tr v-if="!storeList.content || storeList.content.length == 0">
-            <td colspan="10" class="text-center" style="line-height: 40px; font-size: 14px;"><i class="fa fa-smile-o fa-lg"></i> 暂无现货</td>
+            <td colspan="12">
+              <div class="empty">
+                <p class="empty-img">
+                  <img src="/images/brandList/empty-cart.png">
+                </p>
+                <div class="empty-info">
+                  <p class="grey"> 暂无现货信息 </p>
+                  <a href="javascript:history.go(-1)"><i class="fa fa-mail-reply fa-xs"></i>返回上一页</a>
+                </div>
+              </div>
+            </td>
           </tr>
         </tbody>
       </table>
@@ -298,15 +308,15 @@
   }
   .storeInfo .storeIn a,.componentDetail .storeIn-active a {
     display: table-cell;
-    height: 46px;
+    height: 49px;
     width: 98px;
-    line-height: 46px;
     text-align: center;
     vertical-align: middle;
   }
   .storeInList .choose a img{
     max-width: 95px;
-    max-height: 46px;
+    max-height: 45px;
+    margin-bottom: 1px;
   }
   a.storeLogo>img,.storeIn-active a.storeLogo>img {
     max-width: 95px;
@@ -327,6 +337,7 @@
   }
   .storeInfo .goodsList thead {
     background-color: #F7F7F7;
+    border:2px solid #f7f7f7;
   }
   .storeInfo .goodsList tbody tr td{
     vertical-align: middle;
@@ -397,4 +408,27 @@
     text-align: left;
     color: #333;
   }
+  /**/
+  .storeInfo .empty{
+    overflow: hidden;
+    margin: 0!important;
+    height:130px;
+    display:inline-flex;
+    align-items: center;
+  }
+  .storeInfo .empty-info{
+    line-height: 14px;
+    width: 143px;
+  }
+  .empty-info .grey{
+    color: #999;
+    font-size: 14px;
+  }
+  .storeInfo .empty .empty-info>a{
+    font-size: 14px;
+    color: #5078cb;
+  }
+  .storeInfo .empty .empty-info i{
+    margin-right:5px;
+  }
 </style>

+ 17 - 0
components/register-saler/RegHeader.vue

@@ -0,0 +1,17 @@
+<template>
+  <div>
+    <h3 class="h3">成为优软卖家有什么好处?</h3>
+    <div class="row header-title">
+      <div class="col-md-6">
+        <img src="/images/register/open-store.jpg" alt="">
+        <h4>免费开店</h4>
+        <p>申请开店完全免费,一个企业只能开一家店,申请到正式开通预计需1-3个工作日。</p>
+      </div>
+      <div class="col-md-6">
+        <img src="/images/register/seller.jpg" alt="">
+        <h4>库存寄售</h4>
+        <p>无需开店,即可发布贵司仓库里的滞销产品,优软商城代为销售,匿名清仓无压力。</p>
+      </div>
+    </div>
+  </div>
+</template>

+ 189 - 0
components/register-saler/Register.vue

@@ -0,0 +1,189 @@
+<template>
+  <div>
+    <div class="step-menu">
+      <ul class="x-step">
+        <li :class="section >= 1?'active':''" >第一步:完善企业信息
+          <i class="x-split"></i></li>
+        <li :class="section >= 2?'active':''" >第二步:阅读相关条例
+          <i class="x-split"></i></li>
+        <li :class="section >= 3?'active':''" >第三步:提交申请</li>
+      </ul>
+    </div>
+    <div class="tab-list">
+      <step-first v-show="section == 1"
+                  @sectionEvent="sectionChange"
+                  @registerAction="onRegister"
+                  :loginData="loginData"
+                  :enterpriseData="enterpriseData"
+                  :businessImgUrl="businessImgUrl"
+                  @businessImgUrlAction="onBusinessImgUrl"
+                  @isSelfCacheDataAction="onCacheData"></step-first>
+      <step-second v-show="section == 2"
+                   @sectionEvent="sectionChange"
+                   :checkData="checkData"
+                   :loginData="loginData"
+                   :cacheData="cacheData"></step-second>
+      <step-third v-show="section == 3"
+                  @sectionEvent="sectionChange"
+                  :registerData="registerData"
+                  :enterpriseData="enterpriseData"
+                  :checkData="checkData"
+                  :businessImgUrl="businessImgUrl"
+                  @businessImgUrlAction="onBusinessImgUrl"
+                  :loginData="loginData"></step-third>
+    </div>
+    </div>
+</template>
+<script>
+  import StepFirst from '~components/register-saler/register/StepFirst.vue'
+  import StepSecond from '~components/register-saler/register/StepSecond.vue'
+  import StepThird from '~components/register-saler/register/StepThird.vue'
+  export default {
+    data () {
+      return {
+        section: 1,
+        checkData: {
+          checked: false
+        },
+        registerData: {
+          enterprise: {},
+          c: false,
+          url: ''
+        },
+        loginData: {
+          isSelf: true,
+          section: 1,
+          enterprise: {}
+        },
+        cacheData: {},
+        enterpriseData: {},
+        businessImgUrl: ''
+      }
+    },
+    components: {
+      StepFirst,
+      StepSecond,
+      StepThird
+    },
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      }
+    },
+    created () {
+      let ens = this.user.data.enterprises
+      let isSelf = true
+      let tempEnterprise = {}
+      if (ens && ens.length) {
+        ens.forEach(function (item) {
+          if (item.current) {
+            isSelf = false
+            tempEnterprise = item
+          }
+        })
+      } else {
+        isSelf = true
+      }
+      if (!isSelf) {
+        this.$http.get('/basic/enterprise/' + tempEnterprise.uu + '/detailInfo')
+          .then(response => {
+            this.enterpriseData = response.data
+          })
+        if (tempEnterprise.isVendor === 1690) { // 是企业
+          this.section = 3
+          this.checkData.checked = true
+        } else if (typeof tempEnterprise.isVendor === 'undefined' || tempEnterprise.isVendor === '') {
+          this.section = 2
+          this.checkData.checked = false
+        }
+      } else { // 是个人
+        this.$http.get('/basic/user/userCacheEnterprise')
+          .then(response => {
+            if (!response.data) {
+              this.section = 1
+              this.checkData.checked = false
+            } else if (!response.data.enIsRead) {
+              this.section = 2
+              this.checkData.checked = false
+              this.enterpriseData = response.data
+            } else if (response.data.enIsRead) {
+              this.section = 3
+              this.checkData.checked = true
+              this.enterpriseData = response.data
+            }
+          })
+      }
+      this.loginData.isSelf = isSelf
+      this.loginData.section = this.section
+      this.loginData.enterprise = tempEnterprise
+    },
+    methods: {
+      sectionChange: function (num) {
+        this.section = num
+      },
+      onRegister: function (data) {
+        this.registerData.isValidRegister = data.isValidRegister
+        this.registerData.enterprise = data.enterprise
+        this.registerData.url = data.url
+      },
+      onCacheData: function (cache) {
+        this.cacheData = cache
+      },
+      onBusinessImgUrl: function (url) {
+        this.businessImgUrl = url
+      }
+    }
+  }
+</script>
+<style>
+  .x-step .x-split {
+    float: right;
+  }
+  .x-step li.active .x-split:before {
+    border-left-color: #5078cb;
+    right: -17px;
+    z-index: 4;
+  }
+
+  .x-step li .x-split:before {
+    border-left-color: #e8e8e8;
+    right: -16px;
+    z-index: 2;
+  }
+  .x-step .x-split:before {
+    border-left-color: #e8e8e8;
+    right: -20px;
+    z-index: 2;
+  }
+  .x-step li .x-split:after {
+    border-left-color: #fff;
+    right: -18px;
+    z-index: 1;
+  }
+  .x-step .x-split:after {
+    /*border-left-color: #e8e8e8;*/
+    right: -17px;
+    z-index: 1;
+  }
+  .x-step li.active:after {
+    border-left-color: #5078cb;
+    right: -17px;
+  }
+  .x-step li.active:before {
+    /*border-left-color: #e8e8e8;*/
+    left: -17px;
+    z-index: 3;
+  }
+  .x-step li:first-child:before, .x-step li:last-child:after {
+    border-width: 0;
+  }
+  .x-step li.active:before, .x-step li.active:after, .x-step .x-split:before, .x-step .x-split:after {
+    position: absolute;
+    top: 0;
+    display: inline-block;
+    border-top: 17px solid transparent;
+    border-bottom: 17px solid transparent;
+    border-left: 17px solid transparent;
+    content: '';
+  }
+</style>

+ 7 - 0
components/register-saler/index.js

@@ -0,0 +1,7 @@
+import RegHeader from './RegHeader.vue'
+import Register from './Register.vue'
+import StepFirst from './register/StepFirst.vue'
+import StepSecond from './register/StepSecond.vue'
+import StepThird from './register/StepThird.vue'
+
+export { RegHeader, Register, StepFirst, StepSecond, StepThird }

+ 894 - 0
components/register-saler/register/StepFirst.vue

@@ -0,0 +1,894 @@
+<template>
+  <!--填写注册信息-->
+  <div class="section" @click="onHideBox">
+    <div class="register">
+      <div class="x-form-set-header">
+        <h4>企业基本信息</h4>
+      </div>
+      <div class="row">
+        <label class="col-sm-2 x-required">企业名称:</label>
+        <div class="col-sm-5">
+          <input :class="!validName.isValidTypeName || !validName.isValidName?'form-control error-box-border':'form-control'" type="text" @change="nameCheck(3)" @input="nameTypeCheck()" :disabled="!loginData.isSelf" v-model="data.name" name="name" required="" placeholder="填写营业执照上的企业名称">
+        </div>
+        <div class="x-text-help" v-show="validName.isValidTypeName && validName.isValidName && !validName.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validName.isValidTypeName && !validName.init">
+          <p>
+            <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~99个字符
+          </p>
+        </div>
+        <div class="col-sm-5" v-show="!validName.isValidName && !validName.init">
+          <p>
+            <i class="fa fa-info-circle"></i>注册的企业名称已存在,请联系管理员
+          </p>
+        </div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2 x-required">营业执照号:</label>
+        <div class="col-sm-5">
+          <input type="text" :class="!validLicence.isValidLicence?'form-control error-box-border':'form-control'" :disabled="!loginData.isSelf" @input="validLicence.init=false" @change="licenceCheck(3)" v-model="data.licenceId" name="name" required="" placeholder="请填写营业执照上的注册号">
+        </div>
+        <div class="x-text-help" v-show="validLicence.isValidLicence && !validLicence.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validLicence.isValidLicence && !validLicence.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的注册号</p></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2 x-required">营业执照:</label>
+        <div class="col-sm-5">
+          <a class="x-btn-blank" v-if="loginData.isSelf" title="请上传营业执照扫描件(≤5M的图片或PDF)">
+            <i class="fa fa-picture-o"></i>
+            请上传营业执照扫描件(≤5M的图片或PDF)
+            <input type="file" @change="upload" class="form-control file-input" name="name" required="" placeholder="请上传营业执照扫描件(≤5M的图片或PDF)" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf">
+          </a>
+          <img class="previewImg" v-if="data.url != ''" :src="isPdf?'/images/all/timg.png':data.url" alt="">
+        </div>
+        <div class="x-text-help" v-show="validUpload.isValidUpload && !validUpload.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2 x-required">法定代表人:</label>
+        <div class="col-sm-5">
+          <input type="text" :disabled="!loginData.isSelf" :class="!validLawPerson.isValidLawPerson?'form-control error-box-border':'form-control'" @input="lawPersonCheck()" v-model="data.lawPerson" name="name" required="" placeholder="请填写营业执照上的法定代表人">
+        </div>
+        <div class="x-text-help" v-show="validLawPerson.isValidLawPerson && !validLawPerson.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validLawPerson.isValidLawPerson && !validLawPerson.init"><p><i class="fa fa-info-circle"></i>请填写营业执照上的法定代表人</p></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2 x-required">企业地址:</label>
+        <div class="col-sm-5">
+          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowAddress" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;background-color: transparent;">
+          <span class="fa fa-map-marker"></span>
+          <div v-show="showAddressBox"
+               @mouseenter="isInAddressBox = true"
+               @mouseleave="isInAddressBox = false"
+               style="display: block; left: 14px;" class="dropdown-menu x-union-menu" aria-labelledby="address">
+            <div class="x-union-header">
+              <div>省份</div>
+              <div>城市</div>
+              <div>县区</div>
+              <div class="x-item-ext">详细地址</div>
+            </div>
+            <div class="x-union-list">
+              <ul class="list-unstyled">
+                <li v-for="province in cityData.province"
+                    :class="province == address.currentProvince ? 'active' : ''"
+                    v-text="province"
+                    @click="getCity(province)"></li>
+              </ul>
+              <ul class="list-unstyled">
+                <li v-for="city in cityData.city"
+                    :class="city == address.currentCity ? 'active' : ''"
+                    v-text="city"
+                    @click="getDistrict(city)"></li>
+              </ul>
+              <ul class="list-unstyled">
+                <li v-for="district in cityData.district"
+                    v-text="district"
+                    :class="district == address.currentDistrict ? 'active' : ''"
+                    @click="chooseDistrict(district)"></li>
+              </ul>
+              <div class="x-item-ext">
+                <div class="form-group">
+                  <div class="col-sm-12">
+                    <textarea id="street" name="street" rows="4" v-model="address.detail" class="form-control x-input" placeholder="xx路xx大厦xx栋xx楼xx室"></textarea>
+                  </div>
+                </div>
+                <div class="text-right">
+                  <a class="register-btn btn-submit" @click="submitAddress">确定</a> <a @click="showAddressBox = false" class="register-btn btn-console">取消</a>
+                </div>
+              </div>
+            </div>
+          </div>
+        </div>
+        <div class="x-text-help" v-show="validAddress.isValidAddress && !validAddress.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validAddress.isValidAddress && !validAddress.init"><p><i class="fa fa-info-circle"></i>填写总部所在地详细地址</p></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">联系人:</label>
+        <div class="col-sm-5">
+          <input type="text" :disabled="!loginData.isSelf" class="form-control" title="请填写企业对外的联系人,为空则默认为管理员" v-model="data.linkman" name="name" required="" placeholder="请填写企业对外的联系人,为空则默认为管理员">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">联系电话:</label>
+        <div class="col-sm-5">
+          <input :disabled="!loginData.isSelf" :class="!validPhone.isValidPhone?'form-control error-box-border':'form-control'" type="text" v-model="data.phone" @input="phoneCheck()" name="name" required="" placeholder="例如:13838883888">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">邮箱:</label>
+        <div class="col-sm-5">
+          <input type="text" :disabled="!loginData.isSelf" :class="!validEmail.isValidEmail?'form-control error-box-border':'form-control'" v-model="data.email" @input="emailCheck()" required="" placeholder="例如:123123@usoft.com">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">企业传真:</label>
+        <div class="col-sm-5">
+          <input type="text" :disabled="!loginData.isSelf" :class="!validFax.isValidFax?'form-control error-box-border':'form-control'" v-model="data.fax" @input="faxCheck()" required="" placeholder="例如:0755-268XXXXX">
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">企业官网:</label>
+        <div class="col-sm-5">
+          <input type="text" :disabled="!loginData.isSelf" class="form-control" v-model="data.website" name="name" required="" placeholder="www.usoftchina.com" style="padding-left:55px;">
+          <span class="web">http://</span>
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2">行业:</label>
+        <div class="col-sm-5 select-dot">
+          <input type="text" readonly aria-haspopup="true" aria-expanded="false" @click="onShowProfession()" :style="!loginData.isSelf?'background-color: #eee;':''" :disabled="!loginData.isSelf" v-model="data.profession" class="form-control" name="name" required="" placeholder="请选择所在行业">
+          <div v-show="showProfessionBox"
+               @mouseenter="isInProfessionBox = true"
+               @mouseleave="isInProfessionBox = false"
+               style="display: block; left: 14px; width: 473px" class="dropdown-menu x-union-menu">
+            <div class="x-union-list">
+              <ul class="list-unstyled auto-width">
+                <li v-for="profession in professionData.profession"
+                    :class="profession == currentProfession.profession ? 'active' : ''"
+                    v-text="profession"
+                    @click="getProfessionDetail(profession)"></li>
+              </ul>
+              <ul class="list-unstyled auto-width">
+                <li v-for="detail in professionData.detail"
+                    :class="detail == currentProfession.detail ? 'active' : ''"
+                    v-text="detail"
+                    @click="chooseProfessionDetail(detail)"></li>
+              </ul>
+              <ul class="list-unstyled auto-width">
+                <li v-for="detail in professionData.thirdDetail"
+                    :class="detail == currentProfession.thirdDetail ? 'active' : ''"
+                    v-text="detail"
+                    @click="chooseProfessionThirdDetail(detail)"></li>
+              </ul>
+            </div>
+          </div>
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <!--<div class="row"  >
+        <label class="col-sm-2">企业LOGO:</label>
+        <div class="col-sm-5">
+          <input type="file" v-if="loginData.isSelf" @change="uploadLogo" class="form-control file-input upload-area" required="" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png">
+          <div class="logo-img-area">
+            <img class="preview-logo-img" :src="data.logoUrl && data.logoUrl != ''?data.logoUrl:'/images/all/upload-bg.png'" alt="">
+          </div>
+        </div>
+        <div class="col-sm-5"><p v-show="!validLogo.isValidLogo"><i class="fa fa-info-circle"></i>logo大小不能超过100K</p></div>
+        <div class="logo-text">个性化展示您的企业形象,图片不超过100Kb,建议宽x高=100x60</div>
+     &lt;!&ndash;   <div class="x-text-help" v-show="validUpload.isValidUpload && !validUpload.init">
+          <i class="glyphicon glyphicon-ok x-icon-left"></i>
+        </div>
+        <div class="col-sm-5" v-show="!validUpload.isValidUpload && !validUpload.init"><p><i class="fa fa-info-circle"></i>请上传营业执照扫描件(≤5M的图片或PDF)</p></div>&ndash;&gt;
+      </div>-->
+      <div class="row">
+        <label class="col-sm-2">经营范围标签:</label>
+        <div class="col-sm-8">
+          <div class="no-tags" v-if="!data.tagsData || data.tagsData.length == 0">暂无标签</div>
+          <div class="tags-list">
+            <ul>
+              <li v-for="(tag, index) in data.tagsData"><span v-text="tag"></span><i v-if="loginData.isSelf" class="glyphicon glyphicon-remove" @click="removeTag(index)"></i></li>
+            </ul>
+          </div>
+        </div>
+        <div class="col-sm-5 tags-box" v-if="loginData.isSelf">
+          <input type="text" @input="tagCheck()" class="form-control" v-model="tag" name="name" required="">
+          <span class="add-tag-btn" @click="addTags()" >+添加标签</span>
+        </div>
+        <div class="col-sm-5" v-if="loginData.isSelf">
+          <div class="x-text-tip">
+            <i class="glyphicon glyphicon-info-sign x-icon-left"></i>标签长度不超过10个字
+          </div>
+        </div>
+        <div class="col-sm-12 tags-lists" v-if="loginData.isSelf"><em class="pull-left">例如:</em><span>企业管理咨询</span><span>电子产品开发</span><span>货运代理</span></div>
+      </div>
+      <div class="row next-btn"><button class="btn" :style="loginData.isSelf && !isValid ? 'opacity: .65;':''" @click="sectionChange(2)">下一步</button></div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    data () {
+      return {
+        data: {
+          name: '',
+          lawPerson: '',
+          url: '',
+          licenceId: '',
+          address: '',
+          linkman: '',
+          phone: '',
+          email: '',
+          fax: '',
+          website: '',
+          profession: '',
+          logoUrl: '',
+          tagsData: []
+        },
+        validName: {
+          isValidTypeName: true,
+          isValidName: true,
+          init: true
+        },
+        validUpload: {
+          isValidUpload: true,
+          init: true
+        },
+        validLicence: {
+          isValidLicence: true,
+          init: true
+        },
+        validAddress: {
+          isValidAddress: true,
+          init: true
+        },
+        validLawPerson: {
+          isValidLawPerson: true,
+          init: true
+        },
+        validPhone: {
+          isValidPhone: true,
+          init: true
+        },
+        validEmail: {
+          isValidEmail: true,
+          init: true
+        },
+        validFax: {
+          isValidFax: true,
+          init: true
+        },
+        validLogo: {
+          isValidLogo: true,
+          init: true
+        },
+        isValid: false,
+        isPdf: false,
+        showAddressBox: false,
+        isInAddressBox: false,
+        showProfessionBox: false,
+        isInProfessionBox: false,
+        temCityData: {},
+        cityData: {
+          province: [],
+          city: [],
+          district: []
+        },
+        address: {
+          currentProvince: '',
+          currentCity: '',
+          currentDistrict: '',
+          detail: ''
+        },
+        tempProfession: {},
+        professionData: {
+          profession: [],
+          detail: [],
+          thirdDetail: []
+        },
+        currentProfession: {
+          profession: '',
+          detail: '',
+          thirdDetail: ''
+        },
+        tag: ''
+      }
+    },
+    props: ['loginData', 'enterpriseData', 'businessImgUrl'],
+    watch: {
+      enterpriseData: function (val, oldVal) {
+        if (val !== {}) {
+          if (this.loginData.isSelf) {
+            this.initSelfData(val)
+            this.nameCheck(3)
+            this.nameTypeCheck()
+            this.licenceCheck(3)
+            this.addressCheck()
+            this.imgUrlCheck()
+            this.lawPersonCheck()
+//            this.phoneCheck()
+//            this.emailCheck()
+//            this.faxCheck()
+            this.checkFullData()
+            this.submitRegisterData()
+          } else {
+            this.initEnterpriseData(val)
+          }
+        }
+      },
+      businessImgUrl: function (val, oldVal) {
+        this.data.url = val
+        this.checkFullData()
+        this.submitRegisterData()
+      }
+    },
+    mounted () {
+      this.$http.get('/data/city.json').then(response => {
+        this.temCityData = response.data
+        for (let province in response.data) {
+          this.cityData.province.push(province)
+        }
+      })
+      this.$http.get('/data/profession.json').then(response => {
+        this.tempProfession = response.data
+        for (let profession in response.data) {
+          this.professionData.profession.push(profession)
+        }
+      })
+    },
+    methods: {
+      initEnterpriseData: function (val) {
+        this.data.name = val.name || ''
+        this.data.licenceId = val.businessCode || ''
+        this.data.url = val.businessCodeImage || ''
+        this.data.lawPerson = val.corporation || ''
+        this.data.address = val.address || ''
+        this.data.website = val.url || ''
+        this.data.linkman = val.contactMan || ''
+        this.data.phone = val.contactTel || ''
+        this.data.email = val.contactEmail || ''
+        this.data.fax = val.fax || ''
+        this.data.logoUrl = val.logoImage || ''
+        this.data.profession = val.profession || ''
+//        this.data.tagsData = val.tags || []
+        if (typeof val.tags === 'string') {
+//          let tmp = val.tags || ''
+          this.data.tagsData = val.tags.split(',')
+        } else {
+          this.data.tagsData = []
+        }
+      },
+      initSelfData: function (val) {
+        this.data.name = val.name || ''
+        this.data.licenceId = val.licenceId || ''
+        this.data.url = val.url || ''
+        this.data.lawPerson = val.lawPerson || ''
+        this.data.address = val.address || ''
+        this.data.website = val.website || ''
+        this.data.linkman = val.linkman || ''
+        this.data.phone = val.phone || ''
+        this.data.email = val.email || ''
+        this.data.fax = val.fax || ''
+        this.data.logoUrl = val.logoUrl || ''
+        this.data.profession = val.profession || ''
+        if (typeof val.tagsData === 'string' || !val.tagsData) {
+          this.data.tagsData = val.tagsData.split(',') || []
+        } else {
+          this.data.tagsData = val.tagsData || []
+        }
+      },
+      sectionChange: function (type) {
+        if (this.loginData.isSelf && !this.isValid) {
+          this.$message.error('请填写正确的注册信息')
+        } else {
+          this.checkFullData()
+          let enterprise = this.data
+//          enterprise.tagsData = enterprise.tagsData.toString()
+          if (typeof this.data.tagsData === 'string') {
+            this.data.tagsData = this.data.tagsData.split(',')
+          }
+          let data = {}
+          data.enterprise = enterprise
+          data.isValidRegister = this.isValid
+          data.url = this.data.url
+          enterprise.enIsRead = false
+//          enterprise.enBussinessCodeImage = this.data.url
+          if (this.loginData.isSelf) {
+            this.$http.post('/basic/user/userCacheEnterprise', enterprise)
+            this.$emit('isSelfCacheDataAction', enterprise)
+          }
+          this.$emit('registerAction', data)
+          this.$emit('sectionEvent', type)
+          this.$emit('businessImgUrlAction', this.data.url)
+        }
+      },
+      upload: function (e) {
+        let file = e.target.files[0]
+        this.validUpload.init = false
+        if (file.size > 5 * 1024 * 1024) {
+          this.validUpload.isValidUpload = false
+        } else {
+          this.validUpload.isValidUpload = true
+          if (file.type !== 'application/pdf') {
+            this.isPdf = false
+            let param = new FormData()
+            param.append('file', file, file.name)
+            param.append('chunk', '0')
+            let config = {
+              headers: {'Content-Type': 'multipart/form-data'}
+            }
+            this.$http.post('/api/images', param, config)
+              .then(response => {
+                this.data.url = response.data[0].path
+                this.$emit('businessImgUrlAction', this.data.url)
+              }, err => {
+                console.log(err)
+                this.validUpload.isValidUpload = false
+              })
+          } else {
+            let param = new FormData()
+            param.append('file', file, file.name)
+            let config = {
+              headers: {'Content-Type': file.type}
+            }
+            this.$http.post('/file', param, config)
+              .then(response => {
+                this.isPdf = true
+                this.data.url = response.data[0].path
+                this.$emit('businessImgUrlAction', this.data.url)
+              }, err => {
+                console.log(err)
+                this.validUpload.isValidUpload = false
+              })
+          }
+        }
+        this.validCheck()
+      },
+      uploadLogo: function (e) {
+        this.validLogo.init = false
+        let file = e.target.files[0]
+        if (file.size > 100 * 1024) {
+          this.validLogo.isValidLogo = false
+//          this.$message.error('图片请勿超过100Kb')
+        } else {
+          let param = new FormData()
+          param.append('file', file, file.name)
+          let config = {
+            headers: {'Content-Type': file.type}
+          }
+          this.$http.post('/api/images', param, config)
+            .then(response => {
+              this.validLogo.isValidLogo = true
+              this.data.logoUrl = response.data[0].path
+            }, err => {
+              console.log(err)
+              this.$message.error('图片上传失败')
+            })
+        }
+      },
+      validCheck: function () {
+        this.isValid =
+          this.validUpload.isValidUpload && !this.validUpload.init &&
+          this.validName.isValidTypeName && !this.validName.init && this.validName.isValidName &&
+          this.validLicence.isValidLicence && !this.validLicence.init &&
+          this.validAddress.isValidAddress && !this.validAddress.init &&
+          this.validLawPerson.isValidLawPerson && !this.validLawPerson.init &&
+          (this.validPhone.init || this.validPhone.isValidPhone) &&
+          (this.validEmail.init || this.validEmail.isValidEmail) &&
+          (this.validFax.init || this.validFax.isValidFax)
+      },
+      checkFullData: function () {
+        this.isValid =
+          this.validUpload.isValidUpload &&
+          this.validName.isValidTypeName && this.validName.isValidName &&
+          this.validLicence.isValidLicence &&
+          this.validAddress.isValidAddress &&
+          this.validLawPerson.isValidLawPerson
+      },
+      nameTypeCheck: function () {
+        this.validName.isValidTypeName = this.data.name !== '' && this.data.name.length >= 2 && this.data.name.length <= 99 && this.commonValid(this.data.name)
+        this.validName.init = false
+      },
+      nameCheck: function (num) {
+        if (num > 0) {
+          this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
+            .then(response => {
+              if (response.data.code !== 12) {
+                this.validName.init = false
+                this.validName.isValidName = response.data.success
+                this.validCheck()
+              } else {
+                this.nameCheck(num - 1)
+              }
+            })
+        }
+      },
+      imgUrlCheck: function () {
+        this.validUpload.init = false
+        this.validUpload.isValidUpload = this.data.url !== ''
+      },
+      licenceCheck: function (num) {
+        if ((/^\S{1,255}$/).test(this.data.licenceId)) {
+          if (num > 0) {
+            this.$http.post('/basic/enterprise/register/valid/businessCode?businessCode=' + this.data.licenceId)
+              .then(response => {
+                if (response.data.code !== 12) {
+                  this.validLicence.init = false
+                  this.validLicence.isValidLicence = response.data.success && this.data.licenceId
+                  this.validCheck()
+                } else {
+                  //      this.validLicence.init = tmpInit
+                  this.licenceCheck(num - 1)
+                }
+              })
+          }
+        } else {
+          this.validLicence.init = false
+          this.validLicence.isValidLicence = false
+          this.validCheck()
+        }
+      },
+      addressCheck: function () {
+        this.validAddress.init = false
+        this.validAddress.isValidAddress = this.data.address !== ''
+        this.validCheck()
+      },
+      lawPersonCheck: function () {
+        this.validLawPerson.init = false
+        this.validLawPerson.isValidLawPerson = (/^\S{1,255}$/).test(this.data.lawPerson)
+        this.validCheck()
+      },
+      phoneCheck: function () {
+        this.validPhone.init = false
+        this.validPhone.isValidPhone = (/^[\d-]{8,}$/).test(this.data.phone) || this.data.phone === ''
+        this.validCheck()
+      },
+      emailCheck: function () {
+        this.validEmail.init = false
+        this.validEmail.isValidEmail = (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/).test(this.data.email) || this.data.email === ''
+        this.validCheck()
+      },
+      faxCheck: function () {
+        this.validFax.init = false
+        this.validFax.isValidFax = (/^(([\0]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$/).test(this.data.fax) || this.data.fax === ''
+        this.validCheck()
+      },
+      commonValid: function (str) {
+        return str.indexOf(' ') === -1
+      },
+      submitRegisterData: function () {
+        let enterprise = this.data
+        let data = {}
+        data.enterprise = enterprise
+        data.isValidRegister = this.isValid
+        data.url = this.data.url
+        this.$emit('registerAction', data)
+      },
+      onHideBox: function () {
+        this.onHideAddress()
+        this.onHideProfession()
+      },
+      onShowAddress: function () {
+        if (this.showAddressBox) {
+          this.onHideAddress()
+        } else {
+          this.showAddressBox = true
+          this.isClickInputAddress = true
+        }
+      },
+      onHideAddress: function () {
+        if (!this.isInAddressBox && !this.isClickInputAddress) {
+          this.showAddressBox = false
+        }
+        this.isClickInputAddress = false
+      },
+      onShowProfession: function () {
+        if (this.showProfessionBox) {
+          this.onHideProfession()
+        } else {
+          this.showProfessionBox = true
+          this.isClickInputProfession = true
+        }
+      },
+      onHideProfession: function () {
+        if (!this.isInProfessionBox && !this.isClickInputProfession) {
+          this.showProfessionBox = false
+        }
+        this.isClickInputProfession = false
+      },
+      getCity: function (province) {
+        this.cityData.city = []
+        this.address.currentCity = ''
+        this.cityData.district = []
+        this.address.currentDistrict = ''
+        this.address.currentProvince = province
+        for (let item in this.temCityData[province]) {
+          this.cityData.city.push(item)
+        }
+      },
+      getDistrict: function (city) {
+        this.address.currentCity = city
+        this.address.currentDistrict = ''
+        this.cityData.district = this.temCityData[this.address.currentProvince][city]
+      },
+      chooseDistrict: function (district) {
+        this.address.currentDistrict = district
+      },
+      submitAddress: function () {
+        if (this.address.currentDistrict !== '' && this.address.currentCity !== '' && this.address.currentProvince !== '') {
+          if (this.address.detail !== '') {
+            this.data.address = this.address.currentProvince + this.address.currentCity + this.address.currentDistrict + this.address.detail
+            this.showAddressBox = false
+            this.addressCheck()
+          } else {
+            this.$message.error('请输入详细地址')
+          }
+        } else {
+          this.$message.error('请输入省、市、区')
+        }
+      },
+      getProfessionDetail: function (profession) {
+        this.currentProfession.profession = profession
+        this.currentProfession.detail = ''
+        this.professionData.detail = []
+        this.currentProfession.thirdDetail = ''
+        this.professionData.thirdDetail = []
+        let _this = this
+        _this.professionData.detail = []
+        for (let item in this.tempProfession[profession]) {
+          if (typeof this.tempProfession[profession][item] !== 'object') {
+            _this.professionData.detail.push(this.tempProfession[profession][item])
+          } else {
+            _this.professionData.detail.push(item)
+          }
+        }
+      },
+      chooseProfessionDetail: function (detail) {
+        this.currentProfession.detail = detail
+        this.currentProfession.thirdDetail = ''
+        this.professionData.thirdDetail = []
+        if (typeof this.tempProfession[this.currentProfession.profession][detail] !== 'object') {
+          this.data.profession = detail
+          this.showProfessionBox = false
+        } else {
+          this.professionData.thirdDetail = this.tempProfession[this.currentProfession.profession][detail]
+        }
+      },
+      chooseProfessionThirdDetail: function (thirdDetail) {
+        this.currentProfession.thirdDetail = thirdDetail
+        this.data.profession = thirdDetail
+        this.showProfessionBox = false
+      },
+      tagCheck: function () {
+        if (this.tag.length > 10) {
+          this.tag = this.tag.substring(0, 10)
+        }
+      },
+      addTags: function () {
+        let flag = true
+        let _this = this
+        if (!this.tag || this.tag === '') {
+          flag = false
+        } else {
+          this.data.tagsData.forEach(function (item) {
+            if (item === _this.tag) {
+              flag = false
+            }
+          })
+        }
+        if (flag) {
+          this.data.tagsData.push(this.tag)
+          this.tag = ''
+        } else {
+          this.tag = ''
+        }
+      },
+      removeTag: function (index) {
+        this.data.tagsData.splice(index, 1)
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .register input[type="file"] {
+    display: block;
+  }
+  .previewImg {
+    max-height: 200px;
+    max-width: 200px;
+    margin-top: 5px;
+  }
+  .x-union-menu {
+    width: 600px
+  }
+  .x-union-header>div{
+    background: #f5f8fa;
+    font-weight: 700;
+    border-bottom: 1px solid #e4ecf3;
+  }
+  .x-union-header>div,.x-union-list>ul {
+    float: left;
+    width: 121px;
+    border-right: 1px solid #e4ecf3;
+  }
+  .x-union-list>ul {
+    height: 200px;
+    margin: 0;
+    overflow-y: auto;
+  }
+  .x-union-menu .x-item-ext {
+    float: left;
+    width: 235px;
+  }
+  .x-union-list .x-item-ext {
+    padding: 10px
+  }
+  .x-union-header>div:last-child {
+    border-right-width: 0
+  }
+  .x-union-header>div,.x-union-list>ul>li {
+    padding: 2px 10px;
+    cursor: pointer;
+  }
+  .x-union-list>ul>li:hover,.x-union-list>ul>li.active {
+    background: #fee9c7;
+  }
+  .x-input {
+    border-color: #ccc;
+    border-radius: 0;
+    box-shadow: none;
+  }
+  textarea.form-control {
+    height: auto;
+  }
+  .text-right {
+    text-align: right;
+  }
+  .register-btn {
+    padding: 5px 10px;
+    font-size: 12px;
+    line-height: 1.5;
+  }
+  .btn-submit {
+    background: #5078cb;
+    color: #fff;
+  }
+  .btn-console {
+    border: 1px solid #ccc;
+    background: #fff;
+    color: #888;
+    margin-left: 5px;
+    transition: all .2s ease-in-out;
+  }
+  .btn-console:hover {
+    border: 1px solid #adadad;
+    background: #e6e6e6;
+    color: #333;
+  }
+  .x-text-help {
+    color: green;
+  }
+  .register .row .upload-area   {
+    width: 130px;
+    height: 130px;
+    left: 15px;
+    padding: 0;
+    z-index: 100;
+  }
+  .error-box-border {
+    border-color: #f4645f!important;
+  }
+  .x-btn-blank:hover, .x-btn-blank[disabled] {
+    border: 1px solid #adadad;
+    background: #e6e6e6;
+    color: #333;
+  }
+  .register .row .auto-width {
+    width: auto!important;
+  }
+  .select-dot input {
+    background: url("../../../static/images/all/dot.png") no-repeat;
+    background-position-x: 353px;
+    background-position-y: 10px;
+  }
+  .register .row .logo-text {
+    font-size: 12px;
+    width: 180px;
+    position: relative;
+    top: 5px;
+    left: 175px;
+    text-align: center;
+    color: #999;
+    line-height: 20px;
+  }
+  .logo-img-area {
+    width: 130px;
+    height: 130px;
+  }
+  .logo-img-area .preview-logo-img {
+    max-width: 130px;
+    max-height: 130px;
+  }
+  .no-tags {
+    float: left;
+    padding: 2px 14px;
+    line-height: 20px;
+    border: #5078cb 1px solid;
+    border-radius: 5px;
+    font-size: 12px;
+    margin: 0 3px;
+    background: #5078cb;
+    color: #fff;
+    margin-top: 5px;
+  }
+  .register .row .add-tag-btn {
+    position: absolute;
+    right: 24px;
+    color: #5078cb;
+    font-size: 12px;
+    cursor: pointer;
+  }
+  .register .row .tags-box {
+    margin-top: 15px;
+  }
+  .register .row .tags-list ul{
+    list-style: none;
+  }
+  .register .row .tags-list ul li {
+    display: inline-block;
+    padding: 2px 14px;
+    line-height: 20px;
+    border: #5078cb 1px solid;
+    border-radius: 5px;
+    font-size: 12px;
+    color: #5078cb;
+    margin: 0 3px;
+  }
+  .register .row .tags-list ul li i{
+    font-size: 12px;
+    color: red;
+    position: relative;
+    top: -3px;
+    right: -12px;
+  }
+  .register .row .tags-lists {
+    margin-top: 10px;
+  }
+  .register .row .tags-lists em {
+    font-style: inherit;
+    margin-left: 163px;
+    font-size: 12px;
+    color: #999;
+  }
+  .register .row .tags-lists span {
+    float: left;
+    padding: 2px 14px;
+    line-height: 20px;
+    border: #5078cb 1px solid;
+    border-radius: 5px;
+    font-size: 12px;
+    color: #5078cb;
+    margin: 0 3px;
+  }
+  .register .row .x-text-tip {
+    color: #777;
+    margin-top: 15px;
+  }
+  .register .row .x-text-tip i {
+    margin-right: 5px;
+  }
+</style>

+ 117 - 0
components/register-saler/register/StepSecond.vue

@@ -0,0 +1,117 @@
+<template>
+  <!--阅读服务协议-->
+  <div class="section">
+    <div class="agreement">
+      <div class="join_xieyi">
+        <div class="article-flag">
+          <span @click="chooseTag=1" :class="chooseTag==1?'active':''">优软商城服务条款</span>
+          <span @click="chooseTag=2" :class="chooseTag==2?'active':''">优软商城买卖条例</span>
+        </div>
+        <!--<textarea readonly></textarea>-->
+        <div class="text-area">
+          <div class="ql-container ql-snow" v-html="article"></div>
+        </div>
+      </div>
+    </div>
+    <div class="row" style="margin-left: 30px; text-align: center;">
+      <label class="checkbox-inline">
+        <input type="checkbox" id="agree" name="agree" value="1" :checked="checkData.checked" @click="onCheck()" >
+        我已阅读并同意<a href="http://www.usoftmall.com/help#/issue/50" target="_blank">
+        《优软商城服务条款》</a>、<a href="http://www.usoftmall.com/help#/issue/16" target="_blank">
+        《优软商城买卖条例》</a>
+      </label>
+    </div>
+    <div class="row next-btn step-two-btn" style="margin-top: 20px">
+      <button @click="sectionChange(1)" class="btn">上一步</button>
+      <button @click="sectionChange(3)" class="btn" :style="!checkData.checked ? 'opacity: .65;':''">下一步</button>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: ['checkData', 'loginData', 'cacheData'],
+    data () {
+      return {
+        chooseTag: 1,
+        article: ''
+      }
+    },
+    watch: {
+      chooseTag: function (val) {
+        this.getArticle(val === 1 ? 50 : 16)
+      }
+    },
+    mounted () {
+      this.getArticle(50)
+    },
+    methods: {
+      sectionChange: function (type) {
+        if (!this.checkData.checked && type === 3) {
+          this.$message.error('请阅读相关条例')
+        } else {
+          this.$emit('sectionEvent', type)
+        }
+      },
+      getArticle: function (num) {
+        this.$http.get('/api/help-service/issues/' + num).then(response => {
+          this.article = response.data.article
+        })
+      },
+      onCheck: function () {
+        this.checkData.checked = !this.checkData.checked
+        if (this.loginData.isSelf) {
+          this.cacheData.enIsRead = this.checkData.checked
+          this.$http.post('/basic/user/userCacheEnterprise', this.cacheData)
+        } else {
+          if (this.checkData.checked) {
+            this.$http.post('/basic/enterprise/openVendorSetRead/' + this.loginData.enterprise.uu)
+              .then(() => {
+                this.$http.get('/user/authentication/reflash')
+                  .then(() => {
+                    this.$http.get(`/user/authentication/` + this.loginData.enterprise.uu).then(() => {
+                      this.$store.dispatch('loadUserInfo')
+                    })
+                  })
+              })
+          } else {
+            this.$http.post('/basic/enterprise/openVendorSetNotRead/' + this.loginData.enterprise.uu)
+              .then(() => {
+                this.$http.get('/user/authentication/reflash')
+                  .then(() => {
+                    this.$http.get(`/user/authentication/` + this.loginData.enterprise.uu).then(() => {
+                      this.$store.dispatch('loadUserInfo')
+                    })
+                  })
+              })
+          }
+        }
+      }
+    }
+  }
+</script>
+
+<style>
+  @import '~assets/scss/help.css';
+  .step-two-btn button:first-child{
+    background: #fff;
+    color: #5078cb;
+    border: 1px solid #5078cb;
+  }
+  .join_xieyi .ql-editor span,.join_xieyi .ql-editor a {
+    font-size: 12px;
+    line-height: 25px;
+  }
+  .join_xieyi .ql-editor br {
+    display: none;
+  }
+  .join_xieyi .ql-editor {
+    padding: 0 0 0 25px;
+  }
+ /* .join_xieyi .ql-editor p {
+    width: 494px;
+    margin: 0 auto;
+  }*/
+  .ql-container.ql-snow {
+    border: none;
+  }
+</style>

+ 1099 - 0
components/register-saler/register/StepThird.vue

@@ -0,0 +1,1099 @@
+<template>
+  <!--最后一步-->
+  <div class="section">
+    <div class="step-last">
+<!--      <h4 class="h4">免费开店</h4>
+      <p class="title">申请开店完全免费,一个企业只能开一家店,申请到正式开通预计需1-3个工作日。了解更多请看《开店规则》</p>-->
+    </div>
+    <div class="radioCheck">
+      <label for="1" class="radioLabel">
+        <input type="radio" v-model="selectFlag" name="role" value="open" id="1"/>
+        <label for="1" class="txtContact"></label>
+        <span>免费开店</span>
+      </label>
+      <label for="2" class="radioLabel">
+        <input type="radio" v-model="selectFlag" name="role" value="seller" id="2" checked/>
+        <label for="2" class="txtContact"></label>
+        <span>暂不开店直接寄售</span>
+      </label>
+    </div>
+    <!--导入店铺模板-->
+    <div class="container vendor_store_apply" v-show="selectFlag == 'open'">
+        <div>
+          <!-- Nav tabs -->
+          <ul class="nav nav-tabs">
+            <li><div style="height: 39px;line-height: 39px;font-size: 14px;">店铺类型:</div></li>
+            <li class="custom_tab" :class="{active: tab == 'ORIGINAL_FACTORY'}" @click="toggleTab('ORIGINAL_FACTORY')">
+              <a href="javascript:void(0)">原厂</a>
+            </li>
+            <li class="custom_tab" :class="{active: tab == 'AGENCY'}" @click="toggleTab('AGENCY')">
+              <a href="javascript:void(0)">代理商</a>
+            </li>
+            <li class="custom_tab" :class="{active: tab == 'DISTRIBUTION'}" @click="toggleTab('DISTRIBUTION')">
+              <a href="javascript:void(0)">经销商</a>
+            </li>
+          </ul>
+          <!-- Tab panes -->
+          <div class="tab-content">
+            <!-- 原厂 -->
+            <div role="tabpanel" class="tab-pane" v-if="tab == 'ORIGINAL_FACTORY'" :class="{active: tab == 'ORIGINAL_FACTORY'}">
+              <div class="row com_row">
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload :typeData="'BUSINESS_LICENSE'" :url="businessLicenseUrl" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload  :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
+              </div>
+              <!--增加品牌-->
+              <div class="brand-type row" v-for="(brand, index) in brands">
+                <div class="col-md-1">品牌{{index+1}}<em v-if="index == 0">*</em></div>
+                <div class="col-md-7">
+                  <input type="text" v-model="brand.name"
+                         @input="onBrandInput(brand, index)"
+                         @blur.stop.prevent="onBrandChanged(brand, index)"
+                         class="form-control" name="brandName"  autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
+                  <ul class="dropdown-menu"
+                      v-show="showSimilarKey.flag && showSimilarKey.index == index"
+                      @mouseenter="showFlag = true"
+                      @mouseleave="showFlag = false">
+                    <li @mouseenter="setKeyActive"
+                        @mouseleave="setKeyDefault"
+                        @click.stop.prevent="changedName(brand, index, key_index)"
+                        v-for="(key, key_index) in similarKeys[index]">
+                      <a v-text="key.nameCn">
+                        <!--<strong>C</strong>apital Advan<strong>c</strong>ed-->
+                      </a>
+                    </li>
+                  </ul>
+                </div>
+                <div class="brand-small-upload col-md-4">
+                  <div class="brand-small-img">
+                    <upload :typeData="index" @uploadAction="onUpload"></upload>
+                  </div>
+                  <div class="file-text">品牌logo/商标注册原件/授权说明书</div>
+                  <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除"><i class="fa fa-trash"></i></div>
+                  <div class="col-md-12"><em v-if="index == 0">*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
+                </div>
+              </div>
+              <div class="add-brand row">
+                <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
+              </div>
+              <div class="unpass-reason row" style="display: none">
+                原因:<span style="color: #d32526;">原因</span>
+              </div>
+            </div>
+            <!--原厂end-->
+            <!--代理商 begin-->
+            <div role="tabpanel" class="tab-pane" v-if="tab == 'AGENCY'" :class="{active: tab == 'AGENCY'}">
+              <div class="row com_row">
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload :typeData="'BUSINESS_LICENSE'" :url="businessLicenseUrl" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload  :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
+              </div>
+              <!--增加品牌-->
+              <div class="brand-type row" v-for="(brand, index) in brands">
+                <div class="col-md-1">品牌{{index+1}}<em>*</em></div>
+                <div class="col-md-7">
+                  <input type="text" v-model="brand.name"
+                         @input="onBrandInput(brand, index)"
+                         @blur.stop.prevent="onBrandChanged(brand, index)"
+                         class="form-control" name="brandName"  autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
+                  <ul class="dropdown-menu"
+                      v-show="showSimilarKey.flag && showSimilarKey.index == index"
+                      @mouseenter="showFlag = true"
+                      @mouseleave="showFlag = false">
+                    <li @mouseenter="setKeyActive"
+                        @mouseleave="setKeyDefault"
+                        v-for="(key, key_index) in similarKeys[index]">
+                      <a v-text="key.nameCn"  @click.stop.prevent="changedName(brand, index, key_index)">
+                        <!--<strong>C</strong>apital Advan<strong>c</strong>ed-->
+                      </a>
+                    </li>
+                  </ul>
+                </div>
+                <div class="brand-small-upload col-md-4">
+                  <div class="brand-small-img">
+                    <upload :typeData="index" @uploadAction="onUpload"></upload>
+                  </div>
+                  <div class="file-text">代理资格证/代理授权书</div>
+                  <div v-show="brands.length > 1" @click="deleteBrand(index)" class="delete" title="删除"><i class="fa fa-trash"></i></div>
+                  <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
+                </div>
+              </div>
+              <div class="add-brand row">
+                <a href="javascript:void(0)" title="增加品牌" @click="addBrand"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
+              </div>
+              <div class="unpass-reason row" style="display: none">
+                原因:<span style="color: #d32526;">原因</span>
+              </div>
+            </div>
+            <!--代理商 end-->
+            <!--经销商 begin-->
+            <div role="tabpanel" class="tab-pane" v-if="tab == 'DISTRIBUTION'" :class="{active: tab == 'DISTRIBUTION'}">
+              <div class="row com_row">
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload :typeData="'BUSINESS_LICENSE'" :url="businessLicenseUrl" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload  :typeData="'TAX_PAYER'" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-4 custom_col">
+                  <div class="row" style="margin: 0;">
+                    <div class="col-md-5 col-md-offset-1 show_image_area show_image">
+                      <upload :typeData="'TAX_REGISTRATION'" @uploadAction="onUpload"></upload>
+                    </div>
+                    <div class="col-md-5" style="padding: 0;">
+                      <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
+                    </div>
+                  </div>
+                </div>
+                <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
+              </div>
+            </div>
+            <!--经销商 end-->
+          </div>
+          <!-- Submit button -->
+         <!-- <div style="padding: 28px 40px;">
+            <button type="button" class="btn btn-primary" style="float: right" @click="submitApply">提交申请</button>
+            <div class="clear-fix"></div>
+          </div>-->
+        </div>
+        <!--删除上传图片-->
+        <div class="com-del-box" style="display: none">
+          <div class="title">
+            <a><i class="fa fa-close fa-lg"></i></a>
+          </div>
+          <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>是否删除选中信息</p>
+            <div><a>取消</a><a>确认</a></div>
+          </div>
+        </div>
+        <!--删除品牌图片-->
+        <div class="com-del-box" style="display: none">
+          <div class="title">
+            <a><i class="fa fa-close fa-lg"></i></a>
+          </div>
+          <div class="content">
+            <p><i class="fa fa-exclamation-circle"></i>品牌信息为重要信息,确定删除吗?</p>
+            <div><a>取消</a><a>确认</a></div>
+          </div>
+        </div>
+        <!--提示框-->
+        <div class="com-del-box" v-if="showBrandNameInvalid">
+          <div class="title">
+            <a @click="showBrandNameInvalid = false"><i class="fa fa-close fa-lg"></i></a>
+          </div>
+          <div class="content">
+            <p style="line-height: 20px;margin-top: 10px;padding:0 10px">非常抱歉,目前暂无此品牌!<br>若直接前往“品牌申请”,我们将为您先开通寄售功能,待申请通过后再提交开店申请。</p>
+            <p style="line-height: 20px;">前往<a @click="goBrandApply()"  target="_blank" style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>
+          </div>
+        </div>
+      </div>
+    <!--<div class="step-last">
+      <h4 class="h4">库存寄售</h4>
+      <p class="title">无需开店,即可发布贵司仓库里的滞销产品,优软商城代为销售,匿名清仓无压力<button class="no-apply" @click="goProduct">暂不开店,直接寄售</button></p>
+    </div>-->
+    <div class="row btn-area">
+      <span @click="sectionChange(2)">上一步</span>
+      <span @click="btnDisabled?'':selectFlag == 'open'?submitApply():goProduct()" :class="btnDisabled?'btn-disabled':''">提交申请</span>
+    </div>
+    <div class="loading" v-if="showLoading">
+      <img src="/images/all/loading.gif" alt="">
+    </div>
+  </div>
+</template>
+<script>
+  import Upload from '~components/common/upload/upload.vue'
+  export default {
+    data () {
+      return {
+        tab: 'ORIGINAL_FACTORY',
+        brands: [{
+          type: 'BRAND',
+          name: '',
+          url: '',
+          isPdf: false,
+          brandUuid: ''
+        }],
+        businessLicenseUrl: '',
+        taxPayerUrl: '',
+        taxRegistrationUrl: '',
+//        defaultBusinessUrl: '',
+        showBrandNameInvalid: false,
+        similarKeys: [[]],
+        showSimilarKey: {
+          flag: false,
+          index: 0
+        },
+        showFlag: false,
+        isSelfRegisterSuccess: true,
+        selectFlag: 'open',
+        showLoading: false,
+        btnDisabled: false
+      }
+    },
+    props: [
+      'checkData',
+      'registerData',
+      'loginData',
+      'enterpriseData',
+      'businessImgUrl'
+    ],
+    watch: {
+      enterpriseData: function (val, oldVal) {
+        if (val !== {}) {
+          this.businessLicenseUrl = val.url || val.businessCodeImage || ''
+//          this.defaultBusinessUrl = val.enBussinessCodeImage || ''
+        }
+      },
+      businessImgUrl: function (val, oldVal) {
+        this.businessLicenseUrl = val
+      }
+    },
+    components: {
+      Upload
+    },
+    computed: {
+      user () {
+        return this.$store.state.option.user
+      }
+    },
+    methods: {
+      sectionChange: function (type) {
+        this.$emit('sectionEvent', type)
+      },
+      toggleTab (t) {
+        this.tab = t
+        this.brands = [{
+          type: 'BRAND',
+          name: '',
+          url: '',
+          isPdf: false,
+          brandUuid: ''
+        }]
+      },
+      onUpload: function (obj) {
+        if (obj.type === 'BUSINESS_LICENSE') {
+    //      this.businessLicenseUrl = obj.url
+          this.businessLicenseUrl = obj.url
+          if (obj.url !== '') {
+            this.$emit('businessImgUrlAction', this.businessLicenseUrl)
+          }
+        } else if (obj.type === 'TAX_PAYER') {
+          this.taxPayerUrl = obj.url
+        } else if (obj.type === 'TAX_REGISTRATION') {
+          this.taxRegistrationUrl = obj.url
+        } else if (typeof obj.type === 'number') {
+          this.brands[obj.type].url = obj.url
+        }
+      },
+      onBrandChanged: function (item, index) {
+        this.showSimilarKey.flag = this.showFlag
+        if (!this.showFlag) {
+          this.onCheck(item)
+        }
+      },
+      onCheck: function (item, index) {
+        if (item.name && item.name !== '') {
+          this.$http.get('/api/product/brand', {params: {name: item.name, op: 'by_name'}})
+            .then(response => {
+              item.brandUuid = response.data.uuid
+              item.isPdf = item.url.substring(item.url.length - 4, item.url.length) === '.pdf'
+            }, err => {
+              console.log(err)
+              this.showBrandNameInvalid = true
+            })
+        }
+      },
+      onBrandInput: function (brand, index) {
+        this.showSimilarKey.flag = false
+        this.$http.get('/search/similarBrands?keyword=' + brand.name)
+          .then(response => {
+            this.similarKeys[index] = response.data
+            if (response.data.length > 0) {
+              this.showSimilarKey.flag = true
+              this.showSimilarKey.index = index
+            }
+          })
+      },
+      changedName: function (brand, index, keyIndex) {
+        brand.name = this.similarKeys[index][keyIndex].nameCn
+        this.showSimilarKey.flag = false
+        this.onCheck(brand)
+      },
+      setKeyActive: function (e) {
+        e.target.setAttribute('class', 'active')
+      },
+      setKeyDefault: function (e) {
+        e.target.setAttribute('class', '')
+      },
+      submitApply: function () {
+        if (this.loginData.isSelf) {
+          if (!this.registerData.isValidRegister) {
+            this.$message.error('请输入正确的注册信息')
+          } else if (!this.checkData.checked) {
+            this.$message.error('您还没有勾选相关条款')
+          } else {
+            this.registerSelf()
+          }
+        } else {
+          if (!this.checkData.checked) {
+            this.$message.error('您还没有勾选相关条款')
+          } else {
+            this.storeApply(this.loginData.enterprise.uu)
+          }
+        }
+      },
+      registerSelf: function () {
+        this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
+          .then(response => {
+            if (response.data.success) {
+              this.isSelfRegisterSuccess = true
+              this.$http.delete('basic/user/userCacheEnterprise')
+              this.$http.get('/user/authentication/reflash')
+                .then(() => {
+                  this.$http.get(`/user/authentication/` + response.data.data.enuu).then(() => {
+                    this.$store.dispatch('loadUserInfo')
+                    this.loginData.isSelf = false
+                    this.loginData.enterprise.uu = response.data.data.enuu
+                    this.storeApply(response.data.data.enuu)
+//                    window.location.reload()
+                  })
+                }
+              )
+            } else {
+              this.isSelfRegisterSuccess = false
+              this.$message.error('个人注册失败,请重新填写信息')
+            }
+          }, err => {
+            console.log(err)
+            this.isSelfRegisterSuccess = false
+            this.$message.error('个人注册失败,请重新填写信息')
+          })
+      },
+      storeApply: function (enuu) {
+        this.showLoading = true
+        let validCode = 0
+        if (this.businessLicenseUrl === '') {
+          this.$message.error('请上传营业执照')
+          this.showLoading = false
+        } else {
+          if (this.brands[0].name === '') {
+            validCode = 1
+          } else if (this.brands[0].url === '') {
+            validCode = 2
+          }
+          if (validCode === 0 || this.tab === 'DISTRIBUTION') {
+            let qualifications = []
+            qualifications.push({
+              type: 'BUSINESS_LICENSE',
+              resourceUrl: this.businessLicenseUrl,
+              isPdf: this.isPdf(this.businessLicenseUrl)
+            })
+            if (this.taxPayerUrl !== '') {
+              qualifications.push({
+                type: 'TAX_PAYER',
+                resourceUrl: this.taxPayerUrl,
+                isPdf: this.isPdf(this.taxPayerUrl)
+              })
+            }
+            if (this.taxPayerUrl !== '') {
+              qualifications.push({
+                type: 'TAX_REGISTRATION',
+                resourceUrl: this.taxRegistrationUrl,
+                isPdf: this.isPdf(this.taxRegistrationUrl)
+              })
+            }
+//            console.log(qualifications)
+            let tmpBrands = []
+            this.brands.forEach(function (item) {
+              if (item.name !== '' && item.url !== '') {
+                tmpBrands.push(item)
+              }
+            })
+            this.$http.post('/store-service/applications', {
+              brands: tmpBrands,
+              qualifications: qualifications,
+              type: this.tab
+            }).then(response => {
+              this.showLoading = false
+              if (response.data.success) {
+                this.btnDisabled = true
+                this.$message.success('感谢您对优软商城的支持,我们会尽快对您提交的信息进行审核,预计审核时间为3个工作日,审核结果将以站内消息及邮件形式通知您!')
+              } else {
+                this.btnDisabled = true
+                this.$message.error('开通店铺异常,请前往我的店铺查看店铺开通进度')
+              }
+              this.$http.post('/basic/enterprise/openVendor/' + enuu)
+                .then(() => {
+                  this.$http.get('/user/authentication/reflash')
+                    .then(() => {
+                      this.$http.get(`/user/authentication/` + enuu).then(() => {
+                        this.$store.dispatch('loadUserInfo')
+                      })
+                    })
+                })
+              window.setTimeout(function () {
+                window.location.href = '/vendor#/store-apply/wait'
+              }, 3000)
+            }, err => {
+              console.log(err)
+              this.$http.post('/basic/enterprise/openVendorSetRead/' + enuu)
+              this.$message.error('开通店铺失败')
+              this.showLoading = false
+            })
+          } else {
+            if (validCode === 1) {
+              this.$message.error('请添加品牌信息')
+              this.showLoading = false
+            } else if (validCode === 2) {
+              this.$message.error('请上传品牌图片')
+              this.showLoading = false
+            }
+          }
+        }
+      },
+      addBrand: function () {
+        this.brands.push({
+          type: 'BRAND',
+          name: '',
+          url: '',
+          isPdf: false,
+          brandUuid: ''
+        })
+        this.similarKeys.push([])
+      },
+      deleteBrand: function (index) {
+        this.brands.splice(index, 1)
+        this.similarKeys.splice(index, 1)
+      },
+      isPdf: function (url) {
+        return url.substring(url.length - 4, url.length) === '.pdf'
+      },
+      reflashEnterprise: function (enuu, url) {
+        this.$http.post('/basic/enterprise/openVendor/' + enuu)
+          .then(() => {
+            this.$http.get('/user/authentication/reflash')
+              .then(() => {
+                this.$http.get(`/user/authentication/` + enuu).then(() => {
+                  this.$store.dispatch('loadUserInfo')
+                  window.location.href = url
+                })
+              }
+              )
+          })
+      },
+      goProduct: function (baseUrl) {
+        if (this.loginData.isSelf) {
+          if (!this.registerData.isValidRegister) {
+            this.$message.error('请输入正确的注册信息')
+          } else if (!this.checkData.checked) {
+            this.$message.error('您还没有勾选相关条款')
+          } else {
+            this.$http.post('/basic/enterprise/register?filePath=' + this.registerData.url, this.registerData.enterprise)
+              .then(response => {
+                if (response.data.success) {
+                  this.isSelfRegisterSuccess = true
+                  this.$http.delete('basic/user/userCacheEnterprise')
+                  this.reflashEnterprise(response.data.data.enuu, baseUrl || '/vendor#/vendor_upload')
+                } else {
+                  this.isSelfRegisterSuccess = false
+                  this.$message.error('个人注册失败,请重新填写信息')
+                }
+              }, err => {
+                console.log(err)
+                this.isSelfRegisterSuccess = false
+                this.$message.error('个人注册失败,请重新填写信息')
+              })
+          }
+        } else {
+          if (!this.checkData.checked) {
+            this.$message.error('您还没有勾选相关条款')
+          } else {
+            this.reflashEnterprise(this.loginData.enterprise.uu, baseUrl || '/vendor#/vendor_upload')
+          }
+        }
+      },
+      goBrandApply: function () {
+        this.showBrandNameInvalid = false
+        this.goProduct('/vendor#/brand/apply/')
+      }
+    }
+  }
+</script>
+<style scoped>
+  .com-input{
+    width: 100%;
+    height: 100%;
+    text-align: center;
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    opacity: 0;
+    display: inline-block !important;
+  }
+  .el-upload-list--picture-card .el-upload-list__item{
+    width: 160px;
+    height: 120px;
+    top: 69px;
+  }
+  div.vendor_store_apply {
+    margin: 0 auto;
+    width: 1026px;
+    background-color: #FFFFFF;
+    margin-bottom: 20px;
+    margin-top: 25px;
+  }
+
+  div.vendor_store_apply .com_row {
+    padding: 0 40px;
+    min-height: 40px;
+  }
+
+  div.vendor_store_apply .title_row {
+    margin-bottom: 20px;
+    border-bottom: #e8e8e8 1px solid;
+  }
+
+  div.vendor_store_apply .custom_col {
+    margin: 0;
+    padding: 0;
+  }
+
+  div.vendor_store_apply .custom_col img.previewImage {
+    max-width: 160px;
+    max-height: 120px;
+    cursor: pointer;
+    /*padding: 0 30px;*/
+  }
+
+  div.vendor_store_apply .row h2 {
+    padding: 10px 0;
+    font-size: 16px;
+    font-weight: 500;
+    color: #000000;
+  }
+
+  div.vendor_store_apply .row span {
+    display: block;
+    padding: 10px 0;
+    font-size: 14px;
+    color: #000000;
+  }
+
+  div.vendor_store_apply #file_upload {
+    width: 100px;
+    height: 100px;
+    border:1px solid #CDCDCD;
+    /*background: url("static/img/vendor/images/upload.png");*/
+  }
+
+  div.vendor_store_apply #upload_qualification {
+    width: 100px;
+    height: 100px;
+    opacity: 0;
+  }
+
+  div.vendor_store_apply .custom_tab {
+    margin: 0 15px;
+    width: 90px;
+    text-align: center;
+  }
+
+  div.vendor_store_apply .nav li.custom_tab.active>a,
+  div.vendor_store_apply .nav li.custom_tab.active>a:focus,
+  div.vendor_store_apply .nav li.custom_tab.active>a:hover {
+    border: 1px solid #5078CB;
+    border-bottom-color: transparent;
+    color: #5078cb;
+  }
+
+  div.vendor_store_apply .uploadify-button {
+    display: block;
+  }
+
+  div.vendor_store_apply .custom_col .show_image_area {
+    height: 120px;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+  }
+  .nav-tabs{
+    height: 41px;
+    background: none;
+    padding: 0 40px;
+  }
+  .nav-tabs>li>a{
+    border-radius: 0;
+    color: #333;
+  }
+  div.vendor_store_apply .btn-primary{
+    background: #5078cb;
+    border-radius: 0;
+  }
+  div.vendor_store_apply .btn-primary:hover{
+    background: #3f7ae3;
+  }
+  div.vendor_store_apply .com_row .col-md-2{
+    width: 120px;
+  }
+  div.vendor_store_apply .com_row .col-md-10 span{
+    color: #666;
+  }
+
+  /*修改的样式*/
+  div.vendor_store_apply .custom_col .show_image_area{
+    position: relative;
+    overflow: hidden;
+  }
+  .hover-show{
+    position: absolute;
+    width: 100%;
+    height: 100%;
+    top: 120px;
+    left: 0;
+    background: rgba(0,0,0,.5);
+  }
+  div.vendor_store_apply .custom_col .show_image_area .hover-show{
+    top: 0;
+  }
+  .hover-show .delete{
+    padding: 0;
+    width: 30px;
+    height: 30px;
+    float: right;
+    text-align: center;
+  }
+  .hover-show .delete:hover{
+    cursor: pointer;
+  }
+  .hover-show .delete i{
+    color: #fff;
+    font-size: 18px;
+  }
+  .hover-show a{
+    display: inline-block;
+    width: 100%;
+    height: 60px;
+    font-size: 14px;
+    color: #fff;
+    text-align: center;
+    line-height: 60px;
+  }
+  .hover-show a i{
+    margin-right: 5px;
+    font-size: 16px;
+  }
+  .brand-type{
+    line-height: 34px;
+    font-size: 14px;
+    margin: 20px 20px 5px 20px;
+  }
+  .brand-type .brand-small-img{
+    position: relative;
+    width: 84px;
+    height: 84px;
+    overflow: hidden;
+    text-align: center;
+    border: #e8e8e8 1px solid;
+  }
+  .brand-type .brand-small-img .preview img{
+    max-width: 84px;
+    max-height: 84px;
+  }
+  .brand-type em{
+    color: #ff0000;
+  }
+  .brand-type .col-md-7,.brand-type .col-md-1{
+    margin-top: 25px;
+  }
+  .brand-small-upload .file-text,.brand-type .brand-small-img{
+    float: left;
+  }
+  .brand-small-upload .file-text{
+    width: 120px;
+    margin-left: 10px;
+    line-height: 20px;
+    margin-top: 6%;
+  }
+  .brand-small-upload .delete{
+    float: right;
+    text-align: center;
+    line-height: 84px;
+  }
+  .brand-small-upload .delete i{
+    font-size: 18px;
+    color: #5078cb;
+  }
+  .brand-small-upload .delete:hover{
+    cursor: pointer;
+  }
+  .brand-small-upload .delete:hover i{
+    color: #f00;
+  }
+  .brand-small-upload .brand-small-img .hover-show{
+    top: 0;
+  }
+  .brand-small-upload .brand-small-img .hover-show{
+  }
+  .brand-small-upload .brand-small-img .hover-show span i{
+    color: #fff;
+  }
+  .brand-small-upload .brand-small-img .hover-show span.delete{
+    line-height: 30px;
+    padding: 0;
+  }
+  .brand-small-upload .brand-small-img .hover-show a{
+    line-height: 30px;
+    height: 30px;
+  }
+  .tab-content {
+    border: 1px #5078CB solid;
+    padding-bottom: 30px;
+  }
+  .tab-content .com_row{
+    margin:40px 0 0;
+    border-bottom: #ccc 1px dashed;
+    padding-bottom: 40px !important;
+  }
+  .tab-content .com_row .col-md-12{
+    color: #999;
+    margin-top: 20px;
+    font-size: 12px;
+    padding-left: 50px;
+  }
+  .brand-small-upload .col-md-12{
+    color: #999;
+    font-size: 12px;
+    padding-left: 0;
+  }
+  .tab-content .com_row .col-md-12 em,.brand-small-upload .col-md-12 em{
+    color: #f00;
+  }
+  .add-brand{
+    text-align: center;
+    border-bottom: #ccc 1px dashed;
+    margin: 0 0 20px 0;
+    height: 34px;
+  }
+  .add-brand a{
+    font-size: 14px;
+    color: #5078cb;
+    width: 200px;
+    height: 15px;
+    display: inline-block;
+    border: #ccc 1px dashed;
+    border-top: 0;
+    border-bottom-left-radius: 50px;
+    border-bottom-right-radius: 50px;
+    margin-top: 31px;
+    background: #fff;
+    line-height: 15px;
+    text-decoration: none;
+  }
+  .add-brand a i{
+    margin-right: 5px;
+    font-size: 20px;
+    vertical-align: middle;
+  }
+  .add-brand a em{
+    position: relative;
+    top: -10px;
+    font-weight: bold;
+    font-style: inherit;
+  }
+  .add-brand a:hover em{
+    color: #d32526;
+    text-decoration: none;
+  }
+  .unpass-reason {
+    margin: 0 40px;
+    line-height: 34px;
+  }
+
+  /* 预览框 end */
+
+  .brand-type .dropdown-menu {
+    width: 95%;
+  }
+  .brand-type .dropdown-menu li {
+    font-size: 14px;
+  }
+  .com-del-box{
+    position: fixed;
+    z-index: 1000;
+    height: auto;
+    opacity: 1;
+    background-color: white;
+    width: 310px;
+    -webkit-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+    -moz-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+    -o-box-shadow: 0 5px 15px rgba(0,0,0,.5);
+    box-shadow: 0 5px 15px rgba(0,0,0,.5);
+    margin: -155px 0 0 -75px;
+    top: 55%;
+    left: 43%;
+  }
+  .com-del-box .title{
+    height: 30px;
+    background-color: #5078cb;
+    text-align: right;
+    padding-right: 15px;
+    line-height: 30px;
+  }
+  .com-del-box .title a{
+    color: white;
+    font-size: 16px;
+  }
+  .com-del-box .content{
+    width: 100%;
+    text-align: center;
+    margin: 0 auto;
+  }
+  .com-del-box .content p{
+    line-height: 50px;
+    font-size: 14px;
+    padding-top: 10px;
+  }
+  .com-del-box .content p i{
+    color: #5078cb;
+    font-size: 16px;
+    margin-right: 10px;
+  }
+  .com-del-box .content div{
+    width: 100%;
+    text-align: center;
+    margin: 0 auto;
+  }
+  .com-del-box .content div a{
+    width: 55px;
+    height: 26px;
+    line-height: 26px;
+    display: inline-block;
+    text-align: center;
+    font-size: 14px;
+  }
+  .com-del-box .content div a:first-child{
+    background: #b4b5b9;
+    color: #333;
+    margin-right: 10px;
+  }
+  .com-del-box .content div a:last-child{
+    background: #5078cb;
+    color: #fff;
+  }
+  .com-del-box .content div a:hover{
+    background: #3f7ae3;
+    color: #fff;
+  }
+  div.vendor_store_apply .custom_col .show_image_area{
+    width: 160px;
+    border: #dcdcdc 1px solid;
+    margin: 0 10px 0 0;
+    padding: 0;
+  }
+  div.vendor_store_apply .tab-content .custom_col{
+    width: 280px;
+  }
+  div.vendor_store_apply .tab-content .custom_col:first-child{
+    margin-left: 50px;
+  }
+  div.vendor_store_apply .custom_col .row .col-md-5:last-child{
+    width: 110px;
+  }
+  div.vendor_store_apply .custom_col .row .col-md-5:last-child span{
+    margin-top: 85% !important;
+    padding-bottom: 0 !important;
+  }
+  .hoverShow{
+    position: absolute;
+    width: 30px;
+    height: 30px;
+    top: 0px;
+    right: 0;
+    background: rgba(0,0,0,.4);
+    display: none;
+  }
+
+  div.vendor_store_apply .custom_col .show_image_area:hover .hoverShow{
+    display: block;
+  }
+  div.vendor_store_apply .custom_col .show_image_area .deleteImg{
+    position: absolute;
+    right: 7px;
+    top: 0;
+    display: inline-block;
+    padding: 0;
+    margin-top: 6px;
+    font-size: 18px;
+    color: #fff;
+  }
+  .hover-show a{
+    color: #fff;
+    text-decoration: none;
+  }
+  .hover-show a:hover, .hover-show a:active, .hover-show a:focus{
+    color: #fff;
+    text-decoration: none;
+  }
+ /* .dropdown-menu>.active>a, .dropdown-menu>.active>a:focus, .dropdown-menu>.active>a:hover {
+    color: #fff;
+  }*/
+  .dropdown-menu {
+    display: block;
+    left: 14px;
+  }
+  /*
+  radio
+  */
+  .radioLabel {
+    line-height: 20px;
+    cursor: pointer;
+  }
+  .radioLabel label{
+    width: 16px;
+    height: 16px;
+    background: url("/images/messageBoard/radio.png");
+    background-position: 0 -1px;
+    vertical-align: middle;
+    margin-bottom: 0 !important;
+    margin-right: 0 !important;
+    cursor: pointer;
+  }
+  .radioLabel input[type="radio"]:checked + label {
+    background-position: -19px -1px;
+  }
+  .radioLabel input[type="radio"] + label + span {
+    margin-left: 5px;
+  }
+  .radioLabel input[type="radio"]:checked + label{
+    color: #5078cb;
+  }
+  .radioLabel input[type="radio"]{
+    display: none;
+  }
+  .radioLabel span {
+    font-weight: bold;
+    font-size: 18px;
+    color: #5e5e5e;
+  }
+  .radioCheck {
+    padding-top: 35px;
+    padding-left: 30px;
+    padding-bottom: 35px;
+  }
+  .radioCheck .radioLabel:first-child {
+    margin-right: 10px;
+  }
+  .btn-area {
+    margin-top: 20px;
+    text-align: center;
+  }
+  .btn-area span {
+    height: 35px;
+    line-height: 35px;
+    border: 1px solid #5078cb;
+    padding: 0 62px;
+    font-size: 16px;
+    display: inline-block;
+    color: #5078cb;
+    cursor: pointer;
+    background: #fff;
+  }
+  .btn-area span:first-child{
+    margin-right: 16px;
+  }
+  .btn-area span:last-child{
+    background: #5078cb;
+    color: #fff;
+  }
+/*  .btn-area span:hover {
+
+  }*/
+  .loading {
+    position: fixed;
+    top: 0;
+    left: 0;
+    right: 0;
+    width:  100%;
+    height: 100%;
+    z-index: 1000;
+    text-align: center;
+  }
+  .loading img {
+    position: relative;
+    top: 40%;
+  }
+  .btn-area .btn-disabled {
+    cursor: not-allowed;
+    opacity: .5;
+  }
+</style>

+ 45 - 2
components/search/GoodList.vue

@@ -144,8 +144,16 @@
             </td>
           </tr>
           <tr v-if="good_list.components.length == 'undefined' ||good_list.components.length == 0">
-            <td colspan="10" class="text-center" style="line-height: 40px; font-size: 20px;">
-              <i class="fa fa-smile-o fa-lg"></i> 暂无产品信息
+            <td colspan="12">
+              <div class="empty">
+                <p class="empty-img">
+                  <img src="/images/brandList/empty-cart.png">
+                </p>
+                <div class="empty-info">
+                  <p class="grey"> 暂无产品信息 </p>
+                  <a href="javascript:history.go(-1)"><i class="fa fa-mail-reply fa-xs"></i>返回上一页</a>
+                </div>
+              </div>
             </td>
           </tr>
           </tbody>
@@ -694,4 +702,39 @@
     color: #f39801;
   }
 
+/**/
+.product-list tbody>tr .empty{
+  overflow: hidden;
+  margin: 0!important;
+  height:130px;
+  display:inline-flex;
+  align-items: center;
+}
+.product-list tbody>tr .empty .empty-img{
+  margin:0;
+  border:0;
+  min-width:143px;
+  min-height:72px;
+}
+.product-list tbody>tr .empty .empty-img img {
+  margin: 0;
+  border: 0;
+  min-width: 143px;
+  min-height: 72px;
+}
+.product-list tbody>tr .empty-info{
+  line-height: 14px;
+  width: 143px;
+}
+.product-list tbody>tr .grey{
+  color: #999;
+  font-size: 14px;
+}
+.product-list tbody>tr .empty .empty-info>a{
+  font-size: 14px;
+  color: #5078cb;
+}
+.product-list tbody>tr .empty .empty-info i{
+  margin-right:5px;
+}
 </style>

+ 6 - 6
components/search/Kind.vue

@@ -366,7 +366,7 @@
           this.or_click_flag = false
         }
         let idx = this.getIndex(this.type_arr, type)
-        this.type_arr.splice(idx, idx + 1)
+        this.type_arr.splice(idx, 1)
         this.$emit('typeFilterEvent', this.type_arr)
       },
       click_crname: function (name) {
@@ -384,7 +384,7 @@
       },
       cancel_crname: function (name) {
         let idx = this.getIndex(this.crname_arr, name)
-        this.crname_arr.splice(idx, idx + 1)
+        this.crname_arr.splice(idx, 1)
         if (this.crname_arr.length === 1) {
           this.crname_arr = []
         }
@@ -399,16 +399,16 @@
       click_kind_exp: function (id, index) {
         let idx = this.getIndex(this.kind_arr, id)
         this.list_kind[this.kind_exp_arr[index].index] = this.kind_exp_arr[index]
-        this.kind_arr.splice(idx, idx + 1)
+        this.kind_arr.splice(idx, 1)
         this.$emit('kindFilterEvent', this.kind_arr)
-        this.kind_exp_arr.splice(index, index + 1)
+        this.kind_exp_arr.splice(index, 1)
       },
       click_brand_exp: function (id, index) {
         let idx = this.getIndex(this.brand_arr, id)
         this.list_brand[this.brand_exp_arr[index].index] = this.brand_exp_arr[index]
-        this.brand_arr.splice(idx, idx + 1)
+        this.brand_arr.splice(idx, 1)
         this.$emit('brandFilterEvent', this.brand_arr)
-        this.brand_exp_arr.splice(index, index + 1)
+        this.brand_exp_arr.splice(index, 1)
       },
       restore: function (name) {
         if (name === 'kind') {

+ 1 - 4
components/searchStore/StoreContent.vue

@@ -1,5 +1,5 @@
 <template>
-  <div>
+  <div id="search-store-content">
   <ul class="store-list" v-if="storeData.content && storeData.content.length > 0">
     <li v-for="(store, index) in storeData.content">
       <div class="store-content-left">
@@ -308,9 +308,6 @@
     color: #008B00;
     margin-top: 0;
   }
-  .el-dialog__body{
-    padding: 20px !important;
-  }
   .focus button.focus-btn a{
     color: #fff;
   }

+ 2 - 2
components/store/BaseInfo.vue

@@ -5,8 +5,8 @@
         <div class="menu-com row">
           <div class="menu-title col-md-12">
             <a href="/">商城首页</a> >
-            <a href="provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</a>
-            <a href="provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</a>
+            <a href="/provider/home" v-if="storeInfo.type == 'AGENCY' || storeInfo.type == 'DISTRIBUTION'" title="代理经销">代理经销</a>
+            <a href="/provider/factories" v-if="storeInfo.type == 'ORIGINAL_FACTORY'" title="原厂专区">原厂专区</a>
             <a :href="'/store/' + storeInfo.uuid" v-if="storeInfo.type == 'CONSIGNMENT'" title="库存寄售">库存寄售</a>
             >
             <span v-if="storeInfo.type != 'CONSIGNMENT'"><a :href="'/store/' + storeInfo.uuid" :title="storeInfo.storeName" v-text="storeInfo.storeName">店铺名称</a>> </span>

+ 5 - 1
components/store/CommodityInfo.vue

@@ -381,7 +381,11 @@ export default {
                     })
                   }
                 } else {
-                  this.$message.error(response.data.message)
+                  if (response.data.code === 2) {
+                    this.$message.error(response.data.message + ',请刷新页面')
+                  } else {
+                    this.$message.error(response.data.message)
+                  }
                 }
               })
           }

+ 6 - 2
components/store/CommodityList.vue

@@ -115,7 +115,7 @@
                 </div>
                 <div class="col-xs-4 txt-info">
                   <p class="grey f16">暂无器件信息</p>
-                  <i class="iconfont">&#xe610;</i>&nbsp;<a href="/">返回首页</a>
+                  <a href="/">马上去逛一逛</a>
                 </div>
               </div>
             </td>
@@ -500,7 +500,7 @@ export default {
 		color: #fff;
 	}
 	.category-content{
-		min-height: 243px;
+		/*min-height: 243px;*/
 	}
 	.no-record{
 		font-size: 14px;
@@ -530,6 +530,10 @@ export default {
 	}
 	.text-center  .txt-info a{
 		font-size: 14px;
+    display: block;
+    color: #5078cb;
+    background: url('/images/all/icon_nianxian.jpg')no-repeat 105px center;
+    padding-left: 50px;
 	}
 	.text-center  .col-xs-4 i{
 		color: #5078cb;

+ 1 - 1
components/store/ComponentInfo.vue

@@ -9,7 +9,7 @@
           <div class="property-name">
             <span v-text="property.property.labelCn"></span>:
           </div>
-          <div class="property-value" v-text="property.value"></div>
+          <div class="property-value">{{property.value ? property.value : '-'}}</div>
         </li>
         <li v-if="!component.properties || component.properties.length === 0" class="text-info">
           <!--<i class="fa fa-smile-o fa-lg"></i> 暂无参数信息-->

+ 5 - 1
components/store/RecommendProduct.vue

@@ -145,7 +145,11 @@
                       })
                     }
                   } else {
-                    this.$message.error(response.data.message)
+                    if (response.data.code === 2) {
+                      this.$message.error(response.data.message + ',请刷新页面')
+                    } else {
+                      this.$message.error(response.data.message)
+                    }
                   }
                 })
             }

+ 25 - 0
layouts/default.vue

@@ -15,6 +15,31 @@
       HeaderView: Header,
       FooterView: Footer,
       RightBar
+    },
+    head () {
+      return {
+        title: this.title
+      }
+    },
+    computed: {
+      title () {
+        let path = this.$route.path
+        if (path.startsWith('/help/helpList/')) {
+          return this.helpTitle.item + '-优软商城'
+        } else if (path.startsWith('/help/helpDetail')) {
+          return this.helpDetail.title + '-优软商城'
+        } else if (path.startsWith('/help')) {
+          return '帮助中心-优软商城'
+        } else {
+          return '【优软商城】IC电子元器件现货采购交易平台商城'
+        }
+      },
+      helpTitle () {
+        return this.$store.state.help.title.data
+      },
+      helpDetail () {
+        return this.$store.state.help.detail.data
+      }
     }
   }
 </script>

+ 45 - 0
layouts/errorPage.vue

@@ -0,0 +1,45 @@
+<template>
+  <div class="error">
+    <div class="section">
+      <div class="container">
+        <div class="btn-click">
+          <a href="/"><i class="fa fa-home" style="margin-right:5px;"></i>返回首页</a>
+          <a href="javascript:history.go(-1)"><i class="fa fa-reply" style="margin-right:5px;"></i>返回上一页</a>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: ['error']
+  }
+</script>
+
+<style scoped lang="scss">
+  .section{
+    background: #ebfdff url('/images/404.png')no-repeat center center;
+    height:900px;
+    position:relative;
+  }
+  .section .btn-click{
+    position:absolute;
+    top:54%;
+    left:50%;
+    margin-left:-150px;
+  }
+  .section .btn-click a{
+    display:inline-block;
+    width:130px;
+    height:33px;
+    font-size: 16px;
+    line-height: 33px;
+    color:#fff;
+    background: #f87c29;
+    text-align: center;
+    margin:0 10px;
+    border-radius: 2px;
+    text-decoration: none;
+  }
+</style>

+ 99 - 0
layouts/main.vue

@@ -19,6 +19,105 @@
       RightBar,
       MainHeader,
       MainNav
+    },
+    head () {
+      return {
+        title: this.title,
+        meta: [
+          {hid: 'description', name: 'description', content: this.description},
+          {hid: 'keywords', name: 'keywords', content: this.keywords}
+        ]
+      }
+    },
+    computed: {
+      title () {
+        let path = this.$route.path
+        if (path === '/product/kind/home') {
+          return '电子元器件器件选型参数型号查询器件类别分类大全-优软商城'
+        } else if (path.startsWith('/product/kind/')) {
+          return this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全-优软商城'
+        } else if (path.startsWith('/product/component/')) {
+          return this.componentDetail.brand.nameCn + this.componentDetail.code + '参数|供应商|数据手册中文资料|规格书-优软商城'
+        } else if (path.startsWith('/product/brand/brandList/')) {
+          return 'IC电子元器件品牌中心品牌大全-优软商城'
+        } else if (path.startsWith('/product/brand/')) {
+          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn + ')产品分类及产品型号大全-优软商城'
+        } else if (path === '/provider/factories') {
+          return 'IC电子元器件厂家原厂直销原厂专卖店大全-优软商城'
+        } else if (path === '/provider/home') {
+          return 'IC电子元器件代理商经销商专营店大全-优软商城'
+        } else if (path === '/news') {
+          return 'IC电子元器件行业市场资讯新闻-优软商城'
+        } else if (path.startsWith('/news/')) {
+          return this.newsDetail.title + '-电子元器件行业资讯-优软商城' || 'IC电子元器件行业市场资讯新闻-优软商城'
+        } else if (path === '/search') {
+          return this.$route.query.w + '-产品搜索-优软商城'
+        } else if (path === '/searchStore') {
+          return this.$route.query.w + '-店铺搜索-优软商城'
+        } else {
+          return '【优软商城】IC电子元器件现货采购交易平台商城'
+        }
+      },
+      description () {
+        let path = this.$route.path
+        if (path === '/product/kind/home') {
+          return '优软商城电子元器件器件型号查询器件类别分类大全,优软商城提供元器件智能选型服务,能让您完美的找到热门型号的替代型号产品,一键搜索功能让您快速找到您想要的型号。'
+        } else if (path.startsWith('/product/kind/')) {
+          return '优软商城' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号大全,能让您快速的找到' + this.kinds[this.kinds.length - 1].nameCn + '产品品牌型号。'
+        } else if (path.startsWith('/product/component/')) {
+          return '优软商城提供' + this.componentDetail.brand.nameCn + this.componentDetail.code + '数据手册中文资料规格书下载,' + this.componentDetail.code + '供应商及参数报价。'
+        } else if (path.startsWith('/product/brand/brandList/')) {
+          return 'IC电子元器件品牌中心品牌大全,优软商城品牌中心汇聚国内国际电子元器件品牌,全力打造国家级元器件电商品台。'
+        } else if (path.startsWith('/product/brand/')) {
+          return this.brandDetail.brief
+        } else if (path === '/provider/factories') {
+          return 'IC电子元器件厂家原厂直销原厂专卖店大全,优软商城原厂专区提供IC电子元器件厂家原厂直销原厂专卖店大全。'
+        } else if (path === '/provider/home') {
+          return 'IC电子元器件代理商经销商专营店大全,优软商城代理经销专区提供IC电子元器件代理商经销商专卖店大全。'
+        } else if (path === '/news') {
+          return '优软商城电子元器件采购网提供精准的电子快讯,电子资讯,电子元器件资讯。'
+        } else if (path.startsWith('/news/')) {
+          return this.newsDetail.summary
+        } else {
+          return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+        }
+      },
+      keywords () {
+        let path = this.$route.path
+        if (path === '/product/kind/home') {
+          return '电子元器件分类,电子元器件参数,电子元器件型号,电子元器件类别'
+        } else if (path.startsWith('/product/kind/')) {
+          return this.kinds[this.kinds.length - 1].nameCn
+        } else if (path.startsWith('/product/component/')) {
+          return this.componentDetail.code + '供应商,' + this.componentDetail.code + '数据手册,' + this.componentDetail.code + '规格书'
+        } else if (path.startsWith('/product/brand/brandList/')) {
+          return 'ic,元器件,品牌'
+        } else if (path.startsWith('/product/brand/')) {
+          return this.brandDetail.nameEn + '(' + this.brandDetail.nameCn
+        } else if (path === '/provider/factories') {
+          return '电子元器件原厂,电子元器件厂家'
+        } else if (path === '/provider/home') {
+          return 'ic代理商,ic经销商,电子元器件代理商 , 电子元器件经销商'
+        } else if (path === '/news') {
+          return '元器件新闻,电子资讯,电子元器件资讯'
+        } else if (path.startsWith('/news/')) {
+          return ''
+        } else {
+          return '优软商城'
+        }
+      },
+      kinds () {
+        return this.$store.state.product.kind.kindsParentWithBother.data
+      },
+      componentDetail () {
+        return this.$store.state.componentDetail.detail.data
+      },
+      brandDetail () {
+        return this.$store.state.brandDetail.detail.data
+      },
+      newsDetail () {
+        return this.$store.state.newsData.detailNews.detailNews.data
+      }
     }
   }
 </script>

+ 76 - 0
layouts/shop.vue

@@ -12,6 +12,9 @@
   import { Header, Footer, RightBar } from '~components/default'
   import { StoreHeader, StoreTitle } from '~components/store'
 
+  function getCount (str, char) {
+    return str.split(char).length - 1
+  }
   export default {
     name: 'shop',
     components: {
@@ -20,6 +23,79 @@
       RightBar,
       StoreHeader,
       StoreTitle
+    },
+    head () {
+      return {
+        title: this.title,
+        meta: [
+          {hid: 'description', name: 'description', content: this.description},
+          {hid: 'keywords', name: 'keywords', content: this.keywords}
+        ]
+      }
+    },
+    computed: {
+      title () {
+        let path = this.$route.path
+        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
+            return this.storeInfo.storeName + this.getStoreType(this.storeInfo.type) + '专卖店-优软商城'
+          } else {
+            return 'IC电子元器件库存寄售呆滞尾料空闲库存商城自营现货寄售-优软商城'
+          }
+        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          return this.commodity.brandNameEn + this.commodity.code + '价格|现货库存|报价|产品参数-优软商城'
+        } else {
+          return '【优软商城】IC电子元器件现货采购交易平台商城'
+        }
+      },
+      description () {
+        let path = this.$route.path
+        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
+            return this.storeInfo.storeName + '官方' + this.getStoreType(this.storeInfo.type) + '专卖店,提供最新IC电子元器件现货在线销售。'
+          } else {
+            return '优软商城为您提供IC电子元器件库存寄售呆滞尾料空闲库存现货寄售服务,商城自营现货寄售让您更放心更省心。'
+          }
+        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          return this.commodity.enterpriseName + '提供' + this.commodity.brandNameEn + this.commodity.code + '价格和' + this.commodity.code + '现货库存,并且内容还包含' + this.commodity.code + '产品参数、' + this.commodity.code + '规格书数据手册等。'
+        } else {
+          return '优软商城(usoftmall.com)是中国领先的IC电子元器件现货采购交易网上商城,提供上千万种电子元器件现货采购交易,采购电子元器件就上优软商城!'
+        }
+      },
+      keywords () {
+        let path = this.$route.path
+        if (path.startsWith('/store/') && getCount(path, '/') === 2) {
+          if (path.indexOf('33069557578d44e69bd91ad12d28a8d4') === -1) {
+            return '电子元器件' + this.getStoreType(this.storeInfo.type) + '专卖店'
+          } else {
+            return '优软商城,ic芯片库存寄售,电子元器件寄售'
+          }
+        } else if (path.startsWith('/store/') && getCount(path, '/') === 3) {
+          return this.commodity.code + '价格,' + this.commodity.code + '现货,' + this.commodity.code + '报价,' + this.commodity.code + '产品参数'
+        } else {
+          return '优软商城'
+        }
+      },
+      storeInfo () {
+        return this.$store.state.shop.storeInfo.store.data
+      },
+      commodity () {
+        return this.$store.state.shop.storeInfo.commodity.data
+      }
+    },
+    methods: {
+      getStoreType: function (type) {
+        if (type === 'ORIGINAL_FACTORY') {
+          return '原厂'
+        } else if (type === 'AGENCY') {
+          return '代理'
+        } else if (type === 'DISTRIBUTION') {
+          return '经销'
+        } else if (type === 'CONSIGNMENT') {
+          return '寄售'
+        }
+        return ''
+      }
     }
   }
 </script>

+ 2 - 8
middleware/authenticated.js

@@ -1,13 +1,7 @@
-
-export default function ({ isServer, store, req, redirect }) {
+export default function ({ isServer, store, req, redirect, route }) {
   // If nuxt generate, pass this middleware
   if (isServer && !req) return
-
   if (!store.state.option.user.logged) {
-    this.$http.get('/logout/crossBefore').then(response => {
-      if (response.data) {
-        window.location.href = response.data.logoutUrl + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
-      }
-    })
+    return redirect('/auth/login')
   }
 }

+ 2 - 2
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://10.10.100.107:8081/platform-b2c/' : 'http://192.168.253.60:9090/platform-b2c/')
+const baseUrl = process.env.BASE_URL || (isProdMode ? 'http://www.usoftmall.com/' : 'http://192.168.253.60:9090/platform-b2c/')
 
 module.exports = {
   router: {
@@ -107,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/**', '/produce/**', '/file**', '/rate/**', '/log/**', '/help-service/**']
+  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/**', '/file**', '/rate/**', '/log/**', '/help-service/**', '/keyword/**']
 }

+ 15 - 0
pages/auth/login.vue

@@ -0,0 +1,15 @@
+<template>
+
+</template>
+<script>
+  export default {
+    layout: 'login',
+    mounted () {
+      this.$http.get('/login/page', {params: {returnUrl: window.location.protocol + '//' + window.location.host}}).then(response => {
+        if (response.data) {
+          window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
+        }
+      })
+    }
+  }
+</script>

+ 9 - 0
pages/error/index.vue

@@ -0,0 +1,9 @@
+<template>
+  <div id="error">404</div>
+</template>
+<script>
+  export default {
+    name: 'error',
+    layout: 'errorPage'
+  }
+</script>

+ 0 - 2
pages/news/_id.vue

@@ -8,7 +8,6 @@
 <script>
   import Left from '~components/news/Left.vue'
   import Detail from '~components/news/Detail.vue'
-  import NuxtLink from '../../.nuxt/components/nuxt-link'
   export default {
     layout: 'main',
     fetch ({store, route}) {
@@ -18,7 +17,6 @@
       ])
     },
     components: {
-      NuxtLink,
       Left,
       Detail
     }

+ 321 - 336
pages/register-saler/index.vue

@@ -1,351 +1,336 @@
 <template>
-  <div class="container vendor_store_apply">
-    <div>
-      <!-- Nav tabs -->
-      <ul class="nav nav-tabs">
-        <li><div style="height: 39px;line-height: 39px;font-size: 14px;">店铺类型:</div></li>
-        <li class="custom_tab" :class="{active: tab == 'ORIGINAL_FACTORY'}" @click="toggleTab('ORIGINAL_FACTORY')">
-          <a href="javascript:void(0)">原厂</a>
-        </li>
-        <li class="custom_tab" :class="{active: tab == 'AGENCY'}" @click="toggleTab('AGENCY')">
-          <a href="javascript:void(0)">代理商</a>
-        </li>
-        <li class="custom_tab" :class="{active: tab == 'DISTRIBUTION'}" @click="toggleTab('DISTRIBUTION')">
-          <a href="javascript:void(0)">经销商</a>
-        </li>
-      </ul>
-      <!-- Tab panes -->
-      <div class="tab-content" style="border: 1px #5078CB solid; padding-bottom: 30px;">
-        <!-- 原厂 -->
-        <div role="tabpanel" class="tab-pane" v-if="tab == 'ORIGINAL_FACTORY'" :class="{active: tab == 'ORIGINAL_FACTORY'}">
-          <div class="row com_row">
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img :src="qualifications.url==''?'images/all/upload-apply.png':qualifications.url" class="previewImage"/>
-                    <input type="file" v-if="!qualifications.url" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" />
-                  </div>
-                  <div class="hover-show" v-if="qualifications.url">
-                    <span class="delete" title="删除" @click="deleteImg(qualifications.url)"><i class="fa fa-trash"></i></span>
-                    <a @click="showImg(qualifications.url)"><i class="fa fa-search"></i>查看</a>
-                  </div>
-                  <!--上传是的PDF图片-->
-                  <!--<div v-if="qualifications.isPdf">-->
-                    <!--<div class="preview">-->
-                      <!--<img src="images/all/timg.png" />-->
-                    <!--</div>-->
-                  <!--</div>-->
-                  <!--查看大图 begin-->
-                  <div id="image-box" v-if="isShow">
-                    <div class="x-floating-wrap"></div>
-                    <div class="x-floating">
-                      <div id="item-content">
-                        <div class="x-close-wrap" @click="isShow = false"><a href="javascript:void(0);">&times;</a></div>
-                        <div class="img"><img :src="qualifications.url"/></div>
-                      </div>
-                    </div>
-                  </div>
-                  <!--查看大图 end-->
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
-          </div>
-          <!--增加品牌-->
-          <div class="brand-type row">
-            <div class="col-md-1">品牌1<em>*</em></div>
-            <div class="col-md-7">
-              <input type="text" class="form-control" name="brandName"  autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
-            </div>
-            <div class="brand-small-upload col-md-4">
-              <div class="brand-small-img">
-                <div class="preview ">
-                  <img src="images/all/upload-apply.png"  class="previewImage"/>
-                </div>
-                <div class="hover-show">
-                  <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                  <a><i class="fa fa-search"></i>查看</a>
-                </div>
-              </div>
-              <div class="file-text">品牌logo/商标注册原件/授权说明书</div>
-              <div class="delete" title="删除"><i class="fa fa-trash"></i></div>
-              <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
-            </div>
-          </div>
-          <div class="add-brand row">
-            <a href="javascript:void(0)" title="增加品牌" ng-click="addBrand()"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
-          </div>
-          <div class="unpass-reason row" style="display: none">
-            原因:<span style="color: #d32526;">原因</span>
-          </div>
-        </div>
-        <!--原厂end-->
-        <!--代理商 begin-->
-        <div role="tabpanel" class="tab-pane" v-if="tab == 'AGENCY'" :class="{active: tab == 'AGENCY'}">
-          <div class="row com_row">
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
-          </div>
-          <!--增加品牌-->
-          <div class="brand-type row">
-            <div class="col-md-1">品牌1<em>*</em></div>
-            <div class="col-md-7">
-              <input type="text" class="form-control" name="brandName"  autocomplete="off" placeholder="请输入英文品牌或中文品牌,如:松下; panasonic等"/>
-            </div>
-            <div class="brand-small-upload col-md-4">
-              <div class="brand-small-img">
-                <div class="preview ">
-                  <img src="images/all/upload-apply.png"  class="previewImage"/>
-                </div>
-                <div class="hover-show">
-                  <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                  <a><i class="fa fa-search"></i>查看</a>
-                </div>
-              </div>
-              <div class="file-text">代理资格证/代理授权书</div>
-              <div class="delete" title="删除"><i class="fa fa-trash"></i></div>
-              <div class="col-md-12"> <em>*</em>仅支持JPG、PNG、GIF、PDF格式,大小不超过3M</div>
-            </div>
-          </div>
-          <div class="add-brand row">
-            <a href="javascript:void(0)" title="增加品牌" ng-click="addBrand()"><em><i class="fa fa-plus-circle"></i>增加品牌</em></a>
-          </div>
-          <div class="unpass-reason row" style="display: none">
-            原因:<span style="color: #d32526;">原因</span>
-          </div>
-        </div>
-        <!--代理商 end-->
-        <!--经销商 begin-->
-        <div role="tabpanel" class="tab-pane" v-if="tab == 'DISTRIBUTION'" :class="{active: tab == 'DISTRIBUTION'}">
-          <div class="row com_row">
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">营业执照<em style="color: #FF0000;">*</em></span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">纳税人证明</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-4 custom_col">
-              <div class="row" style="margin: 0;">
-                <div class="col-md-5 col-md-offset-1 show_image_area show_image">
-                  <div class="preview">
-                    <img src="images/all/upload-apply.png" class="previewImage"/>
-                  </div>
-                  <div class="hover-show">
-                    <span class="delete" title="删除"><i class="fa fa-trash"></i></span>
-                    <a><i class="fa fa-search"></i>查看</a>
-                  </div>
-                </div>
-                <div class="col-md-5" style="padding: 0;">
-                  <span style="margin-top: 50%;padding-right: 20px;">税务登记证</span>
-                </div>
-              </div>
-            </div>
-            <div class="col-md-12"><em>* </em>如已上传最新版营业执照(三证合一),则其他两证无需上传 ; 仅支持JPG、PNG、GIF、PDF格式,每张大小不超过3M</div>
-          </div>
-        </div>
-        <!--经销商 end-->
-      </div>
-      <!-- Submit button -->
-      <div style="padding: 28px 40px;">
-        <button type="button" class="btn btn-primary" style="float: right">提交申请</button>
-        <div class="clear-fix"></div>
-      </div>
-    </div>
-    <!--删除上传图片-->
-    <div class="com-del-box" style="display: none">
-      <div class="title">
-        <a><i class="fa fa-close fa-lg"></i></a>
-      </div>
-      <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>是否删除选中信息</p>
-        <div><a>取消</a><a>确认</a></div>
-      </div>
-    </div>
-    <!--删除品牌图片-->
-    <div class="com-del-box" style="display: none">
-      <div class="title">
-        <a><i class="fa fa-close fa-lg"></i></a>
-      </div>
-      <div class="content">
-        <p><i class="fa fa-exclamation-circle"></i>品牌信息为重要信息,确定删除吗?</p>
-        <div><a>取消</a><a>确认</a></div>
-      </div>
-    </div>
-    <!--提示框-->
-    <div class="com-del-box" style="display: none;">
-      <div class="title">
-        <a><i class="fa fa-close fa-lg"></i></a>
-      </div>
-      <div class="content">
-        <p style="line-height: 20px;margin-top: 10px;">非常抱歉,目前暂无此品牌!您可在<br/>“品牌申请”中,提出申请。</p>
-        <p style="line-height: 20px;">前往<a style="color: #5078CB">品牌申请&nbsp;<i class="fa fa-arrow-right"></i></a></p>
-      </div>
+  <div class="become-store">
+    <div class="all-content">
+      <reg-header></reg-header>
+      <register></register>
     </div>
   </div>
 </template>
 <script>
-//  function isPdf (path) {
-//    // 根据path文件名来判断文件是否是PDF文件
-//    if (path) {
-//      let str = path.slice(path.lastIndexOf('.')).toLowerCase()
-//      if (str === '.pdf') {
-//        return true
-//      } else {
-//        return false
-//      }
-//    } else {
-//      return false
-//    }
-//  }
+  import { RegHeader, Register } from '~components/register-saler'
   export default {
     name: 'index',
-    data () {
-      return {
-        tab: 'ORIGINAL_FACTORY',
-        qualifications: {
-          url: ''
-        },
-        isShow: false
-      }
+    middleware: 'authenticated',
+    components: {
+      RegHeader,
+      Register
     },
-    methods: {
-      toggleTab (t) {
-        this.tab = t
-      },
-      update (e) {
-        let file = e.target.files[0]
-        let param = new FormData()
-        param.append('file', file, file.name)
-        param.append('chunk', '0')
-        console.log(param.get('file'))
-        let config = {
-          headers: {'Content-Type': 'multipart/form-data'}
-        }
-        this.$http.post('/api/images', param, config)
-          .then(response => {
-            this.qualifications.url = response.data[0].path
-          })
-      },
-      showImg (imgUrl) {
-        this.qualifications.url = imgUrl
-        this.isShow = true
-      },
-      deleteImg () {
-        this.qualifications.url = ''
+    computed: {
+      user () {
+        return this.$store.state.option.user
       }
     }
+//    mounted () {
+//      if (!this.user.logged) {
+//        this.$http.get('/login/page', {params: {returnUrl: window.location.href}}).then(response => {
+//          if (response.data) {
+//            window.location.href = response.data.content + '&baseUrl=' + encodeURIComponent(window.location.protocol + '//' + window.location.host + response.data.baseUrl)
+//          }
+//        })
+//      }
+//    }
   }
 </script>
 <style>
+  /* 公共模块 */
+  body{
+    background: #F5F5F5;
+    font-family: "Microsoft Yahei", "微软雅黑";
+  }
+  .become-store{
+    width: 100%;
+    margin: 0 auto;
+  }
+  .become-store .all-content{
+    width: 1026px;
+    margin: 0 auto;
+    background: #fff;
+    padding-bottom: 40px;
+    border: #e8e8e8 1px solid;
+  }
+  .become-store .all-content .h3{
+    font-size: 24px;
+    line-height: 80px;
+    text-align: center;
+    font-weight: bold;
+  }
+  .become-store .all-content .header-title{
+    width: 70%;
+    margin: 0 auto;
+    margin-bottom: 40px;
+  }
+  .become-store .all-content .header-title .col-md-6{
+    padding: 0 45px;
+  }
+  .become-store .all-content .header-title .col-md-6 img {
+    margin-left: 95px;
+  }
+  .become-store .all-content .header-title h4{
+    font-size: 18px;
+    line-height: 30px;
+    text-align: center;
+    margin-top: 5px;
+    margin-bottom: 10px;
+  }
+  .become-store .all-content .header-title p{
+    font-size: 14px;
+    line-height: 25px;
+    color: #666;
+    margin-bottom: 30px;
+  }
+  .step-menu{
+    width: 100%;
+    margin: 0 auto;
+    height: 34px;
+    background: #e8e8e8;
+    line-height: 34px;
+  }
+  .step-menu ul{
+    width: 100%;
+    margin: 0 auto;
+  }
+  .step-menu ul li{
+    width: 33.33333333%;
+    float: left;
+    height: 34px;
+    line-height: 34px;
+    font-size: 14px;
+    color: #555;
+    text-align: center;
+    position: relative;
+    cursor: default!important;
+  }
+  .step-menu ul li:hover{
+    cursor: pointer;
+    /*background: #0099ff;
+    color: #fff;*/
+  }
+  .step-menu ul li.active{
+    background: #5078cb;
+    color: #fff;
+  }
+  .become-store .section{
+    width: 100%;
+    margin: 0 auto;
+  }
+  .become-store .section .register{
+    width: 95%;
+    margin: 0 auto;
+    padding-top: 30px;
+  }
+  .become-store .section .register .row{
+    line-height: 34px;
+    padding-bottom: 15px;
+    margin: 0 auto;
+  }
+  .become-store .section .register .row p{
+    margin-bottom: 0;
+  }
+  .become-store .section .register .row .form-control{
+    border-color: #ccc;
+    border-radius: 0;
+    box-shadow: none;
+  }
+  .x-form-set-header {
+    position: relative;
+    margin-bottom: 45px;
+  }
+  .x-form-set-header h4 {
+    font-size: 20px;
+    font-weight: 400;
+    color: #888;
+    margin-top: 0;
+    padding-bottom: 14px;
+    text-align: center;
+  }
+  .x-form-set-header:after {
+    content: "";
+    width: 120px;
+    height: 2px;
+    background: #5078cb;
+    position: absolute;
+    left: 0;
+    right: 0;
+    margin: 0 auto;
+    bottom: 0;
+  }
+  .x-required:before {
+    position: relative;
+    bottom: -5px;
+    content: "* ";
+    font-size: 18px;
+    color: #f4645f;
+  }
+  .register label{
+    font-size: 14px;
+    color: #555;
+    text-align: right;
+    padding-right: 10px;
+  }
+  .next-btn{
+    width: 100%;
+    margin: 0 auto;
+    text-align: center;
+    padding-top: 30px !important;
+  }
+  .next-btn button{
+    width: 175px;
+    padding: 0;
+    height: 35px;
+    line-height: 35px;
+    border-radius: 0;
+    background: #5078cb;
+    color: #fff;
+    letter-spacing: 4px;
+    margin-right: 20px;
+  }
+  .no-apply{
+    width: 150px;
+    height: 34px;
+    line-height: 34px;
+    background: #0099ff;
+    text-align: center;
+    border: none;
+    font-size: 14px;
+    color: #fff;
+    margin-top: 30px;
+    margin: 0 20px;
+    float: right;
+    border-radius: 3px;
+  }
+  .next-btn button:hover, .next-btn button:focus {
+    background: #3765cb;
+    color: #fff;
+  }
+  .agreement{
+    width: 100%;
+    margin: 0 auto;
+  }
+  .step-last{
+    width: 92%;
+    margin: 0 auto;
+  }
+  .step-last .h4{
+    font-size: 18px;
+    line-height: 40px;
+    margin: 20px 0 0 0;
+  }
+  .step-last p.title{
+    font-size: 14px;
+    color: #666;
+    line-height: 30px;
+    text-align: left;
+    width: 100% !important;
+  }
+  .apply-include{
+    width: 100%;
+    margin: 0 auto;
+    height: 300px;
+    border: #e8e8e8 1px solid;
+    line-height: 300px;
+    font-size: 18px;
+    text-align: center;
+  }
+  /*服务协议*/
+  .join_xieyi
+  {
+    width:703px;
+    height: 356px;
+    margin-top: 40px;
+    margin-left: 190px;
+  }
+  .join_xieyi div.article-flag {
+    width: 26px;
+    display: inline-block;
+  }
+  .join_xieyi div.article-flag span {
+    display: block;
+    height: 176px;
+    border: 1px solid;
+    text-align: center;
+    padding-top: 23px;
+    cursor: pointer;
+    background: #e5e5e5;
+    color: #a0a0a0;
+  }
+  .join_xieyi div.article-flag span:first-child {
+    border-bottom: none;
+  }
+  /*.join_xieyi div.article-flag span:hover {
+    color: #708ed2;
+    border-color: #708ed2;
+    background: #fff;
+  }*/
+  .join_xieyi div.article-flag span.active {
+    color: #708ed2;
+    border-color: #708ed2;
+    background: #fff;
+  }
+
+  .join_xieyi div.text-area {
+    display: inline-block;
+    float: right;
+    width: 677px;
+    height: 352px;
+    overflow: auto;
+    word-break: break-all;
+    outline: none;
+    border: 2px solid #eee;
+    border-left: none;
+  }
+  .x-btn-blank{
+    border: 1px solid #ccc;
+    background: #fff;
+    color: #888;
+    position: relative;
+    overflow: hidden;
+    text-align: left;
+    display: block;
+    height: 34px;
+    line-height: 31px;
+  }
+  .file-input{
+    position: absolute;
+    font-size: 14px;
+    top: 0;
+    left: 0;
+    opacity: 0;
+  }
+  .x-btn-blank i{
+    margin-left: 5px;
+    color: #888;
+    font-size: 16px;
+    position: relative;
+    top: 2px;
+  }
+  .register .col-sm-5 i.fa-info-circle{
+    font-size: 16px;
+    color: #888;
+    position: relative;
+    top: 2px;
+    margin-right: 5px;
+  }
+  .register .col-sm-5 p, .register .col-sm-5 p i{
+    color: red !important;
+  }
+  .register .col-sm-5 span.fa-map-marker, .register .col-sm-5 span.web{
+    position: absolute;
+    top: 1px;
+    z-index: 2;
+    display: block;
+    width: 34px;
+    height: 34px;
+    line-height: 34px;
+    text-align: center;
+    color: #999;
+    font-size: 16px;
+    left: 12px;
+  }
+  .register .col-sm-5 span.web{
+    font-size:14px;
+    left:25px;
+  }
+  /* 开店申请模块 */
   .com-input{
     width: 100%;
     height: 100%;
@@ -622,7 +607,7 @@
     font-weight: bold;
     font-style: inherit;
   }
-  .add-brand a:hover em, .add-brand a:active em, .add-brand a:focus em{
+  .add-brand a:hover em{
     color: #d32526;
     text-decoration: none;
   }

+ 8 - 1
pages/searchStore/_keyword.vue

@@ -37,4 +37,11 @@
     }
   }
 </script>
-
+<style>
+  #search-store-content .el-dialog--tiny{
+    width: 320px !important;
+  }
+  #search-store-content .el-dialog__body{
+    padding: 12px !important;
+  }
+</style>

+ 7 - 1
pages/store/_uuid/index.vue

@@ -9,13 +9,19 @@ import axios from '~plugins/axios'
 import { CommodityList, RecommendProduct } from '~components/store'
 
 export default {
+//  validate ({ params }) {
+//    return false
+//  },
   layout: 'shop',
   data () {
     return {
       uuid: this.$route.params.uuid
     }
   },
-  fetch ({ store, params }) {
+  fetch ({ store, params, redirect }) {
+    if (!params.uuid) {
+      return redirect('/error')
+    }
     return Promise.all([
       store.dispatch('shop/findStoreInfoFromUuid', params),
       store.dispatch('shop/findRecommendProducts', params),

File diff suppressed because it is too large
+ 0 - 0
static/data/city.json


+ 1 - 0
static/data/profession.json

@@ -0,0 +1 @@
+{"IT|通信|电子|互联网":["互联网/电子商务","计算机软件","IT服务(系统/数据/维护)","电子技术/半导体/集成电路","计算机硬件","通信/电信/网络设备","通信/电信运营、增值服务","网络游戏"],"金融业":["基金/证券/期货/投资","保险","银行","信托/担保/拍卖/典当"],"房地产|建筑业":{"房地产/建筑/建材/工程":["房地产金融服务类","房地产工程施工类","房地产工程货物类"],"家居/室内设计/装饰装潢":"家居/室内设计/装饰装潢","物业管理/商业中心":"物业管理/商业中心"},"商业服务":["专业服务/咨询(财会/法律/人力资源等)","广告/会展/公关","中介服务","检验/认证","外包服务"],"贸易|批发|零售|租赁业":["快速消费品(食品/饮料/烟酒/日化)","耐用消费品(服饰/纺织/皮革/家具/家电)","贸易/进出口","零售/批发","租赁服务"],"文体教育|工艺美术":["教育/培训/院校","礼品/玩具/工艺美术/收藏品/奢侈品"],"生产|加工|制造":["汽车/摩托车","大型设备/机电设备/重工业","加工制造(原料加工/模具)","仪器仪表及工业自动化","印刷/包装/造纸","办公用品及设备","医药/生物工程","医疗设备/器械","航空/航天研究与制造"],"交通|运输|物流|仓储":["交通/运输","物流/仓储"],"服务业":["医疗/护理/美容/保健/卫生服务","酒店/餐饮","旅游/度假"],"文化|传媒|娱乐|体育":["媒体/出版/影视/文化传播","娱乐/体育/休闲"],"能源|矿产|环保":["能源/矿产/采掘/冶炼","石油/石化/化工","电气/电力/水利","环保"],"政府|非盈利机构":["政府/公共事业/非盈利机构","学术/科研"],"农|林|牧|渔|其他":["农/林/牧/渔","跨领域经营","其他"]}

BIN
static/images/all/dot.png


BIN
static/images/all/icon_nianxian.jpg


BIN
static/images/all/loading.gif


BIN
static/images/all/pdf.png


BIN
static/images/all/upload-bg.png


BIN
static/images/component/circle-arrow-down.png


BIN
static/images/component/circle-arrow-up.png


BIN
static/images/register/open-store.jpg


BIN
static/images/register/seller.jpg


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