소스 검색

Signed-off-by: 1004749546@qq.com <1004749546@qq.com>
bug修改

1004749546@qq.com 4 년 전
부모
커밋
7055475237
3개의 변경된 파일8개의 추가작업 그리고 12개의 파일을 삭제
  1. 6 8
      pages/coupon/index/index.vue
  2. 2 2
      pages/order/order.vue
  3. 0 2
      pages/store/storeList.vue

+ 6 - 8
pages/coupon/index/index.vue

@@ -10,7 +10,7 @@
 					<couponTpl :list="couponList"></couponTpl>
 					<u-empty :text="noDataText" img-width="120" v-if="couponList.length==0 && status!='loading'" mode="list"></u-empty>
 					<view style="padding: 20upx;">
-						<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+						<u-loadmore v-if="count>pageSize || status=='loading'" :status="status" />
 					</view>
 				</scroll-view>
 			</swiper-item>
@@ -55,7 +55,6 @@
 			pageInit () {
 				this.current = 0 // tabs组件的current值,表示当前活动的tab选项
 				this.swiperCurrent = 0
-				this.count = 0
 				this.couponList = []
 				this.pageNo = 1
 				this.status = 'loading'
@@ -65,8 +64,6 @@
 			tabsChange(index) {
 				this.swiperCurrent = index;
 				this.couponList = []
-				this.count = 0
-				this.pageNo = 1
 				this.status = 'loading'
 			},
 			// swiper-item左右移动,通知tabs的滑块跟随移动
@@ -77,8 +74,6 @@
 			swiperChange(event){
 				console.log(event.detail)
 				this.couponList = []
-				this.count = 0
-				this.pageNo = 1
 				this.status = 'loading'
 			},
 			// 由于swiper的内部机制问题,快速切换swiper不会触发dx的连续变化,需要在结束时重置状态
@@ -88,10 +83,13 @@
 				this.$refs.uTabs.setFinishCurrent(current);
 				this.swiperCurrent = current;
 				this.current = current;
-				this.getList()
+				this.getList(1)
 			},
 			// 获取优惠卷列表
-			getList(){
+			getList(num){
+				if(num) {
+					this.pageNo = num
+				}
 				let item = this.tabsList[this.swiperCurrent]
 				let params = {
 					pageNo: this.pageNo,

+ 2 - 2
pages/order/order.vue

@@ -22,7 +22,7 @@
 			</view>
 			<u-empty :text="noDataText" img-width="120" v-if="list.length==0 && status!='loading'" mode="list"></u-empty>
 			<view style="padding: 20upx;">
-				<u-loadmore v-if="total>pageSize || status=='loading'" :status="status" />
+				<u-loadmore v-if="count>pageSize || status=='loading'" :status="status" />
 			</view>
 		</scroll-view>
 	</view>
@@ -37,7 +37,7 @@
 				status: 'loading',
 				list:[],
 				pageNo:1,
-				pageSize:15,
+				pageSize:10,
 				count:0,
 				orderStatusList: []
 			}

+ 0 - 2
pages/store/storeList.vue

@@ -111,10 +111,8 @@
 							item.distance = item.distanct && item.distanct.distance ? Math.round(item.distanct.distance / 1000) : ''
 						})
 						this.storeList = this.storeList.concat(list)
-						this.total = res.data.count || 0
 					} else {
 						this.storeList = []
-						this.total = 0
 						this.noDataText = res.message
 					}
 				})