lilei 10 kuukautta sitten
vanhempi
commit
0d2d8df465
2 muutettua tiedostoa jossa 10 lisäystä ja 8 poistoa
  1. 2 1
      pagesB/components/chooseProductItem.vue
  2. 8 7
      pagesB/promoDetail.vue

+ 2 - 1
pagesB/components/chooseProductItem.vue

@@ -12,7 +12,8 @@
 				<view class="choose-product-item-left-info-price">
 				<view class="choose-product-item-left-info-price">
 					<view class="price-txt">¥<text>{{item.cost}}</text></view>
 					<view class="price-txt">¥<text>{{item.cost}}</text></view>
 					<view>
 					<view>
-						<u-number-box v-model="item.qty" :index="item.id" :input-width="60" :input-height="60" size="mini" :min="1" @change="changeQty"></u-number-box>
+						{{item.qty}}
+						<!-- <u-number-box v-model="item.qty" :index="item.id" :input-width="60" :input-height="60" size="mini" :min="1" @change="changeQty"></u-number-box> -->
 					</view>
 					</view>
 				</view>
 				</view>
 			 </view>
 			 </view>

+ 8 - 7
pagesB/promoDetail.vue

@@ -75,7 +75,7 @@
 						@click="chooseClick" 
 						@click="chooseClick" 
 						@open="chooseOpen"
 						@open="chooseOpen"
 						:options="chooseOptions"
 						:options="chooseOptions"
-						v-if="item.top > curScrollPopuTop-showScrollPopuHeight && item.top < curScrollPopuTop + showScrollPopuHeight*2"
+						v-if="item.top > curScrollPopuTop-showScrollPopuHeight-2 && item.top < curScrollPopuTop + showScrollPopuHeight+2"
 						>
 						>
 							<chooseProductItem 
 							<chooseProductItem 
 							:item="item" 
 							:item="item" 
@@ -291,19 +291,20 @@
 			// popu 滚动
 			// popu 滚动
 			onscrollPopu(e){
 			onscrollPopu(e){
 				console.log(e.detail.scrollTop)
 				console.log(e.detail.scrollTop)
+				this.curScrollPopuTop = e.detail.scrollTop
 				// 清除计时器
 				// 清除计时器
-				clearTimeout(this.scrolltimer)
+				// clearTimeout(this.scrolltimer)
 				// 如果停留则表示滚动结束
 				// 如果停留则表示滚动结束
-				this.scrolltimer = setTimeout(() => {
-				  this.curScrollPopuTop = e.detail.scrollTop
-				}, 17)
+				// this.scrolltimer = setTimeout(() => {
+				//   this.curScrollPopuTop = e.detail.scrollTop
+				// }, 17)
 			},
 			},
 			// 已选产品变更数量
 			// 已选产品变更数量
 			changeQty(e){
 			changeQty(e){
 				const rowIndex = this.chooseList.findIndex(key => key.id == e.index)
 				const rowIndex = this.chooseList.findIndex(key => key.id == e.index)
 				if(rowIndex>=0){
 				if(rowIndex>=0){
-					this.chooseList[rowIndex].qty = e.value
-					this.chooseList.splice()
+					// this.chooseList[rowIndex].qty = e.value
+					// this.chooseList.splice()
 				}
 				}
 				// 更新页面产品数据
 				// 更新页面产品数据
 				const aindex = this.list.findIndex(key => key.id == e.index)
 				const aindex = this.list.findIndex(key => key.id == e.index)