Commit 93158a78 by liimin

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

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