Browse Source

解决产品详情页面点击加减时价格梯度所对应的单价不变化的问题以及隐藏店铺首页和器件详情的收藏和关注功能

hangb 8 years ago
parent
commit
48b8b0e59c

+ 4 - 4
components/product/component/ComponentDetail.vue

@@ -55,10 +55,10 @@
               </div>
             </div>
             <div class="message-detail"></div>
-            <div class="form-group">
-               <button type="text" v-if="!collectList" @click="collect(list.id)" class="btn btn-default btn-store">加入收藏</button>
-               <button class="btn btn-default btn-store" v-if="collectList" disabled="disabled">已收藏</button>
-            </div>
+            <!--<div class="form-group">-->
+               <!--<button type="text" v-if="!collectList" @click="collect(list.id)" class="btn btn-default btn-store">加入收藏</button>-->
+               <!--<button class="btn btn-default btn-store" v-if="collectList" disabled="disabled">已收藏</button>-->
+            <!--</div>-->
           </div>
         </div>
       </div>

+ 1 - 1
components/searchStore/StoreContent.vue

@@ -21,7 +21,7 @@
           <span>库存量:<span v-text="store.totalReserve"></span></span>
         </div>
         <div class="btn-content">
-          <a class="focus-store store-btn" @click="focusStore(store, index)" v-text="focusData[index] === 'true'?'已关注':'关注店铺'" :class="{'is-focus': focusData[index] === 'true'}"></a>
+          <!--<a class="focus-store store-btn" @click="focusStore(store, index)" v-text="focusData[index] === 'true'?'已关注':'关注店铺'" :class="{'is-focus': focusData[index] === 'true'}"></a>-->
           <a :href="'/store/' + store.uuid" target="_blank" class="enter-store store-btn">进入店铺</a>
         </div>
       </div>

+ 3 - 1
components/store/CommodityInfo.vue

@@ -240,7 +240,7 @@
         if (prices && prices.length) {
           let _this = this
           for (let i = 0; i < prices.length; i++) {
-            if (_this.fragment.num >= prices[i].start && _this.fragment.num < prices[i].end) {
+            if (_this.fragment.num >= prices[i].start && _this.fragment.num <= prices[i].end) {
               _this.fragment.price = _this.fragment.currency === 'RMB' ? prices[i].rMBPrice : prices[i].uSDPrice
               break
             }
@@ -330,6 +330,7 @@
         }
         this.changeNum(newNum)
         getFragment(this.commodity, this.fragment)
+        this.onInput()
       },
       addNum () {
         let pack = this.commodity.perQty || this.commodity.minPackQty
@@ -341,6 +342,7 @@
         }
         this.changeNum(newNum)
         getFragment(this.commodity, this.fragment)
+        this.onInput()
       },
       inputNum () {
         if ((/^[\d]*$/).test(this.fragment.num)) {