Browse Source

修改登录返回404的问题

shenjj 7 years ago
parent
commit
d4a25b590a

+ 13 - 5
components/mobile/store/StoreDetail.vue

@@ -89,7 +89,7 @@
       </div>
       <div v-if="commodities.content&&commodities.content.length > 0">
         <div v-for="(item, index) in commodities.content">
-          <div class="middle">
+          <div class="middle" @click="goProductDetail(item)">
             <div class="list">
               <div class="fl">
                 <div class="name">品牌:</div>
@@ -687,8 +687,16 @@
         }
         .textinfo {
           font-size: 0.18rem;
-          margin-left: 0.1rem; display: inline-block;padding: 0.05rem 0.2rem;background: #3f84f6;color: #fff;font-weight: bold;
+          margin-left: 0.1rem;
+          display: inline-block;
+          background: #3f84f6;
+          color: #fff;
+          font-weight: bold;
           border-radius: 3px;
+          width: 0.8rem;
+          height: 0.32rem;
+          line-height: 0.32rem;
+          text-align: center
         }
         .button {
           font-size: 0.3rem;
@@ -736,7 +744,7 @@
         }
         .text {
           display: inline-block;
-          color: #666;
+          color: #333;
           font-size: 0.28rem
         }
         .table {
@@ -764,12 +772,12 @@
             }
             &:nth-child(odd) {
               background: #ddd;
-              color: #666;
+              color: #333;
               font-size: 0.28rem;
             }
             &:nth-child(even) {
               background: #fcfcfc;
-              color: #666;
+              color: #333;
               font-size: 0.28rem;
             }
             &:nth-last-of-type(1){

+ 21 - 8
pages/mobile/center/vendor/productdetails.vue

@@ -100,10 +100,10 @@
         <li v-for="(item, index) in chooseItem.prices" v-bind:key="index">
           <div class="clearfix">
             <div class="pull-left">
-              <input type="number" placeholder="数量" class="otherNumber" :class="{firstNumber: index === 0}" v-model.lazy="item.start" :disabled="index === 0" :readonly="index === 0" @blur="startpriceBlur(item, index)" maxlength="9"/>
+              <input type="number" placeholder="数量" class="otherNumber" :class="{firstNumber: index === 0}" @change="startpriceBlur(item, index)" v-model="item.start" :disabled="index === 0" :readonly="index === 0" @blur="startpriceBlur(item, index)" maxlength="9"/>
               <label v-if="index !== chooseItem.prices.length - 1">-</label>
               <label v-if="index === chooseItem.prices.length - 1">以上</label>
-              <input type="number" placeholder="数量" class="otherNumber" v-model.lazy="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9"/>
+              <input type="number" placeholder="数量" class="otherNumber" v-model="item.end" v-if="index !== chooseItem.prices.length - 1" @blur="endpriceBlur(item, index)" maxlength="9" @change="endpriceBlur(item, index)"/>
             </div>
             <div class="pull-right">
               <template v-if="chooseItem.currencyName == 'RMB'">
@@ -273,7 +273,12 @@
       // 开始价格阶段失去焦点
       startpriceBlur(item, index) {
         if (index > 0) {
-          if (item.start <= this.chooseItem.prices[index - 1].start) {
+          if (item.start === '' || toString(item.start).trim() === '') {
+            this.timeoutCount++
+            this.collectResult = '输入值不能为空'
+            item.start = ''
+            return false
+          } else if (Math.abs(item.start) <= Math.abs(this.chooseItem.prices[index - 1].start)) {
             this.timeoutCount++
             this.collectResult = '输入值会导致梯度重叠,请重新修改'
             item.start = ''
@@ -283,29 +288,36 @@
             this.chooseItem.prices[index - 1].end = item.start - 1
             return false
           }
-          if (item.start > item.end) {
+          if (item.end && toString(item.end).trim() !== '' && Math.abs(item.start) > Math.abs(item.end)) {
             this.timeoutCount++
             this.collectResult = `输入值必须小于${item.end}`
             item.start = ''
             return false
           }
           this.chooseItem.prices[index - 1].end = item.start - 1
+          console.log(this.chooseItem.prices)
         }
       },
       // 结束价格阶段失去焦点
       endpriceBlur(item, index) {
-        if (this.chooseItem.prices[index + 1].end !== '' && toString(this.chooseItem.prices[index + 1].end).trim() !== '' && Math.abs(item.end) + 1 >= this.chooseItem.prices[index + 1].end) {
+        if (item.end === '' && toString(item.end).trim() === '') {
+          this.timeoutCount++
+          this.collectResult = `输入值不能为空`
+          item.end = ''
+          return false
+        } else if (this.chooseItem.prices[index + 1].end !== '' && toString(this.chooseItem.prices[index + 1].end).trim() !== '' && Math.abs(item.end) + 1 >= Math.abs(this.chooseItem.prices[index + 1].end)) {
           this.timeoutCount++
           this.collectResult = `输入值不能大于${this.chooseItem.prices[index + 1].end - 1}`
           item.end = ''
           return false
-        } else if (item.start !== '' && toString(item.start).trim() !== '' && Math.abs(item.end) + 1 <= item.start) {
+        } else if (Math.abs(item.end) + 1 <= Math.abs(item.start)) {
           this.timeoutCount++
           this.collectResult = `输入值不能小于${item.start}`
           item.end = ''
           return false
         }
         this.chooseItem.prices[index + 1].start = Math.abs(item.end) + 1
+        console.log(this.chooseItem.prices)
       },
       // 交期失去焦点
       minDeliveryBlur() {
@@ -317,7 +329,7 @@
       },
       // 单价失去焦点
       rMBPriceBlur(item) {
-        if (!/^[0-9]+([.]{1}[1-9]+)?$/.test(item.rMBPrice)) {
+        if (!/^[0-9]+([.]{1}[0-9]+)?$/.test(item.rMBPrice)) {
           this.timeoutCount++
           this.collectResult = '单价只能输入数字'
           return false
@@ -419,7 +431,8 @@
               this.collectResult = '分段数量必须是正整数'
               isHas = true
               break
-            } else if (!/^[0-9]+([.]{1}[1-9]{1,6})?$/.test(this.chooseItem.prices[i].rMBPrice)) {
+            } else if (!/^[0-9]+([.]{1}[0-9]{1,6})?$/.test(this.chooseItem.prices[i].rMBPrice)) {
+              console.log(this.chooseItem.prices[i].rMBPrice)
               this.timeoutCount++
               this.collectResult = '单价只能输入数字'
               isHas = true