Browse Source

修改测试bug

yangc 7 years ago
parent
commit
e39009cc50

+ 1 - 1
components/main/Search.vue

@@ -6,7 +6,7 @@
         <option value="store">店铺</option>
       </select>
       <input v-model="keyword" type="text" class="search-input form-control input-primary"
-             :placeholder="searchType === 'product' ? '型号/类目/品牌' : '店铺名称'"
+             :placeholder="searchType === 'product' ? '品牌/类目/型号' : '店铺名称'"
              @focus.stop.prevent="onFocus()"
              @blur.stop.prevent="onBlur()"
              @keyup.40="onSelectChange(1)"

+ 3 - 7
components/mobile/MobileFooter.vue

@@ -48,12 +48,12 @@
     name: 'MobileFooter',
     data () {
       return {
-        hideToTop: true,
         showLoginBox: false,
 //        showSayPriceBox: false,
         remindText: '',
         timeoutCount: 0,
-        url: ''
+        url: '',
+        hideToTop: true
       }
     },
     components: {
@@ -93,11 +93,7 @@
     methods: {
       onScroll () {
         let scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
-        if (scrolled > window.screen.availHeight) {
-          this.hideToTop = false
-        } else {
-          this.hideToTop = true
-        }
+        this.hideToTop = scrolled <= window.screen.availHeight
       },
       toTop () {
         scrollTo('body', 300)

+ 1 - 1
components/mobile/base/SearchHeader.vue

@@ -112,7 +112,7 @@
           })
         } else {
           let sType = null
-          if (this.type === 'default' && this.keyword && this.keyword !== '') {
+          if (this.type === 'default' && this.keyword && this.keyword !== '' && this.similarList.component) {
             if (this.similarList.component[0] && this.keyword === this.similarList.component[0].code) {
               sType = 'code'
             } else if (this.similarList.brand[0] && this.keyword === this.similarList.brand[0].nameEn) {

+ 30 - 6
components/mobile/common/PullUp.vue

@@ -1,8 +1,15 @@
 <template>
   <!-- 移动端上拉加载更多 -->
+  <!--<a @click="scrollToTop" v-show="!hideToTop"><i class="iconfont icon-arrow-up icon-xlg"></i></a>-->
 </template>
 <script>
+//  import { scrollTo } from '~utils/scroll'
   export default {
+    data () {
+      return {
+        hideToTop: true
+      }
+    },
     props: {
       searchMore: {
         type: Boolean
@@ -47,6 +54,8 @@
           height = document.body.scrollHeight
           scrolled = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop
         }
+//        this.hideToTop = scrolled <= window.screen.availHeight
+//        console.log(this.hideToTop)
         if (Math.ceil(scrolled + window.screen.availHeight) >= height && !this.searchMore && this.page < this.allPage) {
           this.getMore()
         }
@@ -55,18 +64,33 @@
         if (!this.searchMore) {
           this.$emit('pullUpAction')
         }
+      },
+      scrollToTop () {
+//        console.log(1)
+        let el = document.querySelector('.mobile-fix-content')
+        if (el) {
+          el.scrollTop = 0
+        }
+//        console.log(el.scrollTop)
+//        scrollTo(el ? '.mobile-fix-content' : 'body', 100, {offset: el ? el.scrollTop : null})
       }
     }
   }
 </script>
 <style lang="scss" scoped>
-  .loading {
+  a {
+    position: fixed;
+    right: .1rem;
+    bottom: 1.1rem;
+    background: rgba(0,0,0,.4);
+    color: #fff;
+    width: .88rem;
+    height: .88rem;
+    line-height: .88rem;
+    border-radius: 100%;
     text-align: center;
-    background: #fff;
-    >img {
-      width: .64rem;
-      height: .64rem;
-      margin: .2rem 0;
+    i {
+      font-size: .46rem;
     }
   }
 </style>

+ 1 - 1
components/mobile/supplier/SupplierDetail.vue

@@ -51,7 +51,7 @@
           <div class="prop">
             <span class="head">品牌/类目:</span>
             <span class="item">{{(product.standard == 1 ? product.pbranden : product.brand) || '—'}}</span>
-            <span class="item">{{(product.standard == 1 ? product.kind : product.prodName) || '—'}}</span>
+            <span class="item">{{product.kind || product.prodName || '—'}}</span>
           </div>
           <div class="prop">
             <span class="head">型号/规格:</span>

+ 2 - 4
components/store/BaseInfo.vue

@@ -156,10 +156,8 @@
 		color: rgb(50,50,50);
 		margin-top: 10px;
 		line-height: 30px;
-	}
-
-	.intro-text{
-		text-indent:2em;
+    word-break: break-all;
+    text-indent:2em;
 	}
 
   #contact-fragment .contact-title h3 {

+ 1 - 1
pages/mobile/center/vendor/product.vue

@@ -9,7 +9,7 @@
         </ul>
       </div>-->
       <div class="search-content" style="border-bottom: 1px solid #f5f5f5;padding-bottom: 0.25rem">
-        <input type="text" placeholder="请输入您要查找的型号或品牌" v-model="seekKeyword" @keyup.13="searchSeek">
+        <input type="text" placeholder="请输入您要查找的品牌或型号" v-model="seekKeyword" @keyup.13="searchSeek">
         <span @click="searchSeek" >
           <i class="iconfont icon-sousuo"></i>
           </span>

+ 1 - 1
pages/mobile/shop/index.vue

@@ -187,7 +187,7 @@
         this.reloadData()
       },
       reloadData () {
-        this.$store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, type: this.type, keyword: this.keyword || null, field: this.field })
+        this.$store.dispatch('provider/findStoreListInMobil', { page: 1, count: 10, type: this.types, keyword: this.keyword || null, field: this.field })
       },
       focusStore: function (item, $event) {
 //        item.isFocus = item.isFocus === 'false' ? 'true' : 'false'

+ 5 - 5
pages/mobile/user/storeinfo.vue

@@ -188,7 +188,7 @@
           }
         } else {
           this.Islook = false
-          return this.normalText && this.normalText.length ? this.normalText.length : '暂无信息'
+          return this.normalText && this.normalText.length ? this.normalText : '暂无信息'
         }
       },
       storeInfosave(_tp) {
@@ -219,13 +219,13 @@
           this.timeoutCount++
           return false
         }
-        if (this.storeInfo.enterprise.enFax && this.storeInfo.enterprise.enFax !== '' && !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
-          this.collectResult = '请输入正确的传真'
+        if (!this.storeInfo.enterprise.enTel || this.storeInfo.enterprise.enTel === '' || !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
+          this.collectResult = '请输入正确的电话号码'
           this.timeoutCount++
           return false
         }
-        if (!this.storeInfo.enterprise.enTel || this.storeInfo.enterprise.enTel === '' || !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
-          this.collectResult = '请输入正确的电话号码'
+        if (this.storeInfo.enterprise.enFax && this.storeInfo.enterprise.enFax !== '' && !/^[\d-]{8,20}$/.test(this.storeInfo.enterprise.enTel)) {
+          this.collectResult = '请输入正确的传真'
           this.timeoutCount++
           return false
         }