Sfoglia il codice sorgente

文案”已经到底了“修改、活动列表页增加分页

DELL 3 anni fa
parent
commit
5c1a0a4ec5

+ 1 - 1
src/packageGoods/goods/list.vue

@@ -59,7 +59,7 @@
 					</view>
 				</view>
 				<!-- <view class="goods-list-item"></view> -->
-				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 		</view>
 		<view class="flex empty" v-if="!list.length">

+ 1 - 1
src/packageGoods/order/index.vue

@@ -52,7 +52,7 @@
 						<view class="order-list-item-btn-item flex pay"v-if="item.status.value == 0"  @click="payOrder(item)"><text>去支付</text></view>
 					</view>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>3" :status="statusNomore" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>3" :status="statusNomore" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">

+ 1 - 1
src/packageOperate/activity/record.vue

@@ -54,7 +54,7 @@
 					</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length>19" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length>19" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 		</view>
 
 		<!-- 中奖 -->

+ 1 - 1
src/packagePrize/bean/index.vue

@@ -28,7 +28,7 @@
 					</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length>7" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length>7" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			<view class="flex empty" v-if="!list.length">
 				<view class="center">
 					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_6.png" mode="scaleToFill"></image>

+ 1 - 1
src/packagePrize/coupon/use.vue

@@ -42,7 +42,7 @@
 					<image class="image-use" src="../static/coupon_use1.png" mode="scaleToFill" v-if="item.status.value == 1"></image>
 					<image class="image-use" src="../static/coupon_use2.png" mode="scaleToFill" v-else></image>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>6" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>6" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 		</view>
 		<view class="flex empty" v-if="!list.length">

+ 2 - 2
src/packagePrize/prize/index.vue

@@ -82,7 +82,7 @@
 						<view class="btnTwo">已兑换</view>
 					</view>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">
@@ -114,7 +114,7 @@
 						<view class="btn-title" v-else>查看详情</view>
 					</view>
 				</view>
-				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+				<u-loadmore :line="true" v-if="list.length>4" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">

+ 1 - 1
src/packagePrize/ticket/index.vue

@@ -45,7 +45,7 @@
 					</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 		</view>
 		<view class="flex empty" v-if="!list.length">
 			<view class="center">

+ 19 - 6
src/pages/activity/index.vue

@@ -43,9 +43,7 @@
 						</view>
 					</view>
 				</view>
-
 			</view>
-
 			<view class="flex empty" v-if="!list.length && !loading && triggerStatus == 0">
 				<view class="center">
 					<image class="center-img"
@@ -61,6 +59,7 @@
 				</view>
 			</view>
 		</view>
+		<u-loadmore :line="true" v-if="list.length>5" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到底了'" />
 		<custom-tab-bar :activeValue="'activity'" />
 	</view>
 </template>
@@ -71,6 +70,7 @@
 	export default {
 		data() {
 			return {
+				status: 'nomore',//上拉刷新状态
 				list: [],
 				statusArr: [{
 					name: '参与抽奖'
@@ -85,6 +85,8 @@
 				}],
 				triggerStatus: 0,
 				userInfo: '',
+				pageNum: 1,
+				total: 0,
 			}
 		},
 		onLoad(opthios) {
@@ -126,6 +128,8 @@
 				this.pageList()
 			},
 			pageList() {
+				this.pageNum = 1
+				this.total = 0
 				this.list = []
 				this.getList()
 			},
@@ -134,7 +138,7 @@
 					title: '加载中'
 				});
 				this.loading = true
-				$http.post(`/api/v1/mp/user/marketing/list?pageNum=1&pageSize=30`, {
+				$http.post(`/api/v1/mp/user/marketing/list?pageNum=${this.pageNum}&pageSize=5`, {
 					triggerStatus: this.triggerStatus,
 				}).then(res => {
 					uni.hideLoading();
@@ -178,7 +182,15 @@
 				// 		type: 1, }
 				query: `userId=${ this.userInfo.userId?this.userInfo.userId:null }&type=1`
 			}
-		}
+		},
+		onReachBottom() {
+			if(this.total < this.pageNum * 5) return ;
+			this.status = 'loading';
+			++this.pageNum
+			if(this.total < this.pageNum * 5) this.status = 'nomore';
+				else this.status = 'loading';
+			this.getList()
+		},
 	}
 </script>
 
@@ -200,7 +212,7 @@
 	}
 
 	.list {
-		padding: 120rpx 20rpx 100rpx;
+		padding: 120rpx 20rpx 0;
 
 		&-view {
 			text-align: center;
@@ -232,6 +244,7 @@
 						float: left;
 
 						.time {
+							font-size: 30rpx;
 							color: #333333;
 						}
 
@@ -241,7 +254,7 @@
 						}
 
 						.timetwo {
-							width: 430rpx;
+							width: 420rpx;
 							background: rgba(249, 130, 44, 0.08);
 							margin-top: 10rpx;
 							border: 2rpx solid #F9822C;

+ 1 - 1
src/pages/core/index.vue

@@ -147,7 +147,7 @@
 					<view class="center-font">还没有商品</view>
 				</view>
 			</view>
-			<u-loadmore :line="true" v-if="list.length" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
+			<u-loadmore :line="true" v-if="list.length" :status="status" :loading-text="'努力加载中'" :nomore-text="'已经到了'" />
 		</view>
 		
 		<custom-tab-bar :activeValue="'core'" />