Commit d6582abf by liimin

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

- 调整了多个组件的样式,包括 BlockBox、DeliveryInfo、OrderAmount、OrderGoods、OrderInfo 等
- 优化了订单信息的展示结构,增加了订单顶部和底部区域
- 统一了样式变量的使用,替换了部分硬编码的样式值
- 调整了部分组件的属性和结构,提高了组件的复用性和可维护性
1 parent 45df2aac
const { mockDeliveryInfoData } = require('./mock.js');
Component({
options: {
addGlobalClass: true,
},
properties: {
orderInfo: {
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
const { mockOrderAmountData } = require('./mock.js');
Component({
options: {
addGlobalClass: true,
},
properties: {
orderInfo: {
type: Object,
......
/* 订单金额组件样式,复用父页面的样式 */
\ No newline at end of file
const { mockOrderGoodsData } = require('./mock.js');
Component({
options: {
addGlobalClass: true,
},
properties: {
orderInfo: {
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
const { mockOrderInfoData } = require('./mock.js');
Component({
options: {
addGlobalClass: true,
},
properties: {
orderInfo: {
type: Object,
......
/* 订单信息组件样式,复用父页面的样式 */
\ No newline at end of file
......@@ -9,24 +9,117 @@
color: #2C2C2C;
margin-bottom: 6rpx;
}
.status-box .icon {
.status-box .icon{
width: 50rpx;
height: 52rpx;
margin-right: 12rpx;
}
.box {
background-color: #fff;
border-radius: var(--borderRadius);
margin-top: 20rpx;
padding: 24rpx 24rpx 40rpx;
padding: 24rpx 24rpx 40rpx;
}
.box:first-of-type {
.box:first-of-type{
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 {
position: relative;
}
......@@ -45,7 +138,6 @@
top: 50%;
transform: translate(0, -50%);
}
.qr-box {
display: flex;
flex-direction: column;
......@@ -84,22 +176,19 @@
box-sizing: border-box;
background-size: cover;
}
.box_wrapper .bg {
.box_wrapper .bg{
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.box_wrapper .info {
.box_wrapper .info{
position: relative;
z-index: 2;
width: 100%;
height: 100%;
}
.left_icon_box {
width: 156rpx;
height: 156rpx;
......@@ -207,25 +296,20 @@
color: #B1B1B3;
font-size: 24rpx;
}
.brightColor {
color: var(--btnColor);
}
.darkColor {
color: #6D6D6D;
}
.describeColor {
color: #D83C14;
}
.discount {
font-size: 20rpx;
font-weight: 500;
margin-bottom: 10rpx;
}
.leftMargin {
padding-left: 32rpx;
}
}
\ 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!