|
|
|
@ -23,7 +23,7 @@ const queryParams: Required<any> = {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 获取订单列表
|
|
|
|
|
const orderList = ref<OrderItem[]>([])
|
|
|
|
|
const orderList = ref([])
|
|
|
|
|
// 是否加载中标记,用于防止滚动触底触发多次请求
|
|
|
|
|
const isLoading = ref(false)
|
|
|
|
|
// 是否分页结束
|
|
|
|
@ -38,14 +38,11 @@ const getData = async () => {
|
|
|
|
|
// 发送请求前,标记为加载中
|
|
|
|
|
isLoading.value = true
|
|
|
|
|
// 发送请求
|
|
|
|
|
const data = await getMemberOrderAPI(queryParams)
|
|
|
|
|
const res = await getMemberOrderAPI(queryParams)
|
|
|
|
|
const data = res.data
|
|
|
|
|
// 发送请求后,重置标记
|
|
|
|
|
isLoading.value = false
|
|
|
|
|
data.list.forEach((e) => {
|
|
|
|
|
const str = e.appointmentTimeStart.slice(0, 10)
|
|
|
|
|
const start = e.appointmentTimeStart.slice(11, 16)
|
|
|
|
|
const end = e.appointmentTimeEnd.slice(11, 16)
|
|
|
|
|
e.appointmentTime = str + ' ' + start + '-' + end
|
|
|
|
|
// if (e.orderDetails) {
|
|
|
|
|
// e.orderDetails.forEach((q) => {
|
|
|
|
|
// const arr = JSON.parse(q.product.photo)
|
|
|
|
@ -57,9 +54,9 @@ const getData = async () => {
|
|
|
|
|
// }
|
|
|
|
|
})
|
|
|
|
|
// 数组追加
|
|
|
|
|
orderList.value.push(...res.data.list)
|
|
|
|
|
orderList.value.push(...data.list)
|
|
|
|
|
// 分页条件
|
|
|
|
|
if (queryParams.pageNo < res.data.pages) {
|
|
|
|
|
if (queryParams.pageNo < data.pages) {
|
|
|
|
|
// 页码累加
|
|
|
|
|
queryParams.pageNo++
|
|
|
|
|
} else {
|
|
|
|
@ -135,49 +132,59 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
margin: 20rpx 20rpx;
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
|
|
|
|
|
.hd {
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
.statusLabel {
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
color: #FF7D00;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.md {
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
min-height: 100rpx;
|
|
|
|
|
font-size: 28rpx;
|
|
|
|
|
border-top: 2rpx solid #F2F2F2;
|
|
|
|
|
border-bottom: 2rpx solid #F2F2F2;
|
|
|
|
|
|
|
|
|
|
.order-details {
|
|
|
|
|
.detail-item {
|
|
|
|
|
margin: 20rpx 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
.img-url {
|
|
|
|
|
width: 40rpx;
|
|
|
|
|
height: 40rpx;
|
|
|
|
|
margin-right: 20rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.product-name {
|
|
|
|
|
//
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.predict-weight {
|
|
|
|
|
margin: 40rpx 0 20rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.foot {
|
|
|
|
|
margin-top: 16rpx;
|
|
|
|
|
padding: 10rpx;
|
|
|
|
|
position: relative;
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
|
|
.appointment-time {
|
|
|
|
|
margin: 10rpx 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.cancle {
|
|
|
|
|
position: absolute;
|
|
|
|
|
right: 0;
|
|
|
|
@ -190,6 +197,7 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:last-child {
|
|
|
|
|
padding-bottom: 40rpx;
|
|
|
|
|
}
|
|
|
|
@ -231,6 +239,7 @@ const onRefresherrefresh = async () => {
|
|
|
|
|
border-radius: 10rpx;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
.image {
|
|
|
|
|
width: 170rpx;
|
|
|
|
|
height: 170rpx;
|
|
|
|
|