Commit 5f61da20 by liimin

feat(订单): 优化订单相关组件样式和功能

- 调整订单按钮样式和字体粗细
- 修改价格显示样式和单位字体
- 添加订单底部显示控制逻辑
- 优化Tab组件样式和交互
- 重构售后详情图片预览逻辑
- 将wxss样式迁移至scss并改进布局
1 parent d14cde44
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
box-sizing: border-box; box-sizing: border-box;
color: #1B233D; color: #1B233D;
justify-content: center; justify-content: center;
font-size: 26rpx; font-size: 30rpx;
/* 添加以下属性防止文本换行 */
white-space: nowrap;
min-width: 100%;
transition: all 0.25s;
} }
.left .text{ .left .text{
justify-content: flex-start; justify-content: flex-start;
...@@ -42,11 +46,13 @@ ...@@ -42,11 +46,13 @@
font-weight: 600; font-weight: 600;
transition: all .25s; transition: all .25s;
color:#1B233D; color:#1B233D;
/* 确保激活状态下文本不会换行 */
white-space: nowrap;
} }
.tab .line { .tab .line {
width: 48rpx; width: 48rpx;
height: var(--borderRadius); height: 8rpx;
background: var(--themeColor); background: var(--themeColor);
border-radius: 6rpx; border-radius: 6rpx;
margin: 0 auto; margin: 0 auto;
......
...@@ -47,7 +47,7 @@ export const OrderActionButtons = { ...@@ -47,7 +47,7 @@ export const OrderActionButtons = {
CONFIRM_RECEIVE: { CONFIRM_RECEIVE: {
text: "确认收货", text: "确认收货",
type: "confirmReceive", type: "confirmReceive",
class: "btn", class: "btn confirm",
handler: "onConfirmReceive", handler: "onConfirmReceive",
}, },
SHOW_EXPRESS: { SHOW_EXPRESS: {
......
...@@ -16,10 +16,8 @@ Component({ ...@@ -16,10 +16,8 @@ Component({
methods: { methods: {
onPreviewImage(e) { onPreviewImage(e) {
this.triggerEvent('previewimage', { let params = e.currentTarget.dataset;
current: e.currentTarget.dataset.current, wx.p.wxApi.previewImage(params);
urls: e.currentTarget.dataset.urls
});
} }
} }
}); });
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
.text-box { .text-box {
padding: 32rpx 24rpx; padding: 32rpx 24rpx;
border-bottom: 2rpx solid #eff0f2;
} }
.text-box .title { .text-box .title {
...@@ -22,25 +21,42 @@ ...@@ -22,25 +21,42 @@
} }
.text-box .item .label { .text-box .item .label {
width: 140rpx; width: auto;
min-width: fit-content;
margin-right: 10rpx;
flex-shrink: 0;
} }
.text-box .item .value { .text-box .item .value {
color: #656566; color: #656566;
width: calc(100% - 150rpx); flex: 1;
} }
.photo-box { .photo-box {
padding: 40rpx 0 28rpx 20rpx; position: relative;
display: flex; padding: 32rpx 24rpx;
flex-wrap: wrap; display: grid;
} /* 自动根据容器宽度决定列数,每列最小 200rpx,最大 1fr */
grid-template-columns: repeat(auto-fill, minmax(200rpx, 1fr));
.photo-box .item { gap: 20rpx;
width: 200rpx; /* 保证最后一行左对齐 */
height: 200rpx; justify-items: start;
background: #d8d8d8; &::before {
margin: 0 20rpx 20rpx 0; content: '';
border-radius: 16rpx; position: absolute;
overflow: hidden; top: 0;
left: 24rpx;
right: 24rpx;
height: 1px;
background-color: #FFEFF0F2;
}
.item {
box-sizing: border-box;
width: 200rpx;
height: 200rpx;
// background: #d8d8d8;
// margin: 0 20rpx 20rpx 0;
border-radius: 8rpx;
overflow: hidden;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
</block> </block>
</view> </view>
</view> </view>
<block wx:if="{{orderInfo.imgUrls && orderInfo.imgUrls.length}}"> <block wx:if="{{orderInfo.imgUrlList && orderInfo.imgUrlList.length}}">
<view class="photo-box"> <view class="photo-box">
<block wx:for="{{orderInfo.imgUrls}}" wx:key="index"> <block wx:for="{{orderInfo.imgUrlList}}" wx:key="index">
<view class="item" bindtap="onPreviewImage" data-current="{{item}}" data-urls="{{orderInfo.imgUrls}}"> <view class="item" bindtap="onPreviewImage" data-current="{{item}}" data-urls="{{orderInfo.imgUrlList}}">
<image webp mode="aspectFill" class="image" src="{{item}}"></image> <image webp mode="aspectFill" class="image" src="{{item}}"></image>
</view> </view>
</block> </block>
......
...@@ -5,4 +5,16 @@ Component({ ...@@ -5,4 +5,16 @@ Component({
value: {}, value: {},
} }
}, },
data:{
bottomDisplay: "none",
},
methods: {
onRendered(e) {
if (e.detail.length) {
this.setData({
bottomDisplay: "block",
});
}
},
},
}) })
\ No newline at end of file \ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<view class="value">{{orderInfo.payDate}}</view> <view class="value">{{orderInfo.payDate}}</view>
</view> </view>
</view> </view>
<view class="order-bottom"> <view class="order-bottom" style="display: {{bottomDisplay}}">
<order-action-buttons order="{{orderInfo}}" /> <order-action-buttons order="{{orderInfo}}" bindonRendered="onRendered"/>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<view class="specification">{{item.specificationData}}</view> <view class="specification">{{item.specificationData}}</view>
</block> </block>
<view class="price"> <view class="price">
{{item.redeemPoints||'--'}}积分 {{item.redeemPoints||'--'}}<text class="unit">积分</text>
</view> </view>
</view> </view>
</view> </view>
......
...@@ -85,8 +85,11 @@ ...@@ -85,8 +85,11 @@
.info-bottom .price { .info-bottom .price {
color: var(--themeColor); color: var(--themeColor);
font-size: 26rpx; font-size: 28rpx;
font-weight: 500; font-weight: 700;
}
.info-bottom .price .unit{
font-weight: 600;
} }
.info-bottom .specification { .info-bottom .specification {
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
font-size: 24rpx; font-size: 24rpx;
margin-left: 12rpx; margin-left: 12rpx;
color: #1B233D; color: #1B233D;
font-weight:500;
} }
.btn-box .pay { .btn-box .pay {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!