shenjj пре 7 година
родитељ
комит
8ae769cc27

+ 8 - 1
components/common/upload/upload.vue

@@ -23,7 +23,7 @@
 </template>
 <script>
   export default {
-    props: ['typeData', 'url', 'NopassThree', 'noReview', 'maxSize', 'imgStyle'],
+    props: ['typeData', 'url', 'NopassThree', 'noReview', 'maxSize', 'imgStyle', 'HASPDF'],
     data () {
       return {
         qualifications: {
@@ -37,6 +37,7 @@
     watch: {
       url: function (val, oldVal) {
         if (val && val !== '') {
+          console.log(val)
           this.qualifications.url = val
         }
       }
@@ -46,6 +47,9 @@
         return this.isMobile ? '/images/mobile/openStore/upload.png' : '/images/all/upload-apply.png'
       }
     },
+    mounted() {
+      this.qualifications.url = this.url
+    },
     methods: {
       update (e) {
         let file = e.target.files[0]
@@ -64,6 +68,9 @@
         let param = new FormData()
         param.append('file', file, file.name)
         param.append('chunk', '0')
+        if (this.HASPDF === false && file.type === 'application/pdf') {
+          this.$emit('remindAction', `请选择有效图片进行上传`)
+        }
         if (file.type !== 'application/pdf') {
           let config = {
             headers: {'Content-Type': 'multipart/form-data'}

+ 4 - 2
components/mobile/search/MainSearch.vue

@@ -96,6 +96,7 @@
     methods: {
       setChangelistHander(str) {
         this.ChooseTop = str
+        if (!this.keyword) return
         this.$store.dispatch('searchKeywords', {keyword: this.keyword, type: this.ChooseTop})
         this.associate.show = true
       },
@@ -141,7 +142,7 @@
         } else if (this.ChooseTop === 'kind') {
           this.keyword = word.nameCn
         } else if (this.ChooseTop === 'store') {
-          return word
+          this.keyword = word.name
         } else if (this.ChooseTop === 'brand') {
           this.keyword = word.nameEn
         }
@@ -153,7 +154,7 @@
         } else if (this.ChooseTop === 'kind') {
           return word.nameCn
         } else if (this.ChooseTop === 'store') {
-          return word
+          return word.name
         } else if (this.ChooseTop === 'brand') {
           return word.nameEn
         }
@@ -321,6 +322,7 @@
         line-height: .9rem;
         margin: 0 .45rem;
         border-bottom: .04rem solid #f1f0f0;
+        @include overFlowHidden();
         i {
           font-size: .36rem;
           margin-right: .24rem;

+ 263 - 31
pages/mobile/center/vendor/product.vue

@@ -277,46 +277,75 @@
         </div>
       </div>
       <div class="update-materiel-wrapper">
-        <div class="clearfix">
-          <div class="update-materiel-wrapper-image pull-left">
-            <upload :url="regieUrl" @uploadAction="onUpload" :NopassThree="false" :maxSize="'20'" :imgStyle="imgStyle"></upload>
-            <span>点击上传</span>
-          </div>
-          <div class="uploadImgBtn pull-left">上传图片</div>
-          <span class="uploadImgInfo pull-left">图片上传须知</span>
-        </div>
-
-        <div class="update-materiel-wrapper-list clearfix">
+        <!--<div class="clearfix">-->
+          <!--<div class="update-materiel-wrapper-image pull-left">-->
+            <!--<img :src="cmpImg || '/images/mobile/openStore/upload.png'"  style='width: 1.1rem; height: 1.1rem;display:block;margin: 0.2rem auto'/>-->
+            <!--<input type="file" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" />-->
+            <!--<span style="position: relative">点击上传</span>-->
+          <!--</div>-->
+          <!--<div class="uploadImgBtn pull-left">上传图片<input type="file" class="com-input" @change="update" accept="image/jpeg,image/jpg,image/gif,image/bmp,image/png,.pdf" /></div>-->
+          <!--<span class="uploadImgInfo pull-left">图片上传须知</span>-->
+        <!--</div>-->
+        <template v-if="MaterielItem.standard === 1">
+          <img class="imgUrl" src="/images/mobile/@2x/productDetail/Strand.png" />
+        </template>
+        <template v-else>
+          <img class="imgUrl" src="/images/mobile/@2x/productDetail/isStrand.png" />
+        </template>
+        <div class="update-materiel-wrapper-list clearfix overHidden">
           <div class="name pull-left"><a class="red">*</a>品牌:</div>
-          <div class="input pull-left clearfix">
-            <input type="text" placeholder="请输入品牌"/>
-            <i class="iconfont icon-guanbi1"></i>
-          </div>
+          <template v-if="MaterielItem.standard === 1">
+            {{MaterielItem.brand}}
+          </template>
+          <template v-else>
+            <div class="input pull-left clearfix overHidden">
+              <input type="text" v-model="MaterielItem.brand" placeholder="请勿填中文符号" @blur="checkBrand" @input="onBrandChange"/>
+              <ul class="similar brand-similar-list" v-show="showSimilarBrandList && MaterielItem.brand">
+                <li v-for="sBrand in similarBrand" @click="setBrand(sBrand.nameEn)">{{sBrand.nameEn}}</li>
+              </ul>
+              <i class="iconfont icon-guanbi1" @click="MaterielItem.brand = ''"></i>
+            </div>
+          </template>
         </div>
-        <div class="update-materiel-wrapper-list clearfix">
+        <div class="update-materiel-wrapper-list clearfix overHidden">
           <div class="name pull-left"><a class="red">*</a>物料名称(类目):</div>
-          <div class="input pull-left clearfix"  style="width: 4.09rem">
-            <input type="text" placeholder="请输入物料名称(类目)"/>
-            <i class="iconfont icon-guanbi1"></i>
-          </div>
+          <template v-if="MaterielItem.standard === 1">
+            {{MaterielItem.kind}}
+          </template>
+          <template v-else>
+            <div class="input pull-left clearfix"  style="width: 4.09rem">
+              <!--<input type="text" v-model="MaterielItem.kind" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">-->
+              <input type="text" placeholder="请输入物料名称(类目)" v-model="MaterielItem.kind"/>
+              <i class="iconfont icon-guanbi1" @click="MaterielItem.kind = ''"></i>
+            </div>
+          </template>
         </div>
         <div class="update-materiel-wrapper-list clearfix">
           <div class="name pull-left"><a class="red">*</a>型号:</div>
-          <div class="input pull-left clearfix">
-            <input type="text" placeholder="请输入型号"/>
-            <i class="iconfont icon-guanbi1"></i>
-          </div>
+          <template v-if="MaterielItem.standard === 1">
+            {{MaterielItem.cmpCode}}
+          </template>
+          <template v-else>
+            <div class="input pull-left clearfix">
+              <input type="text" v-model="MaterielItem.cmpCode" @blur="checkCode" @input="onCodeChange" placeholder="请勿填中文符号">
+              <ul class="similar" v-show="showSimilarCodeList && MaterielItem.cmpCode">
+                <li v-for="sCode in similarCode" @click="setCode(sCode.code)">{{sCode.code}}</li>
+              </ul>
+              <!--<input type="text" placeholder="请输入型号" v-model="MaterielItem.cmpCode"/>-->
+              <i class="iconfont icon-guanbi1" @click="MaterielItem.code = ''"></i>
+            </div>
+          </template>
         </div>
         <div class="update-materiel-wrapper-list clearfix">
           <div class="name pull-left"><a class="red" style="opacity: 0">*</a>规格:</div>
           <div class="input pull-left clearfix">
-            <input type="text" placeholder="请输入规格"/>
-            <i class="iconfont icon-guanbi1"></i>
+            <input type="text" placeholder="请输入规格" v-model="MaterielItem.spec" @blur="checkSpec" @input="onSpecInput"/>
+            <i class="iconfont icon-guanbi1" @click="MaterielItem.spec = ''"></i>
           </div>
         </div>
         <div class="update-materiel-wrapper-controll clearfix">
-          <div class="pull-left">保存</div>
-          <div class="pull-right">取消</div>
+          <div class="pull-left" @click="saveMateriel()">保存</div>
+          <div class="pull-right" @click="showMateriel = false">取消</div>
         </div>
       </div>
     </div>
@@ -345,9 +374,14 @@
         chooseItem: {},
         vendorlist: [], // 查看更多信息
         showoffshelf: false,
-        showMateriel: true,
-        regieUrl: '',
-        imgStyle: 'width: 1.1rem;height:1.1rem'
+        showMateriel: false,
+        imgStyle: 'width: 1.1rem;height:1.1rem',
+        MaterielItem: {},
+        showSimilarCodeList: false,
+        showSimilarBrandList: false,
+        similarCode: [],
+        similarBrand: [],
+        cmpImg: ''
       }
     },
     methods: {
@@ -404,7 +438,6 @@
           this.collectResult = err.response.data
         })
       },
-      onUpload() {},
 //      scroll: function () {
 //        let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
 //        if (Math.ceil(scrolled + window.screen.availHeight) >= document.body.scrollHeight && !this.isSearchSearchingMore && this.seekPage < this.EnterprisePage) {
@@ -550,6 +583,9 @@
       },
       // 编辑物料
       updateMateriel(item) {
+        this.MaterielItem = item
+        this.cmpImg = item.cmpImg || ''
+        // this.MaterielItem.cmpImg = item.cmpImg || ''
         this.showMateriel = true
       },
       addProtoperson: function(item) {
@@ -571,6 +607,144 @@
             this.collectResult = '绑定失败'
             this.timeoutCount++
           })
+      },
+      checkBrand: function () {
+        // this.MaterielItem.brand = this.MaterielItem.brand && this.MaterielItem.brand !== ''
+        if (!this.MaterielItem.brand || this.MaterielItem.brand === '') {
+          this.setRemindText('品牌不能为空')
+        }
+        return this.MaterielItem.brand
+      },
+      checkCode: function () {
+        if (!this.MaterielItem.cmpCode || this.MaterielItem.cmpCode === '') {
+          this.setRemindText('型号不能为空')
+        }
+        return this.MaterielItem.cmpCode
+      },
+      onCodeChange: function () {
+        this.MaterielItem.cmpCode = this.MaterielItem.cmpCode.trim()
+        if ((/[^\x00-\xff]/g).test(this.MaterielItem.cmpCode)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.MaterielItem.cmpCode.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.MaterielItem.cmpCode.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          this.MaterielItem.cmpCode = this.baseUtils.cutOutString(this.MaterielItem.cmpCode, chineseIndex)
+        } else if (this.MaterielItem.cmpCode && this.baseUtils.getRealLen(this.MaterielItem.cmpCode) > 100) {
+          this.MaterielItem.cmpCode = this.baseUtils.cutOutString(this.MaterielItem.cmpCode, 100)
+        } else {
+          this.getSimilarCode()
+        }
+      },
+      onBrandChange: function () {
+        this.MaterielItem.brand = this.MaterielItem.brand.trim()
+        if ((/[^\x00-\xff]/g).test(this.MaterielItem.brand)) {
+          let chineseIndex = -1
+          for (let i = 0; i < this.MaterielItem.brand.length; i++) {
+            if ((/[^\x00-\xff]/g).test(this.MaterielItem.brand.charAt(i)) && !(/[\u4e00-\u9fa5]/).test(this.MaterielItem.brand.charAt(i))) {
+              chineseIndex = i
+              break
+            }
+          }
+          if (chineseIndex > -1) {
+            this.MaterielItem.brand = this.MaterielItem.brand.substring(0, chineseIndex)
+          }
+        } else if (this.MaterielItem.brand && this.baseUtils.getRealLen(this.MaterielItem.brand) > 50) {
+          this.MaterielItem.brand = this.baseUtils.cutOutString(this.MaterielItem.brand, 50)
+        } else {
+          this.getSimilarBrand()
+        }
+      },
+      getSimilarBrand: function () {
+        if (this.MaterielItem.brand) {
+          this.$http.get('/search/similarBrands', {params: {keyword: this.MaterielItem.brand}})
+            .then(response => {
+              this.similarBrand = response.data
+              this.showSimilarBrandList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarBrandList = false
+        }
+      },
+      getSimilarCode: function () {
+        if (this.MaterielItem.cmpCode) {
+          this.$http.get('/search/similarComponents', {params: {keyword: this.MaterielItem.cmpCode}})
+            .then(response => {
+              this.similarCode = response.data
+              this.showSimilarCodeList = response.data.length > 0
+            })
+        } else {
+          this.showSimilarCodeList = false
+        }
+      },
+      setCode: function (code) {
+        this.MaterielItem.cmpCode = code
+        this.showSimilarCodeList = false
+      },
+      setBrand: function (brand) {
+        this.MaterielItem.brand = brand
+        this.showSimilarBrandList = false
+      },
+      setRemindText: function (str) {
+        this.collectResult = str
+        this.timeoutCount++
+      },
+      checkSpec: function () {
+        // let nullStrFlag =
+        // this.MaterielItem.spec = nullStrFlag
+        if (!this.baseUtils.checkNullStr(this.MaterielItem.spec)) {
+          this.setRemindText('规格输入不合法')
+        }
+        return this.MaterielItem.spec
+      },
+      onSpecInput: function () {
+        if (this.MaterielItem.spec && this.baseUtils.getRealLen(this.MaterielItem.spec) > 100) {
+          this.MaterielItem.spec = this.baseUtils.cutOutString(this.MaterielItem.spec, 100)
+        }
+      },
+      saveMateriel() {
+        if (this.MaterielItem.brand === '') {
+          this.setRemindText('品牌不能为空')
+          return
+        } else if (this.MaterielItem.kind === '') {
+          this.setRemindText('类目不能为空')
+          return
+        } else if (this.MaterielItem.cmpCode === '') {
+          this.setRemindText('型号不能为空')
+          return
+        }
+        this.MaterielItem.pcmpcode = this.MaterielItem.cmpCode
+        this.MaterielItem.pbranden = this.MaterielItem.brand
+        this.MaterielItem.pbranden = this.MaterielItem.brand
+        this.$http.post('/trade/products/update/product', this.MaterielItem).then(res => {
+          this.setRemindText('修改成功')
+          this.showMateriel = false
+          this.page = 1
+          this.getResourceProvidor()
+        })
+      },
+      update (e) {
+        let file = e.target.files[0]
+        if (file.size > 3 * 1024 * 1024) {
+          this.setRemindText(`上传文件不得超过3M`)
+        }
+        let param = new FormData()
+        param.append('file', file, file.name)
+        param.append('chunk', '0')
+        if (file.type === 'application/pdf') {
+          this.setRemindText(`请选择有效图片进行上传`)
+          return
+        }
+        let config = {
+          headers: {'Content-Type': 'multipart/form-data'}
+        }
+        this.$http.post('/api/images', param, config)
+          .then(response => {
+            this.MaterielItem.img = response.data[0].path
+            this.cmpImg = response.data[0].path
+          })
       }
     },
     computed: {
@@ -630,6 +804,9 @@
     height: $value;
     line-height: $value;
   }
+  .overHidden  {
+    @include overFlowHidden()
+  }
   .user-content{
     position: absolute;
     width: 100%;
@@ -1516,6 +1693,15 @@
       margin: 1.46rem 0.2rem 0;
       position: relative;
       padding-bottom: 0.4rem;
+      padding-top: 1rem;
+      position: relative;
+      .imgUrl{
+        position: absolute;
+        width: 0.94rem;
+        height: 0.94rem;
+        right: 0;
+        top: 0;
+      }
       .update-materiel-wrapper-image {
         width: 2.28rem;
         height: 2.28rem;
@@ -1524,10 +1710,21 @@
         position: relative;
         margin: 0.27rem 0 0 0.55rem;
         text-align: center;
+        position: relative;
         span {
           color: #b2b2b2;
           font-size: 0.28rem;
         }
+        .com-input {
+          width: 100%;
+          height: 100%;
+          text-align: center;
+          position: absolute;
+          bottom: 0;
+          left: 0;
+          opacity: 0;
+          display: inline-block !important;
+        }
       }
       .uploadImgBtn {
         color: #fff;
@@ -1538,6 +1735,17 @@
         background: #f9b209;
         text-align: center;
         margin:2rem 0.1rem 0;
+        position: relative;
+        .com-input {
+          width: 100%;
+          height: 100%;
+          text-align: center;
+          position: absolute;
+          bottom: 0;
+          left: 0;
+          opacity: 0;
+          display: inline-block !important;
+        }
       }
       .uploadImgInfo {
         color: #3f84f6;
@@ -1551,6 +1759,7 @@
         .red {color: #ea0f42}
         .name {color: #666;}
         .input {
+          position: relative;
           width:5.4rem;
           line-height: 0.5rem;
           height: 0.5rem;border: 1px solid #dcdcdc;
@@ -1570,6 +1779,29 @@
             vertical-align: top;
             color: #666;
             float: right;
+            margin-right: 0.05rem
+          }
+          .similar {
+            position: absolute;
+            width:100%;
+            max-height: 2.5rem;
+            overflow-y: auto;
+            z-index: 12;
+            border: 1px solid #7e7e7e;
+            border-radius: .05rem;
+            top: .5rem;
+            background: #fff;
+            li {
+              height: .5rem;
+              line-height: .5rem;
+              font-size: .26rem;
+              color: #999;
+              padding-left: .19rem;
+              &:focus, &:active, &:hover {
+                background: #999;
+                color: #fff;
+              }
+            }
           }
         }
       }

+ 34 - 29
pages/mobile/search/newkeycode.vue

@@ -55,7 +55,7 @@
              </div>
              <div class="list">
                <div class="name">官网地址:</div>
-               <div class="text">
+               <div class="text" style="width: 4.5rem">
                  <a :href="resourceList.brand && resourceList.brand.url" target="_blank">{{resourceList.brand && resourceList.brand.url}}</a>
                </div>
                <div class="pull-right lookMoreBtn" @click="showBrandDetails = true">
@@ -67,10 +67,10 @@
        </template>
        <div class="search-nav clearfix" v-if="brandIsAccurate || (!brandIsAccurate && ChooseTop !== 'brand')">
         <span class="pull-left" :class="navType === 'hasStore' ? 'active' : ''" @click="getReloadList('hasStore')">
-          {{ChooseTop === 'component' ? '现货': '现货卖家'}}({{futuresallTotal}})条
+          {{ChooseTop === 'component' ? '现货': '现货卖家'}}({{stockallTotal}})条
         </span>
          <span class="pull-left" :class="navType === 'noHasStore' ? 'active' : ''" @click="getReloadList('noHasStore')">
-          {{ChooseTop === 'component' ? '期货': '期货卖家'}}({{stockallTotal}})条</span>
+          {{ChooseTop === 'component' ? '期货': '期货卖家'}}({{futuresallTotal}})条</span>
        </div>
        <div class="search-content" id="main-search-wrapper" :class="{'searchContent2' : ChooseTop === 'brand' && brandIsAccurate, 'searchContent3': ChooseTop === 'brand' && !brandIsAccurate}">
          <!-- 品牌模糊查询 -->
@@ -113,8 +113,8 @@
            <template v-if="navType === 'hasStore'">
              <!-- 型号结果 -->
              <template v-if="ChooseTop === 'component'">
-               <div v-if="resourceList&&resourceList.futures&&resourceList.futures.content.length > 0">
-                 <div v-for="(item, index) in resourceList.futures.content">
+               <div v-if="resourceList&&resourceList.stock&&resourceList.stock.content.length > 0">
+                 <div v-for="(item, index) in resourceList.stock.content">
                    <!--@click="goProductDetail(item)"-->
                    <div class="middle">
                      <div class="list">
@@ -201,8 +201,8 @@
              </template>
              <!-- 卖家 物料名称 品牌-->
              <template v-else-if="ChooseTop === 'kind' || ChooseTop === 'store' || ChooseTop === 'brand'">
-               <div v-if="resourceList&&resourceList.futures&&resourceList.futures.content.length > 0">
-                 <div class="middle" v-for="(item, index) in resourceList.futures.content">
+               <div v-if="resourceList&&resourceList.stock&&resourceList.stock.content.length > 0">
+                 <div class="middle" v-for="(item, index) in resourceList.stock.content">
                    <nuxt-link :to="`/mobile/shop/${item.storeUuid}`" tag="div" class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem">
                      <div class="name pull-left">{{item.enName}}</div>
                      <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
@@ -237,15 +237,15 @@
            <template v-else>
              <!-- 型号结果 -->
              <template v-if="ChooseTop === 'component'">
-               <div v-if="resourceList && resourceList.stock && resourceList.stock.content.length > 0">
-                 <div class="middle" v-for="(item, index) in resourceList.stock.content">
+               <div v-if="resourceList && resourceList.futures && resourceList.futures.content.length > 0">
+                 <div class="middle" v-for="(item, index) in resourceList.futures.content">
                    <div class="list">
                      <div class="name">品牌:</div>
-                     <div class="text overHidden">{{item.brand && item.brand.nameEn || '—'}}</div>
+                     <div class="text overHidden">{{item.brandNameEn || '—'}}</div>
                    </div>
                    <div class="list">
                      <div class="name">物料名称(类目):</div>
-                     <div class="text overHidden">{{item.kind && item.kind.nameCn || '-'}}</div>
+                     <div class="text overHidden">{{item.kindNameCn || '-'}}</div>
                    </div>
                    <div class="list">
                      <div class="name">型号:</div>
@@ -271,8 +271,8 @@
              </template>
              <!-- 卖家 物料名称 品牌-->
              <template v-else-if="ChooseTop === 'kind' || ChooseTop === 'store' || ChooseTop === 'brand'">
-               <div v-if="resourceList&&resourceList.stock &&resourceList.stock.content.length > 0">
-                 <div class="middle" v-for="(item, index) in resourceList.stock.content" @click="goSupplierDetail(item)">
+               <div v-if="resourceList&&resourceList.futures &&resourceList.futures.content.length > 0">
+                 <div class="middle" v-for="(item, index) in resourceList.futures.content" @click="goSupplierDetail(item)">
                    <div class="list clearfix" style="border-bottom: 1px solid #dcdcdc;padding-bottom: 0.1rem">
                      <div class="name pull-left">{{item.enName}}</div>
                      <div class="more_icon pull-right"><i class="iconfont icon-swiper-right"></i></div>
@@ -330,7 +330,7 @@
    <!-- 询价 -->
    <publish-supplier-seek :product="currentProduct" :showPublishBox="showPublishBox" @cancelAction="showPublishBox = false" @remindAction="setRemindText"></publish-supplier-seek>
     <!-- 查看品牌更多信息 -->
-   <modal-wrapper :showModal="showBrandDetails" :title="currentBrandItem.brand && currentBrandItem.brand.nameEn" @closeAction="showBrandDetails=false">
+   <modal-wrapper :showModal="showBrandDetails" :title="currentBrandItem.nameEn" @closeAction="showBrandDetails=false">
      <div class="store-info" >
        <div class="store-description">
          <h4>主营产品</h4>
@@ -459,8 +459,8 @@
       let brandIsAccurate = false
       let { data } = await axios.get(`/search/201819`, {params: {count: 10, page: 1, keyword: keyword, type: ChooseTop}})
       let allTotal = 0
-      let stockallTotal = data.futures ? data.futures.total : 0
-      let futuresallTotal = data.stock ? data.stock.total : 0
+      let futuresallTotal = data.futures ? data.futures.total : 0
+      let stockallTotal = data.stock ? data.stock.total : 0
       let allPage = 0
       let currentBrandItem = {
         userDefine: {}
@@ -472,7 +472,7 @@
           currentBrandItem = data.brand
           // 则总条数等于 现货 + 期货
           allTotal = stockallTotal + futuresallTotal
-          allPage = Math.ceil(data.futures.total / 10)
+          allPage = Math.ceil(data.stock.total / 10)
         } else {
           allTotal = data.total || 0
           allPage = Math.ceil(data.total / 10)
@@ -480,7 +480,7 @@
       } else {
         // 其他情况
         allTotal = stockallTotal + futuresallTotal
-        allPage = Math.ceil(data.futures.total / 10)
+        allPage = Math.ceil(data.stock.total / 10)
       }
       return {
         ChooseTop: ChooseTop,
@@ -491,7 +491,8 @@
         futuresallTotal: futuresallTotal,
         allTotal: allTotal,
         brandIsAccurate: brandIsAccurate,
-        currentBrandItem: currentBrandItem
+        currentBrandItem: currentBrandItem,
+        displayKeyword: keyword
       }
     },
     methods: {
@@ -526,9 +527,9 @@
             return
           }
           if (this.navType === 'hasStore') {
-            this.resourceList.futures.content = [...this.resourceList.futures.content, ...res.data.futures.content]
-          } else {
             this.resourceList.stock.content = [...this.resourceList.stock.content, ...res.data.stock.content]
+          } else {
+            this.resourceList.futures.content = [...this.resourceList.futures.content, ...res.data.futures.content]
           }
         }, err => {
           this.isSearchSearchingMore = false
@@ -591,9 +592,9 @@
             this.allPage = Math.ceil(this.resourceList.total / 10) || 0
           } else {
             if (this.navType === 'hasStore') {
-              this.allPage = this.resourceList.futures && Math.ceil(this.resourceList.futures.total / 10) || 0
-            } else {
               this.allPage = this.resourceList.stock && Math.ceil(this.resourceList.stock.total / 10) || 0
+            } else {
+              this.allPage = this.resourceList.futures && Math.ceil(this.resourceList.futures.total / 10) || 0
             }
           }
           this.associate.show = false
@@ -617,10 +618,10 @@
         if (this.user.logged) {
           let item = {
             cmpCode: product.code,
-            pbranden: product.brand.nameEn,
-            brand: product.brand.nameEn,
+            pbranden: product.brandNameEn,
+            brand: product.brandNameEn,
             spec: product.spec,
-            kind: product.kind.nameCn
+            kind: product.kindNameCn
           }
           this.currentProduct = item
           this.showPublishBox = true
@@ -639,7 +640,7 @@
         } else if (this.ChooseTop === 'kind') {
           this.keyword = word.nameCn
         } else if (this.ChooseTop === 'store') {
-          return word
+          this.keyword = word.name
         } else if (this.ChooseTop === 'brand') {
           this.keyword = word.nameEn
         }
@@ -652,7 +653,7 @@
         } else if (this.ChooseTop === 'kind') {
           return word.nameCn
         } else if (this.ChooseTop === 'store') {
-          return word
+          return word.name
         } else if (this.ChooseTop === 'brand') {
           return word.nameEn
         }
@@ -688,6 +689,7 @@
     watch: {
       '$route' (to, from) {
         this.keyword = to.query.keyword
+        this.displayKeyword = to.query.keyword
         this.setChangelistHander(to.query.choosetype)
       }
     }
@@ -927,6 +929,8 @@
             color: #333;
             font-size: 0.28rem;
             vertical-align: top;
+            width: 5.5rem;
+            @include overFlowHidden();
           }
           .table {
             width: 5.85rem;
@@ -1067,7 +1071,7 @@
       }
     }
     .searchContent2 {
-      height: calc(100vh - 7.58rem);
+      height: calc(100vh - 7.3rem);
     }
     .searchContent3 {
       height: calc(100vh - 2.25rem);
@@ -1202,6 +1206,7 @@
         line-height: .9rem;
         margin: 0 .45rem;
         border-bottom: .04rem solid #f1f0f0;
+        @include overFlowHidden();
         i {
           font-size: .36rem;
           margin-right: .24rem;

BIN
static/images/mobile/@2x/productDetail/Strand.png


BIN
static/images/mobile/@2x/productDetail/isStrand.png