|
|
@@ -1,4 +1,5 @@
|
|
|
<script>
|
|
|
+import {getPointOrderInfo} from '@/api/pointOrder'
|
|
|
export default {
|
|
|
name: "orderDetails",
|
|
|
data() {
|
|
|
@@ -42,9 +43,8 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
onLoad(options) {
|
|
|
- // 获取页面参数
|
|
|
- console.log('页面参数:', options);
|
|
|
- // 这里可以根据订单ID获取订单详情
|
|
|
+ this.orderNo = options.orderNo;
|
|
|
+ this.getOrderInfo();
|
|
|
},
|
|
|
onReady() {
|
|
|
// 初始获取数据
|
|
|
@@ -58,6 +58,17 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ //获取订单详情
|
|
|
+ async getOrderInfo() {
|
|
|
+ const res = await getPointOrderInfo({
|
|
|
+ orderNo: this.orderNo,
|
|
|
+ openId: uni.getStorageSync('wx_copenid')
|
|
|
+ })
|
|
|
+ this.orderInfo = res.data.data;
|
|
|
+ },
|
|
|
+ orderTitle(info){
|
|
|
+ return info.orderStatusName || '--'
|
|
|
+ },
|
|
|
// 处理退货操作
|
|
|
handleRefund() {
|
|
|
this.title = '确认收货';
|
|
|
@@ -102,18 +113,19 @@ export default {
|
|
|
<view class="order-details">
|
|
|
<!-- 顶部标题 -->
|
|
|
<view class="header">
|
|
|
- <text class="header-title">{{ orderInfo.statusText }}</text>
|
|
|
+ <text class="header-title">{{ orderTitle(orderInfo) }}</text>
|
|
|
</view>
|
|
|
-
|
|
|
<!-- 商品信息 -->
|
|
|
<view class="product-info">
|
|
|
- <view class="product-image">
|
|
|
- <image :src="orderInfo.product.image" mode="aspectFill"></image>
|
|
|
- </view>
|
|
|
+<!-- <view class="product-image">-->
|
|
|
+<!-- <image :src="orderInfo.image" mode="aspectFill"></image>-->
|
|
|
+<!-- </view>-->
|
|
|
<view class="product-details">
|
|
|
- <text class="product-name">{{ orderInfo.product.name }}</text>
|
|
|
- <text class="product-spec">已选 {{ orderInfo.product.spec }}</text>
|
|
|
- <text class="product-price">¥{{ orderInfo.product.price }}+{{ orderInfo.product.points }}积分</text>
|
|
|
+ <text class="product-name">{{ orderInfo.name }}</text>
|
|
|
+ <text class="product-spec">已选 {{ orderInfo.spec }}</text>
|
|
|
+ <text class="product-price" v-if="orderInfo.paymentType == 1">{{ orderInfo.pointsUsed }}积分</text>
|
|
|
+ <text class="product-price" v-if="orderInfo.paymentType == 2">¥{{ orderInfo.totalAmount }}</text>
|
|
|
+ <text class="product-price" v-if="orderInfo.paymentType == 3">¥{{ orderInfo.totalAmount }}+{{ orderInfo.pointsUsed }}积分</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -121,38 +133,46 @@ export default {
|
|
|
<view class="order-info">
|
|
|
<view class="info-item">
|
|
|
<text class="info-label">下单时间</text>
|
|
|
- <text class="info-value">{{ orderInfo.orderTime }}</text>
|
|
|
+ <text class="info-value">{{ orderInfo.createTime || '--' }}</text>
|
|
|
</view>
|
|
|
<view class="info-item">
|
|
|
<text class="info-label">发货时间</text>
|
|
|
- <text class="info-value">{{ orderInfo.shipTime }}</text>
|
|
|
+ <text class="info-value">{{ orderInfo.deliveryTime || '--' }}</text>
|
|
|
</view>
|
|
|
<view class="info-item">
|
|
|
<text class="info-label">订单号</text>
|
|
|
- <text class="info-value">{{ orderInfo.orderNo }}</text>
|
|
|
+ <text class="info-value">{{ orderInfo.orderNo || '--' }}</text>
|
|
|
</view>
|
|
|
<view class="info-item">
|
|
|
<text class="info-label">物流单号</text>
|
|
|
- <text class="info-value">{{ orderInfo.logisticsNo }}</text>
|
|
|
+ <text class="info-value">{{ orderInfo.logisticsNo || '--' }}</text>
|
|
|
</view>
|
|
|
<view class="info-item">
|
|
|
- <text class="info-label">收货信息</text>
|
|
|
- <text class="info-value">{{ orderInfo.recipient.name }}, {{ orderInfo.recipient.phone }}, {{ orderInfo.recipient.address }}</text>
|
|
|
+ <text class="info-label">收件人</text>
|
|
|
+ <text class="info-value">{{ orderInfo.receiverName || '--' }}</text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <!-- 退货信息 -->
|
|
|
- <view class="refund-info">
|
|
|
<view class="info-item">
|
|
|
- <text class="info-label">退货原因</text>
|
|
|
- <text class="info-value">{{ orderInfo.refund.reason }}</text>
|
|
|
+ <text class="info-label">联系电话</text>
|
|
|
+ <text class="info-value">{{ orderInfo.receiverPhone || '--' }}</text>
|
|
|
</view>
|
|
|
<view class="info-item">
|
|
|
- <text class="info-label">申请时间</text>
|
|
|
- <text class="info-value">{{ orderInfo.refund.applyTime }}</text>
|
|
|
+ <text class="info-label">收件地址</text>
|
|
|
+ <text class="info-value">{{ orderInfo.addressName || '--' }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
+ <!-- 退货信息 -->
|
|
|
+<!-- <view class="refund-info">-->
|
|
|
+<!-- <view class="info-item">-->
|
|
|
+<!-- <text class="info-label">退货原因</text>-->
|
|
|
+<!-- <text class="info-value">{{ orderInfo.refund.reason }}</text>-->
|
|
|
+<!-- </view>-->
|
|
|
+<!-- <view class="info-item">-->
|
|
|
+<!-- <text class="info-label">申请时间</text>-->
|
|
|
+<!-- <text class="info-value">{{ orderInfo.refund.applyTime }}</text>-->
|
|
|
+<!-- </view>-->
|
|
|
+<!-- </view>-->
|
|
|
+
|
|
|
<!-- 操作按钮 -->
|
|
|
<view class="action-buttons" :class="{ 'safe-area': hasSafeArea }">
|
|
|
<button class="detail-button" @click="handleAfterSales">退款\售后</button>
|
|
|
@@ -238,21 +258,21 @@ export default {
|
|
|
</view>
|
|
|
|
|
|
<!-- 商品选择 -->
|
|
|
- <view class="popup-section">
|
|
|
- <text class="section-title">
|
|
|
- 请选择商品
|
|
|
- <text v-if="receiptStatus === 'received'" class="time-limit">(2026-4-1 24时之前可申请)</text>
|
|
|
- </text>
|
|
|
- <view class="product-item">
|
|
|
- <view class="product-image">
|
|
|
- <image :src="orderInfo.product.image" mode="aspectFill"></image>
|
|
|
- </view>
|
|
|
- <view class="product-details">
|
|
|
- <text class="product-name">{{ orderInfo.product.name }}</text>
|
|
|
- <text class="product-spec">已选: {{ orderInfo.product.spec }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+<!-- <view class="popup-section">-->
|
|
|
+<!-- <text class="section-title">-->
|
|
|
+<!-- 请选择商品-->
|
|
|
+<!-- <text v-if="receiptStatus === 'received'" class="time-limit">(2026-4-1 24时之前可申请)</text>-->
|
|
|
+<!-- </text>-->
|
|
|
+<!-- <view class="product-item">-->
|
|
|
+<!-- <view class="product-image">-->
|
|
|
+<!-- <image :src="orderInfo.product.image" mode="aspectFill"></image>-->
|
|
|
+<!-- </view>-->
|
|
|
+<!-- <view class="product-details">-->
|
|
|
+<!-- <text class="product-name">{{ orderInfo.product.name }}</text>-->
|
|
|
+<!-- <text class="product-spec">已选: {{ orderInfo.product.spec }}</text>-->
|
|
|
+<!-- </view>-->
|
|
|
+<!-- </view>-->
|
|
|
+<!-- </view>-->
|
|
|
|
|
|
<!-- 下一步按钮 -->
|
|
|
<view class="popup-footer">
|
|
|
@@ -406,7 +426,7 @@ export default {
|
|
|
flex: 1;
|
|
|
font-family: PingFang SC, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
- font-size: 28rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
color: #2F3437;
|
|
|
text-align: right;
|
|
|
}
|