Commit 93158a78 by liimin

style(order): 优化订单列表样式和布局

- 调整背景色、文字颜色等样式
- 优化搜索框、商品信息、价格等元素的布局
- 统一使用 var(--themeColor) 替代硬编码颜色值
- 调整字体大小和对齐方式
1 parent 017b20be
......@@ -8,7 +8,6 @@ page {
--btnColor: #FC8A32;
--borderRadius: 8rpx;
--margin: 32rpx;
--
/* 兼容 IOS<11.2 先constant再env */
--constantSafeAreaInsetBottom: constant(safe-area-inset-bottom);
/* 兼容 IOS>11.2 */
......
......@@ -5,7 +5,7 @@
left: 0;
width: 100%;
z-index: 99;
background-color: #F9F7F7;
background-color: #fff;
transition: all .15s;
}
......
......@@ -7,6 +7,7 @@
width: 100%;
height: 92rpx;
box-sizing: border-box;
background: #fff;
}
.tab-box.left{
padding-left: 32rpx;
......@@ -26,8 +27,9 @@
display: flex;
align-items: center;
box-sizing: border-box;
color: #A9A9A9;
color: #1B233D;
justify-content: center;
font-size: 26rpx;
}
.left .text{
justify-content: flex-start;
......@@ -37,17 +39,16 @@
}
.tab.active .text {
font-weight: 500;
font-size: 28rpx;
font-weight: 600;
transition: all .25s;
color: #2C2C2C;
color:#1B233D;
}
.tab .line {
width: 48rpx;
height: var(--borderRadius);
background: var(--btnColor);
border-radius: 2rpx;
background: var(--themeColor);
border-radius: 6rpx;
margin: 0 auto;
transform: scale(0);
transition: all .25s;
......
......@@ -31,7 +31,7 @@ export const ORDER_LIST =[
code: 4,
},
{
text: "售后",
text: "退货/售后",
image: "aftermarket",
code: 5,
},
......
......@@ -24,152 +24,159 @@ Page({
// 硬编码的订单列表数据
list: [
{
"id": "1",
"orderCode": "20230915001",
"orderClassify": 1,
"orderSource": 1,
"orderStatus": 1,
"afterSaleStatus": null,
"merchantName": "精品商城",
"deliveryType": 2,
"payPrice": "199.00",
"goodsNumber": 1,
"createdDate": "2023-09-15 14:30:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
id: "1",
orderCode: "20230915001",
orderClassify: 1,
orderSource: 1,
orderStatus: 1,
afterSaleStatus: null,
merchantName: "精品商城",
deliveryType: 2,
payPrice: "199",
goodsNumber: 1,
createdDate: "2023-09-15 14:30:00",
evaluatedFlag: "N",
relatedUserCouponStatus: 1,
orderGoods: [
{
"id": "101",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "车载充电器",
"specificationData": "白色 1个装",
"retailPrice": "199.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-15 14:30:00"
}
]
id: "101",
goodsImage:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
goodsName: "车载充电器",
specificationData: "白色 1个装",
retailPrice: "199",
activityPrice: null,
goodsNumber: 1,
warrantyDate: "2024-09-15 14:30:00",
},
],
},
{
"id": "2",
"orderCode": "20230914002",
"orderClassify": 1,
"orderSource": 2,
"orderStatus": 6,
"afterSaleStatus": null,
"merchantName": "汽车用品店",
"deliveryType": 2,
"payPrice": "599.00",
"goodsNumber": 2,
"createdDate": "2023-09-14 10:15:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
id: "2",
orderCode: "20230914002",
orderClassify: 1,
orderSource: 2,
orderStatus: 6,
afterSaleStatus: null,
merchantName: "汽车用品店",
deliveryType: 2,
payPrice: "599",
goodsNumber: 2,
createdDate: "2023-09-14 10:15:00",
evaluatedFlag: "N",
relatedUserCouponStatus: 1,
orderGoods: [
{
"id": "102",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "汽车脚垫",
"specificationData": "黑色 适配SUV",
"retailPrice": "399.00",
"activityPrice": "299.00",
"goodsNumber": 1,
"warrantyDate": "2024-09-14 10:15:00"
id: "102",
goodsImage:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
goodsName: "汽车脚垫",
specificationData: "黑色 适配SUV",
retailPrice: "399",
activityPrice: "299",
goodsNumber: 1,
warrantyDate: "2024-09-14 10:15:00",
},
{
"id": "103",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "车载香水",
"specificationData": "海洋香型",
"retailPrice": "200.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-14 10:15:00"
}
]
id: "103",
goodsImage:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
goodsName: "车载香水",
specificationData: "海洋香型",
retailPrice: "200",
activityPrice: null,
goodsNumber: 1,
warrantyDate: "2024-09-14 10:15:00",
},
],
},
{
"id": "3",
"orderCode": "20230910003",
"orderClassify": 1,
"orderSource": 3,
"orderStatus": 4,
"afterSaleStatus": null,
"merchantName": "汽车配件专营店",
"deliveryType": 2,
"payPrice": "899.00",
"goodsNumber": 1,
"createdDate": "2023-09-10 16:45:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
id: "3",
orderCode: "20230910003",
orderClassify: 1,
orderSource: 3,
orderStatus: 4,
afterSaleStatus: null,
merchantName: "汽车配件专营店",
deliveryType: 2,
payPrice: "899",
goodsNumber: 1,
createdDate: "2023-09-10 16:45:00",
evaluatedFlag: "N",
relatedUserCouponStatus: 1,
orderGoods: [
{
"id": "104",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "行车记录仪",
"specificationData": "1080P高清 夜视",
"retailPrice": "899.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-10 16:45:00"
}
]
id: "104",
goodsImage:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
goodsName: "行车记录仪",
specificationData: "1080P高清 夜视",
retailPrice: "899",
activityPrice: null,
goodsNumber: 1,
warrantyDate: "2024-09-10 16:45:00",
},
],
},
{
"id": "4",
"orderCode": "20230905004",
"orderClassify": 1,
"orderSource": 1,
"orderStatus": 5,
"afterSaleStatus": null,
"merchantName": "精品商城",
"deliveryType": 1,
"payPrice": "1299.00",
"goodsNumber": 1,
"createdDate": "2023-09-05 09:20:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"orderGoods": [
id: "4",
orderCode: "20230905004",
orderClassify: 1,
orderSource: 1,
orderStatus: 5,
afterSaleStatus: null,
merchantName: "精品商城",
deliveryType: 1,
payPrice: "1299",
goodsNumber: 1,
createdDate: "2023-09-05 09:20:00",
evaluatedFlag: "N",
relatedUserCouponStatus: 1,
orderGoods: [
{
"id": "105",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "车载导航",
"specificationData": "10英寸 安卓系统",
"retailPrice": "1299.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-05 09:20:00"
}
]
id: "105",
goodsImage:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
goodsName: "车载导航",
specificationData: "10英寸 安卓系统",
retailPrice: "1299",
activityPrice: null,
goodsNumber: 1,
warrantyDate: "2024-09-05 09:20:00",
},
],
},
{
"id": "5",
"orderCode": "20230901005",
"orderClassify": 1,
"orderSource": 5,
"orderStatus": 9,
"afterSaleStatus": 2,
"merchantName": "权益商城",
"deliveryType": 2,
"payPrice": "299.00",
"goodsNumber": 1,
"createdDate": "2023-09-01 11:30:00",
"evaluatedFlag": "N",
"relatedUserCouponStatus": 1,
"activityBigImg": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"activityName": "洗车服务券",
"orderGoods": [
id: "5",
orderCode: "20230901005",
orderClassify: 1,
orderSource: 5,
orderStatus: 9,
afterSaleStatus: 2,
merchantName: "权益商城",
deliveryType: 2,
payPrice: "299",
goodsNumber: 1,
createdDate: "2023-09-01 11:30:00",
evaluatedFlag: "N",
relatedUserCouponStatus: 1,
activityBigImg:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
activityName: "洗车服务券",
orderGoods: [
{
"id": "106",
"goodsImage": "http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
"goodsName": "洗车服务券",
"specificationData": "1次洗车服务",
"retailPrice": "299.00",
"activityPrice": null,
"goodsNumber": 1,
"warrantyDate": "2024-09-01 11:30:00"
}
]
}
id: "106",
goodsImage:
"http://gips2.baidu.com/it/u=4231193786,3187314859&fm=3028&app=3028&f=JPEG&fmt=auto?w=1024&h=1024",
goodsName: "洗车服务券",
specificationData: "1次洗车服务",
retailPrice: "299",
activityPrice: null,
goodsNumber: 1,
warrantyDate: "2024-09-01 11:30:00",
},
],
},
],
listFlag: true,
hasUserInfo: true,
......@@ -313,7 +320,7 @@ Page({
});
// this.getOrderList(); // 注释掉实际的API调用,使用硬编码数据
this.setData({
listFlag: true
listFlag: true,
});
},
search() {
......@@ -555,4 +562,4 @@ Page({
}
);
},
});
\ No newline at end of file
});
......@@ -38,7 +38,7 @@
left: 80rpx;
width: 420rpx;
height: 72rpx;
background: #F9F7F7;
background: #F7F8FA;
border-radius: 36rpx;
display: flex;
align-items: center;
......@@ -49,6 +49,7 @@
.search-box .icon {
width: 40rpx;
height: 100%;
margin-right: 10rpx;
}
.search-box .input {
......@@ -70,7 +71,7 @@
}
.placeholder-class {
color: #c8c9cc;
color: #C8C9CC;
}
.layout {
......@@ -101,7 +102,7 @@
width: 410rpx;
height: 40rpx;
font-size: 28rpx;
color: #1B233D;
color: #2D2D2E;
}
.layout .item .goods {
......@@ -162,15 +163,8 @@
}
.layout .item .info .info-top .price {
color: var(--btnColor);
font-size: 36rpx;
letter-spacing: -2rpx;
font-weight: 500;
flex-shrink: 0;
}
.layout .item .info .info-top .price .unit {
.layout .item .info .info-top .number {
color: #656566;
font-size: 24rpx;
}
......@@ -178,10 +172,16 @@
margin-top: 4rpx;
font-size: 24rpx;
color: #707071;
display: flex;
flex-direction: column;
align-items:flex-start;
gap: 8rpx;
}
.layout .item .info .info-bottom .number {
margin-left: auto;
.layout .item .info .info-bottom .price {
color: var(--themeColor);
font-size: 26rpx;
font-weight: 500;
}
.layout .item .info .info-bottom .specification {
......@@ -189,21 +189,29 @@
}
.layout .item .status {
font-size: 24rpx;
font-size: 28rpx;
color: #282829;
font-weight: 400;
}
.layout .item .bottom {
height: 80rpx;
margin-top: 36rpx;
height: 64rpx;
display: flex;
align-items: center;
align-items: flex-start;
font-size: 24rpx;
color: #656566;
}
.layout .item .bottom .total {
position: relative;
bottom: 16rpx;
}
.layout .item .bottom .price {
color: var(--btnColor);
font-weight: 500;
color: var(--themeColor);
font-weight: 600;
margin-left: 10rpx;
}
.layout .item .btn-box {
......@@ -218,13 +226,13 @@
display: flex;
align-items: center;
justify-content: center;
width: 124rpx;
height: 46rpx;
border-radius: 25rpx;
border: 2rpx solid #b1b1b3;
width: 144rpx;
height: 64rpx;
border-radius: 16rpx;
border: 1rpx solid #DCDFE6;
font-size: 24rpx;
margin-left: 12rpx;
color: #656566;
color: #1B233D;
}
.layout .item .btn-box .pay {
......
......@@ -6,7 +6,7 @@
</view>
<view class="search-box y-center">
<view class="icon text-center">
<icon type="search" size="16"></icon>
<icon type="search" size="18"></icon>
</view>
<input type="text" placeholder="搜索" value="{{keyword}}" class="input" confirm-type="search" bindconfirm="search" bindinput="input" bindblur="blur" />
<block wx:if="{{keyword}}">
......@@ -18,7 +18,7 @@
</view>
</navigation-bar>
<view class="tab" style="top:{{padding_bottom }}px;">
<tab tab="{{tab}}" bindclick="changeTab" index="{{tabIndex}}"></tab>
<tab tab="{{tab}}" bindclick="changeTab" index="{{tabIndex}}" ></tab>
</view>
</view>
<block wx:if="{{margin_top}}">
......@@ -56,8 +56,7 @@
<view class="specification">{{i.specificationData}}</view>
</block>
<view class="price">
<text class="unit">¥</text>
{{item.orderSource == 5 ? item.payPrice: (i.activityPrice ||i.retailPrice)}}
{{item.orderSource == 5 ? item.payPrice: (i.activityPrice ||i.retailPrice)}}积分
</view>
</view>
......@@ -78,15 +77,10 @@
</view>
</block>
</view>
<view class="bottom" wx:if="{{item.orderSource == 5}}">
共1件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<view class="bottom" wx:else>
共{{item.goodsNumber}}件商品,实付款<text class="price">¥{{item.payPrice}}</text>
</view>
<!-- 1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成 -->
<view class="bottom">
<view class="total">共{{item.goodsNumber}}件,实付款<text class="price">{{item.payPrice}}积分</text></view>
<!-- 1:待付款;2:已支付;3:已关闭;4:已发货;5:已收货;6:待发货;7:待安装;8:已安装;9:售后中;10:售后完成 -->
<!-- 售后状态 1:待审核;2:审核通过;3:审核不通过;4:待确认收到退货;5:退款中;6:已退款;7:退款失败 -->
<block wx:if="{{item.orderStatus != 3}}">
<view class="btn-box">
<block wx:if="{{!item.afterSaleStatus}}">
<block wx:if="{{item.orderStatus == 1}}">
......@@ -100,12 +94,12 @@
</block>
<block wx:elif="{{item.orderStatus > 2 && item.orderStatus < 9}}">
<!-- deliveryType 结算方式(1:到店核销,2:快递发货) -->
<block wx:if="{{item.deliveryType == 2 && item.orderStatus == 4}}">
<view class="btn confirm" catchtap="confirmReceipt" data-order-code="{{item.orderCode}}">确认收货
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view class="btn" catchtap="afterSale" data-item="{{item}}" wx:if="{{!(item.relatedUserCouponStatus == 2 || item.relatedUserCouponStatus == 3)}}">售后
</view>
</block>
<block wx:if="{{item.payPrice > 0 && item.orderSource != 4}}">
<view class="btn" catchtap="afterSale" data-item="{{item}}" wx:if="{{!(item.relatedUserCouponStatus == 2 || item.relatedUserCouponStatus == 3)}}">申请售后
<block wx:if="{{item.deliveryType == 2 && item.orderStatus == 4}}">
<view class="btn confirm" catchtap="confirmReceipt" data-order-code="{{item.orderCode}}">确认收货
</view>
</block>
</block>
......@@ -130,7 +124,7 @@
<view class="btn" data-item="{{item}}" catchtap="afterSaleDetail">售后详情</view>
</block>
</view>
</block>
</view>
</view>
</block>
</block>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!