Browse Source

开店和店铺搜索雏形

yangc 8 năm trước cách đây
mục cha
commit
cd6f88c1ea

+ 10 - 1
assets/scss/common.scss

@@ -517,5 +517,14 @@ div.el-tree-node__content{
   position: relative;
   z-index: 10;
 }
-
+.select-adder {
+  background:url("/images/all/xiala.png") right no-repeat #fff !important;
+  background-position-x: 100% !important;
+}
+.componentDetail .el-dialog--tiny{
+  width: 320px !important;
+}
+.componentDetail .el-dialog__body{
+  padding: 14px !important;
+}
 

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

@@ -78,7 +78,7 @@
                       })
                     }
                   } else {
-                    if (response.data.message === '该产品已失效') {
+                    if (response.data.code === 2) {
                       this.$message.error(response.data.message + ',请刷新页面')
                     } else {
                       this.$message.error(response.data.message)

+ 59 - 0
components/common/upload/upload.vue

@@ -0,0 +1,59 @@
+<template>
+  <div>
+    <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>
+    <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>
+  </div>
+</template>
+<script>
+  export default {
+    data () {
+      return {
+        qualifications: {
+          url: ''
+        },
+        isShow: false
+      }
+    },
+    methods: {
+      update (e) {
+        let file = e.target.files[0]
+        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.qualifications.url = response.data[0].path
+            this.$emit('uploadAction', response.data[0].path)
+          })
+      },
+      showImg (imgUrl) {
+        this.qualifications.url = imgUrl
+        this.isShow = true
+      },
+      deleteImg () {
+        this.qualifications.url = ''
+      }
+    }
+  }
+</script>
+<style>
+
+</style>

+ 32 - 6
components/main/Search.vue

@@ -1,6 +1,10 @@
 <template>
   <div class="search-box">
     <div class="input-group">
+      <select @change="onSelectTypeChange" class="form-control select-type select-adder">
+        <option value="">产品</option>
+        <option value="">店铺</option>
+      </select>
       <input v-model="keyword" type="text" class="search-input form-control input-primary"
              placeholder="型号/类目/品牌"
              @focus.stop.prevent="onFocus()"
@@ -40,7 +44,8 @@
           show: false,
           activeIndex: null
         },
-        click_flag: false
+        click_flag: false,
+        searchType: 'product'
       }
     },
     computed: {
@@ -82,6 +87,14 @@
       }
     },
     methods: {
+      onSelectTypeChange: function (e) {
+        let type = e.target[e.target.selectedIndex].innerHTML
+        if (type === '产品') {
+          this.searchType = 'product'
+        } else if (type === '店铺') {
+          this.searchType = 'store'
+        }
+      },
       onFocus () {
         this.associate.show = true
       },
@@ -126,7 +139,11 @@
         if (this.keyword) {
           this.associate.show = false
           this.$store.dispatch('resetSearchKeywords')
-          this.$router.push({path: '/search?w=' + encodeURIComponent(this.keyword)})
+          if (this.searchType === 'product') {
+            this.$router.push({path: '/search?w=' + encodeURIComponent(this.keyword)})
+          } else if (this.searchType === 'store') {
+            this.$router.push({path: '/searchStore?w=' + encodeURIComponent(this.keyword)})
+          }
         }
       },
       onAssociateClick (word) {
@@ -146,15 +163,24 @@
     border-radius: 0;
   }
   .search-box {
-    width: 470px;
+    width: 520px;
     height: 40px;
     position: relative;
-
+    .search-input{
+      float: right;
+      width: 364px;
+    }
     .search-input, .search-btn {
       height: 40px;
       border-width: 2px;
     }
-
+    .select-type{
+      width: 78px;
+      float: left;
+      border: #5078cb 2px solid;
+      height: 40px;
+      border-right: none;
+    }
     .search-btn {
       font-size: 16px;
       width: 78px;
@@ -199,4 +225,4 @@
       }
     }
   }
-</style>
+  </style>

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

@@ -0,0 +1,722 @@
+<!--<template>
+  <div>
+    <h3 class="h3">成为优软卖家有什么好处?</h3>
+    <div class="row title">
+      <div class="col-md-6">
+        <h4>免费开店</h4>
+        <p>申请开店完全免费,一个企业只能开一家店,申请到正式开通预计需1-3个工作日。</p>
+      </div>
+      <div class="col-md-6">
+        <h4>库存寄售</h4>
+        <p>无需开店,即可发布贵司仓库里的滞销产品,优软商城代为销售,匿名清仓无压力。</p>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+
+</script>
+<style>
+
+</style>-->
+<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">
+                  <upload @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">
+                  <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>
+  </div>
+</template>
+<script>
+  import Upload from '~components/common/upload/upload.vue'
+  export default {
+    data () {
+      return {
+        tab: 'ORIGINAL_FACTORY'
+      }
+    },
+    components: {
+      Upload
+    },
+    methods: {
+      toggleTab (t) {
+        this.tab = t
+      },
+      onUpload: function (url) {
+        console.log(url)
+      }
+    }
+  }
+</script>
+<style>
+  .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: 20px;
+  }
+
+  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 .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, .add-brand a:active em, .add-brand a:focus 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: 2;
+    height: 152px;
+    opacity: 1;
+    background-color: white;
+    width: 310px;
+    -webkit-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: 50%;
+  }
+  .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;
+  }
+</style>

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

@@ -0,0 +1,53 @@
+<template>
+  <div>
+    <div class="step-menu">
+      <ul>
+        <li :class="section == 1?'active':''">第一步:完善企业信息</li>
+        <li :class="section == 2?'active':''">第二步:阅读相关条例</li>
+        <li :class="section == 3?'active':''">第三步:提交申请</li>
+      </ul>
+    </div>
+    <div class="tab-list">
+      <step-first v-if="section == 1" @sectionEvent="sectionChange" :data="this.data"></step-first>
+      <step-second v-if="section == 2" @sectionEvent="sectionChange" :checkData="checkData"></step-second>
+      <step-third v-if="section == 3" @sectionEvent="sectionChange"></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,
+        data: {
+          name: '',
+          simpleName: '',
+          url: '',
+          licenceId: '',
+          address: '',
+          website: ''
+        },
+        checkData: {
+          checked: false
+        }
+      }
+    },
+    components: {
+      StepFirst,
+      StepSecond,
+      StepThird
+    },
+    methods: {
+      sectionChange: function (type) {
+        if (type === 'next') {
+          this.section ++
+        } else if (type === 'prev') {
+          this.section --
+        }
+      }
+    }
+  }
+</script>

+ 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 }

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

@@ -0,0 +1,151 @@
+<template>
+  <!--填写注册信息-->
+  <div class="section">
+    <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 type="text" @change="nameCheck" v-model="data.name" class="form-control" name="name" required="" placeholder="填写营业执照上的企业名称">
+        </div>
+        <div class="col-sm-5" v-show="!isValidTypeName">
+          <p>
+            <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~99个字符
+          </p>
+        </div>
+        <div class="col-sm-5" v-show="!isValidName">
+          <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" @change="simpleNameCheck" v-model="data.simpleName" class="form-control" name="name" required="" placeholder="请填写正确的企业名称,2~40个字符">
+        </div>
+        <div class="col-sm-5" v-show="!isValidSimpleName">
+          <p>
+            <i class="fa fa-info-circle"></i>请填写正确的企业名称,2~40个字符
+          </p>
+        </div>
+      </div>
+      <div class="row">
+        <label class="col-sm-2 x-required">营业执照:</label>
+        <div class="col-sm-5">
+          <a class="x-btn-blank">
+            <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="data.url" alt="">
+        </div>
+        <div class="col-sm-5" v-show="!isValidUpload"><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" @change="licenceCheck" v-model="data.licenceId" class="form-control" name="name" required="" placeholder="请填写营业执照上的注册号">
+        </div>
+        <div class="col-sm-5" v-show="!isValidLicence"><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" @change="addressCheck" v-model="data.address" class="form-control" name="name" required="" placeholder="填写总部所在地详细地址" style="padding-left:20px;">
+          <span class="fa fa-map-marker"></span>
+        </div>
+        <div class="col-sm-5" v-show="!isValidAddress"><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="url" v-model="data.website" class="form-control" name="name" required="" placeholder="www.example.com" style="padding-left:55px;">
+          <span class="web">http://</span>
+        </div>
+        <div class="col-sm-5"></div>
+      </div>
+      <div class="row next-btn"><button class="btn" @click="sectionChange('next')" :disabled="!isValid">下一步</button></div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: ['data'],
+    data () {
+      return {
+        isValid: false,
+        isValidUpload: true,
+        isValidTypeName: true,
+        isValidName: true,
+        isValidLicence: true,
+        isValidSimpleName: true,
+        isValidAddress: true
+      }
+    },
+    methods: {
+      sectionChange: function (type) {
+        this.$emit('sectionEvent', type)
+      },
+      upload: function (e) {
+        let file = e.target.files[0]
+        if (file.size > 5 * 1024 * 1024) {
+          this.isValidUpload = false
+        } else {
+          this.isValidUpload = true
+          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
+            })
+        }
+      },
+      validCheck: function () {
+        this.isValid = this.isValidUpload && this.isValidTypeName && this.isValidName && this.isValidLicence && this.isValidSimpleName
+      },
+      nameCheck: function () {
+        this.validCheck()
+        this.$http.post('/basic/enterprise/register/valid/name?name=' + this.data.name)
+          .then(response => {
+            this.isValidName = response.data.success
+          })
+        this.isValidTypeName = this.data.name && this.data.name.length >= 2 && this.data.name.length <= 99
+      },
+      simpleNameCheck: function () {
+        this.validCheck()
+        this.isValidSimpleName = this.data.simpleName && this.data.simpleName.length >= 2 && this.data.simpleName.length <= 40
+      },
+      licenceCheck: function () {
+        this.validCheck()
+        this.$http.post('/basic/enterprise/register/valid/businessCode?businessCode=' + this.data.licenceId)
+          .then(response => {
+            this.isValidLicence = response.data.success
+          })
+      },
+      addressCheck: function () {
+        //
+      },
+      websiteCheck: function () {
+     // (/^([\w-]+\.)+[\w-]+(/[\w-./?%&=])?$/).test(this.messageBoard.userTel)
+      }
+    }
+  }
+</script>
+
+<style>
+  .register input[type="file"] {
+    display: block;
+  }
+  .previewImg {
+    max-height: 200px;
+    max-width: 200px;
+    margin-top: 5px;
+  }
+</style>

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

@@ -0,0 +1,44 @@
+<template>
+  <!--阅读服务协议-->
+  <div class="section">
+    <div class="agreement">
+      <div class="join_xieyi">
+        <h3>《优软商城服务条款》</h3>
+        <p><span>第一章 接受条款 </span></p>
+        <p>1.   本协议内容包括协议正文及所有优软商城已经发布或将来可能发布的各类规则,所有规则为协议不可分割的一部分,与协议正文具有同等法律效力。 </p>
+        <p>2.   以任何方式进入优软商城并使用服务即表示您已充分阅读、理解并同意接受本协议的条款和条件(以下合称“条款“)</p>
+        <p>3.   优软商城有权根据业务需要酌情修订“条款”,并以网站公告的形式进行更新,不再单独通知予您。经修
+          订的“条款”一经在   优软商城公布,即产生效力。如您不同意相关修订,请您立即停止使用“服务”。如您继
+          续使 用“服务”,则将  视您已接受经 修 订的“条款”,当您与优软商城发生争议时,应以最新的“条款”为准。</p>
+        <p><span>第二章 定义</span></p>
+        <p>1.   本协议内容包括协议正文及所有优软商城已经发布或将来可能发布的各类规则,所有规则为协议不可分割的一部分,与协议正文具有同等法律效力。 </p>
+        <p>2.   以任何方式进入优软商城并使用服务即表示您已充分阅读、理解并同意接受本协议的条款和条件(以下合称“条款“)</p>
+        <p>3.   优软商城有权根据业务需要酌情修订“条款”,并以网站公告的形式进行更新,不再单独通知予您。经修
+          订的“条款”一经在   优软商城公布,即产生效力。如您不同意相关修订,请您立即停止使用“服务”。如您继
+          续使 用“服务”,则将  视您已接受经 修 订的“条款”,当您与优软商城发生争议时,应以最新的“条款”为准。</p>
+      </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="checkData.checked = !checkData.checked" >
+        我已阅读并同意<a href="" target="_blank">
+        《优软商城服务条款》</a>、<a href="" target="_blank">
+        《优软商城买卖条例》</a>
+      </label>
+    </div>
+    <div class="row next-btn" style="margin-top: 20px">
+      <button @click="sectionChange('prev')">上一步</button>
+      <button @click="sectionChange('next')" :disabled="!checkData.checked" class="btn">下一步</button>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    props: ['checkData'],
+    methods: {
+      sectionChange: function (type) {
+        this.$emit('sectionEvent', type)
+      }
+    }
+  }
+</script>

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

@@ -0,0 +1,27 @@
+<template>
+  <!--最后一步-->
+  <div class="section">
+    <div class="step-last">
+      <h4 class="h4">免费开店</h4>
+      <p class="title">申请开店完全免费,一个企业只能开一家店,申请到正式开通预计需1-3个工作日。了解更多请看《开店规则》</p>
+    </div>
+    <!--导入店铺模板-->
+    <div class="apply-include">
+      导入模板
+    </div>
+    <div class="step-last">
+      <h4 class="h4">库存寄售</h4>
+      <p class="title">无需开店,即可发布贵司仓库里的滞销产品,优软商城代为销售,匿名清仓无压力<button class="no-apply">暂不开店,直接寄售</button></p>
+    </div>
+    <div class="row next-btn" style="margin-top: 20px"><button @click="sectionChange('prev')">上一步</button></div>
+  </div>
+</template>
+<script>
+  export default {
+    methods: {
+      sectionChange: function (type) {
+        this.$emit('sectionEvent', type)
+      }
+    }
+  }
+</script>

+ 15 - 13
components/search/GoodList.vue

@@ -27,13 +27,13 @@
               <option value="1">发货地</option>
             </select>
           </div>
-          <div class="off">
-            <a @click="list_open=!list_open">
-              <span v-text="list_open?'收起':'展开'"></span>
-              <i class="fa fa-angle-down" v-show="!list_open"></i>
-              <i class="fa fa-angle-up"v-show="list_open"></i>
-            </a>
-          </div>
+        </div>
+        <div class="off">
+          <a @click="list_open=!list_open">
+            <span v-text="list_open?'收起':'展开'"></span>
+            <i class="fa fa-angle-down" v-show="!list_open"></i>
+            <i class="fa fa-angle-up"v-show="list_open"></i>
+          </a>
         </div>
       </div>
       <div v-if="list_open">
@@ -517,21 +517,23 @@
     border: #5078cb 1px solid;
     color: #5078cb;
   }
-  .tab-filter .fr .off{
-    margin-left : 129px;
-    float: right;
+  .tab-filter .off{
+     float: right;
+     margin-right: 20px;
+    color: black;
   }
-  .tab-filter .fr .off a:hover{
+  .tab-filter .off a:hover{
     border: none;
     color: #5078cb;
   }
-  .tab-filter .fr .off a{
+  .tab-filter .off a{
     border: none;
     text-align: right;
     padding-left: 360px;
     background: none;
+    color: #333;
   }
-  .tab-filter .fr .off a i{
+  .tab-filter .off a i{
     font-size: 16px;
   }
   .tab-filter .fr .form-control{

+ 113 - 0
components/searchStore/SearchTitle.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="search-store-title">
+    <span class="search-result">
+      搜索
+      <span>"华商龙"</span>
+      ,为您找到
+      <span>1000</span>
+      家店铺:
+    </span>
+    <div class="tab-filter" >
+      <div class="fl">&nbsp;&nbsp;| 产品信息(<span class="text-num"></span><span class="text-num"></span>)</div>
+      <div class="fr">
+        <div class="active"><a >综合排序</a></div>
+        <div class=""><a >现货优选</a></div>
+        <div class=""><a >型号精确</a></div>
+      <div class="off">
+        <a @click="list_open=!list_open">
+          <span v-text="list_open?'收起':'展开'"></span>
+          <i class="fa fa-angle-down" v-show="!list_open"></i>
+          <i class="fa fa-angle-up"v-show="list_open"></i>
+        </a>
+      </div>
+    </div>
+  </div>
+</template>
+<script>
+  export default {
+    data () {
+      return {
+        keyword: this.$route.query.w
+      }
+    }
+  }
+</script>
+<style>
+  .search-store-title {
+    margin: 10px 0;
+  }
+  .search-store-title .search-result {
+
+  }
+  .tab-filter{
+    width: 1190px;
+    height: 40px;
+    margin: 0 auto;
+    line-height: 40px;
+    margin-bottom: 10px;
+    background: #f1efef;
+  }
+  .tab-filter .fl,.tab-filter .fr{
+    float: left;
+  }
+  .tab-filter .fl{
+    font-size: 14px;
+  }
+  .tab-filter .fr{
+    max-width: 1050px;
+  }
+  .tab-filter .fl span{
+    font-size: 14px;
+  }
+  .tab-filter .fr div{
+    float: left;
+    margin: 0 5px;
+  }
+  .tab-filter .fr div.active a{
+    border: #5078cb 1px solid;
+    color: #5078cb;
+  }
+  .tab-filter .fr a{
+    display: inline-block;
+    padding: 1px 10px;
+    border: #ccc 1px solid;
+    line-height: 26px;
+    font-size: 14px;
+    text-align: center;
+    color: #333;
+    max-height: 30px;
+    background: #fff;
+  }
+  .tab-filter .fr a i{
+    /*margin-left: 5px;*/
+  }
+  .tab-filter .fr a:hover{
+    border: #5078cb 1px solid;
+    color: #5078cb;
+  }
+  .tab-filter .off{
+    float: right;
+    margin-right: 20px;
+    color: black;
+  }
+  .tab-filter .off a:hover{
+    border: none;
+    color: #5078cb;
+  }
+  .tab-filter .off a{
+    border: none;
+    text-align: right;
+    padding-left: 360px;
+    background: none;
+    color: #333;
+  }
+  .tab-filter .off a i{
+    font-size: 16px;
+  }
+  .tab-filter .fr .form-control{
+    width: 70px;
+    height: 30px;
+    border-radius: 0;
+    padding-left: 5px;
+  }
+</style>

+ 3 - 0
components/searchStore/index.js

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

+ 5 - 1
components/store/CommodityInfo.vue

@@ -341,7 +341,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)
+                  }
                 }
               })
           }

+ 5 - 1
components/store/RecommendProduct.vue

@@ -112,7 +112,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)
+                    }
                   }
                 })
             }

+ 15 - 0
pages/searchStore/_keyword.vue

@@ -0,0 +1,15 @@
+<template>
+  <div class="container" id="searchResult">
+    <search-title></search-title>
+  </div>
+</template>
+<script>
+  import { SearchTitle } from '~components/searchStore'
+  export default {
+    layout: 'main',
+    components: {
+      SearchTitle
+    }
+  }
+</script>
+

BIN
static/images/all/xiala.png