yangc 7 years ago
parent
commit
e1926e3643

+ 9 - 7
components/mobile/store/StoreDetail.vue

@@ -88,7 +88,7 @@
         </span>
       </div>
       <div v-if="commodities.content&&commodities.content.length > 0">
-        <div v-for="(item, index) in commodities.content">
+        <div v-for="(item, index) in searchLists">
           <div class="middle" @click="goProductDetail(item)">
             <div class="list">
               <div class="fl">
@@ -287,13 +287,15 @@
               let inputStr = num.toString()
               let arr = inputStr.split('.')
               let floatNum = arr[1]
-              if (floatNum.length > 6) {
-                num = inputStr.substring(0, arr[0].length + 7)
-                if (Number(floatNum.charAt(6)) > 4) {
-                  num = (Number(num) * 1000000 + 1) / 1000000
+              if (floatNum) {
+                if (floatNum.length > 6) {
+                  num = inputStr.substring(0, arr[0].length + 7)
+                  if (Number(floatNum.charAt(6)) > 4) {
+                    num = (Number(num) * 1000000 + 1) / 1000000
+                  }
+                } else if (floatNum.length === 1) {
+                  num = num + '0'
                 }
-              } else if (floatNum.length === 1) {
-                num = num + '0'
               }
             }
           }

+ 24 - 20
components/store/CommodityInfo.vue

@@ -199,22 +199,24 @@
               let inputStr = num.toString()
               let arr = inputStr.split('.')
               let floatNum = arr[1]
-              if (floatNum.length > 2) {
-                num = inputStr.substring(0, arr[0].length + 3)
-                if (Number(floatNum.charAt(2)) >= 1) {
-                  num = (Math.ceil(Number(num) * 100) + 1) / 100
-                  let inputStr1 = num.toString()
-                  let arr1 = inputStr1.split('.')
-                  let floatNum1 = arr1[1]
-                  if (num.toString().indexOf('.') === -1) {
-                    num += '.00'
-                  }
-                  if (floatNum1.length === 1) {
-                    num = num + '0'
+              if (floatNum) {
+                if (floatNum.length > 2) {
+                  num = inputStr.substring(0, arr[0].length + 3)
+                  if (Number(floatNum.charAt(2)) >= 1) {
+                    num = (Math.ceil(Number(num) * 100) + 1) / 100
+                    let inputStr1 = num.toString()
+                    let arr1 = inputStr1.split('.')
+                    let floatNum1 = arr1[1]
+                    if (num.toString().indexOf('.') === -1) {
+                      num += '.00'
+                    }
+                    if (floatNum1.length === 1) {
+                      num = num + '0'
+                    }
                   }
+                } else if (floatNum.length === 1) {
+                  num = num + '0'
                 }
-              } else if (floatNum.length === 1) {
-                num = num + '0'
               }
             }
           }
@@ -232,13 +234,15 @@
               let inputStr = num.toString()
               let arr = inputStr.split('.')
               let floatNum = arr[1]
-              if (floatNum.length > 6) {
-                num = inputStr.substring(0, arr[0].length + 7)
-                if (Number(floatNum.charAt(6)) > 4) {
-                  num = (Number(num) * 1000000 + 1) / 1000000
+              if (floatNum) {
+                if (floatNum.length > 6) {
+                  num = inputStr.substring(0, arr[0].length + 7)
+                  if (Number(floatNum.charAt(6)) > 4) {
+                    num = (Number(num) * 1000000 + 1) / 1000000
+                  }
+                } else if (floatNum.length === 1) {
+                  num = num + '0'
                 }
-              } else if (floatNum.length === 1) {
-                num = num + '0'
               }
             }
           }

+ 2 - 2
components/supplier/merchant.vue

@@ -25,7 +25,7 @@
     <div class="list_info">
       <div class="empty" v-if="!list.content || list.content.length === 0">
         <img src="/images/supplier/icon/empty.png">
-        <div class="info">
+        <div class="supplier-empty-info">
           <p>暂无供应商信息</p>
           <a href="javascript:history.go(-1)"><i class="fa fa-reply" style="margin-right:5px;"></i>返回上一页</a>
         </div>
@@ -295,7 +295,7 @@
         vertical-align: top;
         margin-right:15px;
       }
-      .info{
+      .supplier-empty-info{
         display: inline-block;
         padding-top:10px;
       }

+ 1 - 1
pages/mobile/product/_batchCode.vue

@@ -44,7 +44,7 @@
             <i class="iconfont icon-kefu1"></i>
             <p>联系卖家</p>
           </li>
-          <li class="text-ellipse inline-block price-level active" @click="goAttach(component.attach)">
+          <li class="text-ellipse inline-block price-level" :class="{'active': component.attach}" @click="goAttach(component.attach)">
             <i class="iconfont icon-pdf"></i>
             <p>数据手册</p>
           </li>