diff --git a/pages.json b/pages.json index 97f4328..4a1656d 100644 --- a/pages.json +++ b/pages.json @@ -102,7 +102,7 @@ { "path": "pages/myOrder/myOrder", "style": { - "navigationBarTitleText": "我的订单" + "navigationBarTitleText": "订单列表" } }, { diff --git a/pages/myOrder/myOrder.vue b/pages/myOrder/myOrder.vue index 8eb0cf7..d200cf1 100644 --- a/pages/myOrder/myOrder.vue +++ b/pages/myOrder/myOrder.vue @@ -1,7 +1,62 @@ @@ -9,16 +64,109 @@ @@ -62,15 +235,167 @@ onUnload(() => { .container { overflow: hidden; padding: 20rpx; + min-height: 100vh; + background-color: #f5f5f5; } -.item { +.loading-container { + display: flex; + justify-content: center; + align-items: center; + height: 200rpx; + + .loading-text { + font-size: 28rpx; + color: #666; + } +} + +.empty-container { + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + height: 400rpx; + + .empty-icon { + font-size: 80rpx; + margin-bottom: 20rpx; + } + + .empty-text { + font-size: 28rpx; + color: #999; + } +} + +.order-item { + background-color: #fff; + border-radius: 16rpx; margin-bottom: 20rpx; + padding: 30rpx; + box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.08); + + &:active { + background-color: #f8f8f8; + } } -.uni-body { - font-size: 28rpx; - line-height: 1.6; - color: #666; +.order-header { + margin-bottom: 20rpx; + + .order-title { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10rpx; + + .title-text { + font-size: 32rpx; + font-weight: 600; + color: #333; + } + + .status-text { + font-size: 24rpx; + padding: 6rpx 12rpx; + border-radius: 20rpx; + font-weight: 500; + + &.status-pending { + background-color: #fff7e6; + color: #fa8c16; + } + + &.status-success { + background-color: #f6ffed; + color: #52c41a; + } + + &.status-refund { + background-color: #fff2f0; + color: #ff4d4f; + } + + &.status-unknown { + background-color: #f5f5f5; + color: #999; + } + } + } + + .order-time { + font-size: 24rpx; + color: #999; + } +} + +.order-content { + .order-info { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 20rpx; + padding-bottom: 15rpx; + border-bottom: 1rpx solid #f0f0f0; + + .order-id { + font-size: 26rpx; + color: #666; + } + + .order-amount { + font-size: 32rpx; + color: #f15a04; + font-weight: bold; + } + } + + .order-details { + .detail-item { + display: flex; + justify-content: space-between; + margin-bottom: 12rpx; + + .label { + font-size: 26rpx; + color: #666; + min-width: 140rpx; + } + + .value { + font-size: 26rpx; + color: #333; + flex: 1; + text-align: right; + + &.logistic-pending { + color: #fa8c16; + } + + &.logistic-success { + color: #52c41a; + } + + &.logistic-returned { + color: #1890ff; + } + + &.logistic-unknown { + color: #999; + } + } + } + } +} + +.load-more { + margin-top: 20rpx; + text-align: center; + + .no-more-text { + font-size: 24rpx; + color: #999; + } }