Commit 5f61da20 by liimin

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

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