zs 2 years ago
parent
commit
6e7f43b8f7
2 changed files with 105 additions and 5 deletions
  1. 2 2
      pages/my/index.vue
  2. 103 3
      pagesHome/order/appraise.vue

+ 2 - 2
pages/my/index.vue

@@ -29,8 +29,8 @@
 				<view class="two_1">
 				<view class="two_1">
 					<view class="title">我的订单</view>
 					<view class="title">我的订单</view>
 					<view class="title">
 					<view class="title">
-						<text @click="toOrder({route:'pagesMy/order/index',type:'order',status:'-0'})">全部订单</text>
-						<text class="iconfont icon-jiantouyou"></text>
+						<!-- <text @click="toOrder({route:'pagesMy/order/index',type:'order',status:'-0'})">全部订单</text>
+						<text class="iconfont icon-jiantouyou"></text> -->
 					</view>
 					</view>
 				</view>
 				</view>
 				<view class="two_2">
 				<view class="two_2">

+ 103 - 3
pagesHome/order/appraise.vue

@@ -13,7 +13,24 @@
 				</view>
 				</view>
 			</view>
 			</view>
 			<view class="two">
 			<view class="two">
-
+				<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
+					<view class="list-scroll-view">
+						<view class="list" v-for="(item, index) in list" :key="index">
+							<image v-if="item.file&&item.file.length>0" class="image"
+								:src="item.file&&item.file.length>0?item.file[0].url:''" mode="">
+							</image>
+							<text v-else class="iconfont icon-top"></text>
+							<view class="list_1">
+								<view class="other">
+									<text>{{item.phone}}</text>
+									<text>{{item.time}}</text>
+								</view>
+								<view class="other1">{{item.content}}</view>
+								<view class="other1">规格:{{item.specs}}</view>
+							</view>
+						</view>
+					</view>
+				</scroll-view>
 			</view>
 			</view>
 		</view>
 		</view>
 	</mobile-frame>
 	</mobile-frame>
@@ -49,14 +66,69 @@
 					specs: '5g',
 					specs: '5g',
 					rate: '95'
 					rate: '95'
 				},
 				},
-				list: []
+				list: [{
+						phone: '150********',
+						content: '好评!',
+						specs: '2.5kg',
+						time: '2022-12-03 16:15:00'
+					},
+					{
+						phone: '150********',
+						content: '好评!',
+						specs: '2.5kg',
+						time: '2022-12-03 16:15:00'
+					},
+					{
+						phone: '150********',
+						content: '好评!',
+						specs: '2.5kg',
+						time: '2022-12-03 16:15:00'
+					},
+					{
+						phone: '150********',
+						content: '好评!',
+						specs: '2.5kg',
+						time: '2022-12-03 16:15:00'
+					}
+				],
+				total: 0,
+				skip: 0,
+				limit: 6,
+				page: 0
 			};
 			};
 		},
 		},
 		onLoad: function(e) {
 		onLoad: function(e) {
 
 
 		},
 		},
 		methods: {
 		methods: {
-
+			// 分页
+			toPage(e) {
+				const that = this;
+				let list = that.list;
+				let limit = that.limit;
+				if (that.total > list.length) {
+					uni.showLoading({
+						title: '加载中',
+						mask: true
+					})
+					let page = that.page + 1;
+					that.$set(that, `page`, page)
+					let skip = page * limit;
+					that.$set(that, `skip`, skip)
+					that.search();
+					uni.hideLoading();
+				} else uni.showToast({
+					title: '没有更多数据了'
+				});
+			},
+			// 清空列表
+			clearPage() {
+				const that = this;
+				that.$set(that, `list`, [])
+				that.$set(that, `skip`, 0)
+				that.$set(that, `limit`, 6)
+				that.$set(that, `page`, 0)
+			}
 		}
 		}
 	}
 	}
 </script>
 </script>
@@ -101,5 +173,33 @@
 				background-color: var(--mainColor);
 				background-color: var(--mainColor);
 			}
 			}
 		}
 		}
+		.two{
+			position: relative;
+			flex-grow: 1;
+			.list{
+				display: flex;
+				justify-content: space-around;
+				align-items: center;
+				background-color: var(--mainColor);
+				margin: 0 0 2vw 0;
+				padding: 2vw;
+				.other{
+					display: flex;
+					justify-content: space-between;
+				}
+			}
+		}
+	}
+	.scroll-view {
+		position: absolute;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+	
+		.list-scroll-view {
+			display: flex;
+			flex-direction: column;
+		}
 	}
 	}
 </style>
 </style>