Browse Source

Merge remote-tracking branch 'origin/master'

yangc 8 years ago
parent
commit
366ae62d39
1 changed files with 7 additions and 2 deletions
  1. 7 2
      components/store/CommodityInfo.vue

+ 7 - 2
components/store/CommodityInfo.vue

@@ -309,8 +309,13 @@
         getFragment(this.commodity, this.fragment)
       },
       addNum () {
-//        let pack = this.commodity.perQty || this.commodity.minPackQty
-        let newNum = this.fragment.num + 1
+        let pack = this.commodity.perQty || this.commodity.minPackQty
+        let newNum = 0
+        if (this.commodity.breakUp) {
+          newNum = this.fragment.num + 1
+        } else {
+          newNum = this.fragment.num + pack
+        }
         this.changeNum(newNum)
         getFragment(this.commodity, this.fragment)
       },