feat: harden phase one workflows
This commit is contained in:
@@ -1,29 +1,34 @@
|
||||
<view class="page" wx:if="{{order}}">
|
||||
<view class="card">
|
||||
<view class="section-title">{{order.orderNo}}</view>
|
||||
<view class="summary-card">
|
||||
<view>
|
||||
<view class="muted">订单编号</view>
|
||||
<view class="summary-title">{{order.orderNo}}</view>
|
||||
<view class="muted">类型:{{type}}</view>
|
||||
</view>
|
||||
<view class="tag">{{order.statusText}}</view>
|
||||
<view class="muted">类型:{{type}}</view>
|
||||
</view>
|
||||
<view class="card">
|
||||
|
||||
<view class="detail-card">
|
||||
<view wx:if="{{type === 'goods'}}">
|
||||
<view>商品金额:{{order.totalAmountText}}</view>
|
||||
<view>配送费:{{order.deliveryFeeText}}</view>
|
||||
<view class="price">应收:{{order.payableAmountText}}</view>
|
||||
<view class="detail-line"><text>商品金额</text><text>{{order.totalAmountText}}</text></view>
|
||||
<view class="detail-line"><text>配送费</text><text>{{order.deliveryFeeText}}</text></view>
|
||||
<view class="detail-line total"><text>应收</text><text class="price">{{order.payableAmountText}}</text></view>
|
||||
<view class="muted">{{order.deliveryMethod}}</view>
|
||||
</view>
|
||||
<view wx:if="{{type === 'express'}}">
|
||||
<view>{{order.expressCompany}} / {{order.pickupCode}}</view>
|
||||
<view class="muted">{{order.pickupAddress}}</view>
|
||||
<view class="price">服务费:{{order.feeText}}</view>
|
||||
<view class="detail-line"><text>快递信息</text><text>{{order.expressCompany}} / {{order.pickupCode}}</text></view>
|
||||
<view class="detail-line"><text>取件地址</text><text>{{order.pickupAddress}}</text></view>
|
||||
<view class="detail-line total"><text>服务费</text><text class="price">{{order.feeText}}</text></view>
|
||||
</view>
|
||||
<view wx:if="{{type === 'group'}}">
|
||||
<view>{{order.groupBuyTitle}}</view>
|
||||
<view>数量:{{order.quantity}}</view>
|
||||
<view class="price">金额:{{order.amountText}}</view>
|
||||
<view class="detail-line"><text>团购商品</text><text>{{order.groupBuyTitle}}</text></view>
|
||||
<view class="detail-line"><text>数量</text><text>{{order.quantity}}</text></view>
|
||||
<view class="detail-line total"><text>金额</text><text class="price">{{order.amountText}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="button-row">
|
||||
<button class="ghost" bindtap="cancel">取消订单</button>
|
||||
<button wx:if="{{type === 'express'}}" class="primary" bindtap="completeExpress">确认完成</button>
|
||||
<button class="ghost action-button" bindtap="cancel">取消订单</button>
|
||||
<button wx:if="{{type === 'express'}}" class="primary action-button" bindtap="completeExpress">确认完成</button>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -1,3 +1,58 @@
|
||||
.summary-card {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
gap: 18rpx;
|
||||
padding: 28rpx;
|
||||
margin-bottom: 18rpx;
|
||||
color: #ffffff;
|
||||
background: #33536f;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.summary-card .muted {
|
||||
color: rgba(255, 255, 255, 0.76);
|
||||
}
|
||||
|
||||
.summary-title {
|
||||
margin: 10rpx 0;
|
||||
font-size: 36rpx;
|
||||
font-weight: 900;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.detail-card {
|
||||
padding: 24rpx;
|
||||
margin-bottom: 20rpx;
|
||||
background: #ffffff;
|
||||
border: 1rpx solid #e4eaf0;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(20, 36, 58, 0.05);
|
||||
}
|
||||
|
||||
.detail-line {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 24rpx;
|
||||
padding: 18rpx 0;
|
||||
color: #334155;
|
||||
border-bottom: 1rpx solid #edf1f5;
|
||||
}
|
||||
|
||||
.detail-line text:first-child {
|
||||
flex-shrink: 0;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.detail-line text:last-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.detail-line.total {
|
||||
border-bottom: none;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.button-row button {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
@@ -1,17 +1,25 @@
|
||||
<view class="page">
|
||||
<view class="section-title">我的订单</view>
|
||||
<view wx:for="{{orders}}" wx:key="id" class="card" bindtap="goDetail" data-type="{{item.type}}" data-id="{{item.id}}">
|
||||
<view class="row between">
|
||||
<view>
|
||||
<view>{{item.title}}</view>
|
||||
<view class="muted">{{item.typeText}} {{item.orderNo}}</view>
|
||||
<view class="page-heading">
|
||||
<view class="heading-eyebrow">履约进度</view>
|
||||
<view class="heading-title">我的订单</view>
|
||||
<view class="heading-subtitle">查看商品、快递和团购订单</view>
|
||||
</view>
|
||||
|
||||
<view class="order-list">
|
||||
<view wx:for="{{orders}}" wx:key="id" class="order-card" bindtap="goDetail" data-type="{{item.type}}" data-id="{{item.id}}">
|
||||
<view class="row between order-head">
|
||||
<view class="order-title-wrap">
|
||||
<view class="card-title">{{item.title}}</view>
|
||||
<view class="order-meta">{{item.typeText}} {{item.orderNo}}</view>
|
||||
</view>
|
||||
<view class="tag">{{item.statusText}}</view>
|
||||
</view>
|
||||
<view class="order-footer row between">
|
||||
<view class="muted">状态:{{item.statusText}}</view>
|
||||
<view class="price">{{item.amountText}}</view>
|
||||
</view>
|
||||
<view class="tag">{{item.statusText}}</view>
|
||||
</view>
|
||||
<view class="row between">
|
||||
<view class="muted">状态:{{item.statusText}}</view>
|
||||
<view class="price">{{item.amountText}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{!orders.length && !loading}}" class="card muted">暂无订单</view>
|
||||
|
||||
<view wx:if="{{!orders.length && !loading}}" class="empty-state">暂无订单</view>
|
||||
</view>
|
||||
|
||||
@@ -1,3 +1,42 @@
|
||||
.page-heading {
|
||||
margin-bottom: 22rpx;
|
||||
}
|
||||
|
||||
.order-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18rpx;
|
||||
}
|
||||
|
||||
.order-card {
|
||||
padding: 24rpx;
|
||||
background: #ffffff;
|
||||
border: 1rpx solid #e4eaf0;
|
||||
border-radius: 16rpx;
|
||||
box-shadow: 0 8rpx 24rpx rgba(20, 36, 58, 0.05);
|
||||
}
|
||||
|
||||
.order-head {
|
||||
align-items: flex-start;
|
||||
gap: 18rpx;
|
||||
}
|
||||
|
||||
.order-title-wrap {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.order-meta {
|
||||
margin-top: 8rpx;
|
||||
color: #64748b;
|
||||
font-size: 23rpx;
|
||||
}
|
||||
|
||||
.order-footer {
|
||||
margin-top: 20rpx;
|
||||
padding-top: 18rpx;
|
||||
border-top: 1rpx solid #edf1f5;
|
||||
}
|
||||
|
||||
.tag {
|
||||
min-width: 120rpx;
|
||||
text-align: center;
|
||||
|
||||
Reference in New Issue
Block a user