Forráskód Böngészése

列表为空时显示

DELL 3 éve
szülő
commit
ecb49e817f

+ 52 - 13
packageGoods/coupon/index.vue

@@ -21,7 +21,7 @@
 							</view>
 						</view>
 					</view>
-					<view style="position: absolute;right: 40rpx;">
+					<view class="uradio">
 						<u-radio :customStyle="{ marginBottom: '8px' }" :name="item.id" activeColor="#E96737" size="24" @change="exclusive(index)">
 					</u-radio>
 					</view>
@@ -31,7 +31,11 @@
 		</view>
 
 		<view class="flex empty" v-if="!list.length">
-			<u-empty text="数据为空" mode="order" />
+			<view class="center">
+				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode=""></image>
+				<view class="center-font">暂无优惠券</view>
+			</view>
+			<!-- <u-empty text="数据为空" mode="order" /> -->
 		</view>
 
 		<view class="footer-fixed">
@@ -87,10 +91,11 @@
 			},
 
 			getList() {
+				let _this = this
 				uni.showLoading({
 					title: '加载中'
 				});
-				$http.post('/api/v1/mp/user/ticket/order/coupon/list', {}).then(
+				$http.post(`/api/v1/mp/user/ticket/order/coupon/list?pageNum=${_this.pageNum}&pageSize=20`, {}).then(
 					res => {
 						uni.hideLoading();
 						if (res.code == 0) {
@@ -99,10 +104,11 @@
 								let useAreaDesc = JSON.parse(item.useArea)
 								item.useAreaDesc = useAreaDesc.desc
 							})
-							this.list = res.data
-							for (var i = 0; i < this.list.length; i++) {
-								if(this.list[i].id == this.couponId){
-									this.isActive = i
+							_this.list = res.data
+							_this.total = res.total
+							for (var i = 0; i < _this.list.length; i++) {
+								if(_this.list[i].id == _this.couponId){
+									_this.isActive = i
 								}
 							}
 						}
@@ -159,14 +165,27 @@
 					}
 				})
 			}
-		}
+		},
+		onReachBottom() {
+			// 判断是否有数据
+			if (this.total > this.pageNum * 20) {
+				setTimeout(() => {
+					++this.pageNum
+					this.getList()
+				}, 500)
+			} else {
+				uni.$u.toast('已经到底了')
+			}
+		},
 	}
 </script>
 
 <style lang="scss" scoped>
 	.coupon {
+		
 		&-title {
 			position: fixed;
+			z-index: 10;
 			width: 100%;
 			padding: 24rpx 32rpx;
 			background-color: #FFFFFF;
@@ -221,6 +240,7 @@
 						.price {
 							position: absolute;
 							color: #fff;
+							z-index: 0;
 							
 							text:first-child {
 								line-height: 150rpx;
@@ -235,6 +255,9 @@
 					}
 				}
 
+				.uradio {
+					position: absolute;right: 40rpx;
+				}
 				.circle {
 					width: 40rpx;
 					height: 40rpx;
@@ -254,6 +277,22 @@
 
 	.empty {
 		height: 60vh;
+		
+		.center {
+			text-align: center;
+		
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+		
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
 	}
 
 	.footer-fixed {
@@ -272,14 +311,14 @@
 			padding: 20rpx 0;
 
 			/deep/ button {
-				width: 640rpx;
-				height: 90rpx;
-				line-height: 90rpx;
+				width: 441rpx;
+				height: 88rpx;
+				line-height: 88rpx;
 				font-size: 36rpx;
 				color: #fff;
-				background-color: $uni-bg-color;
+				background-color: #F9822C;
 				border: none;
-				border-radius: 20rpx;
+				border-radius: 44rpx;
 			}
 		}
 	}

+ 21 - 1
packageGoods/goods/list.vue

@@ -51,7 +51,11 @@
 			</view>
 		</view>
 		<view class="flex empty" v-if="!list.length">
-			<u-empty text="暂无商品" mode="order" />
+			<view class="center">
+				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode=""></image>
+				<view class="center-font">新的活动正在准备中...</view>
+			</view>
+			<!-- <u-empty text="暂无商品" mode="order" /> -->
 		</view>
 	</view>
 </template>
@@ -298,5 +302,21 @@
 	
 	.empty {
 		height: 50vh;
+		
+		.center {
+			text-align: center;
+		
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+		
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
 	}
 </style>

+ 20 - 1
packageGoods/order/index.vue

@@ -48,7 +48,11 @@
 				</view>
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
-				<u-empty text="还没有订单" mode="order" />
+				<view class="center">
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_4.png" mode=""></image>
+					<view class="center-font">暂无相关订单...</view>
+				</view>
+				<!-- <u-empty text="还没有订单" mode="order" /> -->
 			</view>
 		</view>
 	</view>
@@ -378,6 +382,21 @@
 		// 空状态
 		.empty {
 			height: 60vh;
+			.center {
+				text-align: center;
+			
+				&-img {
+					width: 228rpx;
+					height: 320rpx;
+				}
+			
+				&-font {
+					font-size: 30rpx;
+					font-weight: 400;
+					color: #999999;
+					margin-bottom: 250rpx;
+				}
+			}
 		}
 	}
 </style>

+ 5 - 5
packageOperate/address/index.vue

@@ -263,14 +263,14 @@
 		}
 
 		/deep/ button {
-			width: 640rpx;
-			height: 90rpx;
-			line-height: 90rpx;
+			width: 441rpx;
+			height: 88rpx;
+			line-height: 88rpx;
 			font-size: 36rpx;
 			color: #fff;
-			background-color: $uni-bg-color;
+			background-color: #F9822C;
 			border: none;
-			border-radius: 20rpx;
+			border-radius: 44rpx;
 		}
 	}
 </style>

+ 21 - 1
packagePrize/coupon/use.vue

@@ -40,7 +40,11 @@
 			</view>
 		</view>
 		<view class="flex empty" v-if="!list.length">
-			<u-empty text="数据为空" mode="order" />
+			<view class="center">
+				<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode=""></image>
+				<view class="center-font">暂无优惠券</view>
+			</view>
+			<!-- <u-empty text="数据为空" mode="order" /> -->
 		</view>
 	</view>
 </template>
@@ -219,5 +223,21 @@
 
 	.empty {
 		height: 60vh;
+		
+		.center {
+			text-align: center;
+		
+			&-img {
+				width: 228rpx;
+				height: 320rpx;
+			}
+		
+			&-font {
+				font-size: 30rpx;
+				font-weight: 400;
+				color: #999999;
+				margin-bottom: 250rpx;
+			}
+		}
 	}
 </style>

+ 2 - 2
packagePrize/prize/index.vue

@@ -70,7 +70,7 @@
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">
-					<image class="center-img" src="../../static/activity/null.png" mode=""></image>
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode=""></image>
 					<view class="center-font">还没有商品</view>
 				</view>
 			</view>
@@ -101,7 +101,7 @@
 			</view>
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">
-					<image class="center-img" src="../../static/activity/null.png" mode=""></image>
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_1.png" mode=""></image>
 					<view class="center-font">还没有优惠券</view>
 				</view>
 			</view>

+ 1 - 1
pages/activity/index.vue

@@ -46,7 +46,7 @@
 
 			<view class="flex empty" v-if="!list.length && !loading">
 				<view class="center">
-					<image class="center-img" src="../../static/activity/null.png" mode=""></image>
+					<image class="center-img" src="https://mp-public-1310078123.cos.ap-shanghai.myqcloud.com/v2/nodata_3.png" mode=""></image>
 					<view class="center-font">新的活动正在准备中...</view>
 				</view>
 				<!-- <u-empty text="活动为空" mode="order" /> -->