Commit 28534a2a by liimin

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

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