Browse Source

处理报价bug

yangc 7 years ago
parent
commit
b0957c94d7

+ 6 - 10
components/mobile/applyPurchase/SayPrice.vue

@@ -287,24 +287,20 @@
       checkValid: function () {
         this.validSayPrice.repliesLapQty = true
         this.validSayPrice.repliesPrice = true
-        this.validSayPrice.repliesleadtime = true
+        this.validSayPrice.leadtime = true
         for (let i = 0; i < this.sayPriceObj.replies.length; i++) {
-          console.log(this.sayPriceObj.replies)
-          if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(this.sayPriceObj.replies[i].lapQty) || this.sayPriceObj.replies[i].lapQty === '') {
+          if (!this.sayPriceObj.replies[i].lapQty || !/^[0-9]+([.]{1}[0-9]+)?$/.test(this.sayPriceObj.replies[i].lapQty) || this.sayPriceObj.replies[i].lapQty === '') {
             this.validSayPrice.repliesLapQty = false
             break
-          } else if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(this.sayPriceObj.replies[i].price) || this.sayPriceObj.replies[i].price === '') {
+          } else if (!this.sayPriceObj.replies[i].price || !/^[0-9]+([.]{1}[0-9]+)?$/.test(this.sayPriceObj.replies[i].price) || this.sayPriceObj.replies[i].price === '') {
             this.validSayPrice.repliesPrice = false
             break
           }
         }
-        if (/^\d+$/.test(this.validSayPrice.leadtime) || this.validSayPrice.leadtime === '') {
-          this.validSayPrice.repliesleadtime = false
+        if (!this.sayPriceObj.leadtime || !/^\d+$/.test(this.sayPriceObj.leadtime) || this.sayPriceObj.leadtime === '') {
+          this.validSayPrice.leadtime = false
         }
-        console.log(this.validSayPrice.repliesleadtime)
-        console.log(this.validSayPrice.repliesLapQty)
-        console.log(this.validSayPrice.repliesPrice)
-        return this.validSayPrice.repliesleadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
+        return this.validSayPrice.leadtime && this.validSayPrice.repliesLapQty && this.validSayPrice.repliesPrice
       },
       onRemind: function (str) {
         this.remindText = str

+ 1 - 1
components/pcb/home/Intro.vue

@@ -2,7 +2,7 @@
   <div class="pcb-intro">
     <p class="intro-title">PCB商家介绍<span>PCB Business Introduction</span></p>
     <div class="item name">
-      <a href="">
+      <a>
         <img src="/images/pcb/test-logo.png" alt="">
       </a>
       <p>深圳市英唐致盈供应链管理有限公司</p>

+ 1 - 1
components/pcb/home/Kinds.vue

@@ -2,7 +2,7 @@
   <div class="pcb-kinds">
     <ul class="pk-list">
       <li class="pk-item" v-for="kind in kinds">
-        <nuxt-link :to="`/pcb/search/?w=${kind.nameCn}`">{{kind.nameCn}}<i class="icon-arrow-right iconfont"></i></nuxt-link>
+        <nuxt-link :to="`/pcb/search/?w=${encodeURIComponent(kind.nameCn)}`">{{kind.nameCn}}<i class="icon-arrow-right iconfont"></i></nuxt-link>
       </li>
     </ul>
     <img class="fr" src="/images/pcb/banner.png" alt="">

+ 9 - 3
components/pcb/home/floors/Floors.vue

@@ -1,15 +1,21 @@
 <template>
   <div class="floors">
     <div class="floor-line line1">
-      <p>PCB物料<span>PCB material</span><a href="">查看更多</a></p>
+      <p>PCB物料<span>PCB material</span>
+        <nuxt-link :to="`/pcb/search/?w=${encodeURIComponent('PCB物料')}`">查看更多</nuxt-link>
+      </p>
       <floor></floor>
     </div>
     <div class="floor-line line2">
-      <p>PCB常用耗材<span>PCB common consumables</span><a href="">查看更多</a></p>
+      <p>PCB常用耗材<span>PCB common consumables</span>
+        <nuxt-link :to="`/pcb/search/?w=${encodeURIComponent('PCB常用耗材')}`">查看更多</nuxt-link>
+      </p>
       <floor></floor>
     </div>
     <div class="floor-line line3">
-      <p>PCB设备<span>PCB equipment</span><a href="">查看更多</a></p>
+      <p>PCB设备<span>PCB equipment</span>
+        <nuxt-link :to="`/pcb/search/?w=${encodeURIComponent('PCB设备')}`">查看更多</nuxt-link>
+      </p>
       <floor></floor>
     </div>
   </div>

+ 1 - 1
components/pcb/search/ResultTitle.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="result-title text-muted">
-    搜索"<span class="text-inverse" >{{keyword}}</span>"<span v-if="status != 1">暂无此型号</span>
+    搜索"<span class="text-inverse" >{{keyword}}</span>"<span v-if="status != 1">暂无此产品</span>
     <span v-if="status != 3">,为您找到
     <span class="text-num" v-text="good_list.total"></span> 个<span v-if="status == 2">相关</span>产品</span>:
   </div>