Commit 28534a2a by liimin

refactor(订单组件): 优化布局样式和组件交互逻辑

移除冗余的 isFullScreen 类名,统一使用 layout 类
调整 Bottom 组件高度和边距样式
添加 OrderActionButtons 渲染完成事件回调
动态设置 Bottom 组件底部边距
1 parent 19b0ffbe
<block wx:if="{{orderInfo}}">
<view class="layout isFullSucreen">
<view class="layout">
<!-- 退款状态组件 -->
<refund-status wx:if="{{status.detail}}" status="{{status.detail}}"></refund-status>
<!-- 退货地址和物流信息组件 -->
......
<view class="layout isFullSucreen">
<view class="layout">
<!-- <view class="title">售后类型</view> -->
<!-- <view class="type text-center"> -->
<afterSale_step_one bindreturnType="changeReturnType"/>
......
......@@ -17,6 +17,11 @@ Component({
* 组件的方法列表
*/
methods: {
onRendered(e) {
this.setData({
marginBottom: e.detail.length ? '16rpx' : 0
})
},
// compute(item) {
// let { applyQty, sellQty, redeemPoints, freightAmount = 0 } = item;
// const total = sellQty || applyQty || 0;
......
<view class="bottom">
<view class="bottom" style="margin-bottom:{{marginBottom}}">
<view class="total">
共{{item.___qty}}件,实付款
<text class="price">{{item.___totalPrice||'--'}}积分</text>
</view>
<order-action-buttons order="{{item}}" has-user-info="{{hasUserInfo}}" />
<order-action-buttons order="{{item}}" has-user-info="{{hasUserInfo}}" bindonRendered="onRendered" />
</view>
\ No newline at end of file
.bottom {
margin-top: 36rpx;
height: 64rpx;
height: 60rpx;
display: flex;
align-items: flex-start;
font-size: 24rpx;
color: #656566;
justify-content: space-between;
margin-bottom: 16rpx;
margin-right: 16rpx;
}
......
......@@ -53,6 +53,8 @@ Component({
// goodsSource ==null 默认云中鹤
this.setData({
buttons: orderButtons||[],
},()=>{
this.triggerEvent('onRendered',this.data.buttons)
});
},
......
......@@ -22,7 +22,7 @@
</view>
</view>
<block wx:if="{{margin_top}}">
<view class="layout isFullSucreen" style="margin-top:{{margin_top}}px;">
<view class="layout" style="margin-top:{{margin_top}}px;">
<block wx:if="{{listFlag}}">
<block wx:if="{{list.length}}">
<block wx:for="{{list}}" wx:key="index">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!