Commit d6582abf by liimin

refactor(order): 重构订单详情页面布局和样式

- 调整了多个组件的样式,包括 BlockBox、DeliveryInfo、OrderAmount、OrderGoods、OrderInfo 等
- 优化了订单信息的展示结构,增加了订单顶部和底部区域
- 统一了样式变量的使用,替换了部分硬编码的样式值
- 调整了部分组件的属性和结构,提高了组件的复用性和可维护性
1 parent 45df2aac
const { mockDeliveryInfoData } = require('./mock.js'); const { mockDeliveryInfoData } = require('./mock.js');
Component({ Component({
options: {
addGlobalClass: true,
},
properties: { properties: {
orderInfo: { orderInfo: {
type: Object, type: Object,
......
/* 发货信息组件样式 */ /* 发货信息组件样式,复用父页面的样式 */
.title {
font-size: 32rpx;
padding-bottom: 24rpx;
font-weight: 500;
}
.item {
display: flex;
align-items: flex-start;
font-size: 24rpx;
min-height: 48rpx;
line-height: 48rpx;
font-weight: 400;
color: #6e6e7a;
}
.item .label {
width: 150rpx;
}
.item .value {
width: calc(100% - 150rpx);
}
\ No newline at end of file \ No newline at end of file
const { mockOrderAmountData } = require('./mock.js'); const { mockOrderAmountData } = require('./mock.js');
Component({ Component({
options: {
addGlobalClass: true,
},
properties: { properties: {
orderInfo: { orderInfo: {
type: Object, type: Object,
......
/* 订单金额组件样式,复用父页面的样式 */
\ No newline at end of file \ No newline at end of file
const { mockOrderGoodsData } = require('./mock.js'); const { mockOrderGoodsData } = require('./mock.js');
Component({ Component({
options: {
addGlobalClass: true,
},
properties: { properties: {
orderInfo: { orderInfo: {
type: Object, type: Object,
......
/* 订单商品组件样式 */
.title {
font-size: 32rpx;
padding-bottom: 24rpx;
font-weight: 500;
}
.merchantName.text-hide {
/* 文本隐藏样式应该在全局样式中定义 */
}
.goods {
margin-top: 40rpx;
display: flex;
align-items: center;
height: 160rpx;
}
.goods .icon {
width: 160rpx;
height: 100%;
overflow: hidden;
border-radius: var(--borderRadius);
margin-right: 20rpx;
}
.goods .info {
width: calc(100% - 180rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.goods .info .name {
font-size: 30rpx;
color: #333;
}
.goods .info .specification {
font-size: 24rpx;
color: #B1B1B3;
}
.goods .info .price {
display: flex;
justify-content: space-between;
color: var(--btnColor);
font-weight: 500;
}
.goods .info .price .count {
color: #656566;
font-weight: normal;
}
\ No newline at end of file \ No newline at end of file
/* 订单商品组件样式,复用父页面的样式 */
\ No newline at end of file \ No newline at end of file
const { mockOrderInfoData } = require('./mock.js'); const { mockOrderInfoData } = require('./mock.js');
Component({ Component({
options: {
addGlobalClass: true,
},
properties: { properties: {
orderInfo: { orderInfo: {
type: Object, type: Object,
......
/* 订单信息组件样式,复用父页面的样式 */
\ No newline at end of file \ No newline at end of file
...@@ -9,24 +9,117 @@ ...@@ -9,24 +9,117 @@
color: #2C2C2C; color: #2C2C2C;
margin-bottom: 6rpx; margin-bottom: 6rpx;
} }
.status-box .icon{
.status-box .icon {
width: 50rpx; width: 50rpx;
height: 52rpx; height: 52rpx;
margin-right: 12rpx; margin-right: 12rpx;
} }
.box { .box {
background-color: #fff; background-color: #fff;
border-radius: var(--borderRadius); border-radius: var(--borderRadius);
margin-top: 20rpx; margin-top: 20rpx;
padding: 24rpx 24rpx 40rpx; padding: 24rpx 24rpx 40rpx;
} }
.box:first-of-type{
.box:first-of-type {
margin-top: 0; margin-top: 0;
} }
.box .title {
font-size: 32rpx;
padding-bottom: 24rpx;
font-weight: 500;
}
.box .item {
display: flex;
align-items: center;
font-size: 24rpx;
min-height: 48rpx;
line-height: 48rpx;
}
.box .item.flex-start {
align-items: flex-start;
}
.box .item .label {
width: 150rpx;
}
.box .item .value {
width: calc(100% - 150rpx);
color: #656566;
}
.box .goods {
margin-top: 40rpx;
display: flex;
align-items: center;
height: 160rpx;
}
.box .goods .icon {
width: 160rpx;
height: 100%;
overflow: hidden;
border-radius: var(--borderRadius);
margin-right: 20rpx;
}
.box .goods .info {
width: calc(100% - 180rpx);
height: 100%;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.box .goods .info .name {
font-size: 30rpx;
color: #333;
}
.box .goods .info .specification{
font-size: 24rpx;
color: #B1B1B3;
}
.box .goods .info .price {
display: flex;
justify-content: space-between;
color: var(--btnColor);
font-weight: 500;
font-weight: 500;
}
.box .goods .info .price .count {
color: #656566;
font-weight: normal;
}
.price-item {
height: 60rpx;
display: flex;
justify-content: space-between;
align-items: center;
color: #656566;
font-size: 24rpx;
}
.price-item.line {
border-bottom: 2rpx solid #E3E3E6;
margin-bottom: 12rpx;
}
.price-item .price {
font-size: 28rpx;
color: var(--btnColor);
font-weight: 500;
}
.price-item .sum{
font-size: 34rpx;
font-weight: 500;
}
.price-item .unit{
font-size: 28rpx;
}
.discounts { .discounts {
position: relative; position: relative;
} }
...@@ -45,7 +138,6 @@ ...@@ -45,7 +138,6 @@
top: 50%; top: 50%;
transform: translate(0, -50%); transform: translate(0, -50%);
} }
.qr-box { .qr-box {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -84,22 +176,19 @@ ...@@ -84,22 +176,19 @@
box-sizing: border-box; box-sizing: border-box;
background-size: cover; background-size: cover;
} }
.box_wrapper .bg{
.box_wrapper .bg {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.box_wrapper .info{
.box_wrapper .info {
position: relative; position: relative;
z-index: 2; z-index: 2;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.left_icon_box { .left_icon_box {
width: 156rpx; width: 156rpx;
height: 156rpx; height: 156rpx;
...@@ -207,25 +296,20 @@ ...@@ -207,25 +296,20 @@
color: #B1B1B3; color: #B1B1B3;
font-size: 24rpx; font-size: 24rpx;
} }
.brightColor { .brightColor {
color: var(--btnColor); color: var(--btnColor);
} }
.darkColor { .darkColor {
color: #6D6D6D; color: #6D6D6D;
} }
.describeColor { .describeColor {
color: #D83C14; color: #D83C14;
} }
.discount { .discount {
font-size: 20rpx; font-size: 20rpx;
font-weight: 500; font-weight: 500;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.leftMargin { .leftMargin {
padding-left: 32rpx; padding-left: 32rpx;
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!