|
|
|
@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<view> |
|
|
|
<lf-nav title="订单详情" :showIcon="true"></lf-nav> |
|
|
|
<view class="tips"> |
|
|
|
<view class="tips" v-if="type == 'default'"> |
|
|
|
<view class="lf-font-24 lf-color-white">剩余支付时间:</view> |
|
|
|
<view> |
|
|
|
<countdown-timer :time="time" :autoStart="true" @finish="dateFinish"> |
|
|
|
@ -27,29 +27,29 @@ |
|
|
|
查看详情 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="card" v-if="type == 'default'" style="margin-top: 0;"> |
|
|
|
<view class="card" style="margin-top: 0;"> |
|
|
|
<view class="lf-font-28"> |
|
|
|
<text class="lf-color-222 lf-font-bold">王小二</text> |
|
|
|
<text class="lf-color-777 lf-m-l-20">18284385380</text> |
|
|
|
<text class="lf-color-222 lf-font-bold">{{order_details.accept_name}}</text> |
|
|
|
<text class="lf-color-777 lf-m-l-20">{{order_details.mobile}}</text> |
|
|
|
</view> |
|
|
|
<view class="lf-font-28 lf-color-333 lf-m-t-20"> |
|
|
|
<text>广西壮族自治区-南宁市-青秀区-民族大道民族大道民族大道民族大道民族大道民族大道15号</text> |
|
|
|
<text>{{order_details.address_name}}{{order_details.address}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="card goods"> |
|
|
|
<view> |
|
|
|
<text class="lf-iconfont icon-Group- lf-font-30"></text> |
|
|
|
<text class="shop-name">精品超市</text> |
|
|
|
<text class="shop-name">{{order_details.from}}</text> |
|
|
|
<text class="lf-iconfont icon-xiangyou lf-font-24"></text> |
|
|
|
</view> |
|
|
|
<view class="lf-flex lf-m-t-20"> |
|
|
|
<image class="goods-img"></image> |
|
|
|
<view class="lf-flex lf-m-t-20" v-for="(item,index) of order_details.items" :key="index"> |
|
|
|
<image class="goods-img" :src="item.item_meta.image"></image> |
|
|
|
<view class="info"> |
|
|
|
<view class="lf-font-26 lf-color-333 lf-line-1">爱他美较大婴儿配方奶粉较大配方奶粉较2段 </view> |
|
|
|
<view class="lf-font-24 lf-color-777">500g</view> |
|
|
|
<view class="lf-font-26 lf-color-333 lf-line-1">{{item.item_name}}</view> |
|
|
|
<view class="lf-font-24 lf-color-777">{{item.item_meta.specs_text}}</view> |
|
|
|
<view class="lf-row-between" style="line-height: 1;"> |
|
|
|
<text class="price">¥385</text> |
|
|
|
<text class="lf-font-28 lf-color-777">x 2</text> |
|
|
|
<text class="price">¥{{item.total_yuan}}</text> |
|
|
|
<text class="lf-font-28 lf-color-777">x {{item.quantity}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
@ -57,7 +57,15 @@ |
|
|
|
<view class="card" v-if="type == 'point'"> |
|
|
|
<view class="lf-row-between lf-font-28"> |
|
|
|
<text class="lf-color-777">积分数量</text> |
|
|
|
<text class="lf-color-222">385</text> |
|
|
|
<text class="lf-color-222">{{order_details.redeem_point}}</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-m-t-30 lf-font-28"> |
|
|
|
<text class="lf-color-777">应付运费</text> |
|
|
|
<text class="lf-color-222">+¥{{order_details.payable_freight}}</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-m-t-30 lf-font-28"> |
|
|
|
<text class="lf-color-777">实付运费</text> |
|
|
|
<text class="lf-color-222">+¥{{order_details.real_freight}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="card" v-if="type == 'default'"> |
|
|
|
@ -71,50 +79,50 @@ |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-m-t-30 lf-font-28"> |
|
|
|
<text class="lf-color-777">订单总价</text> |
|
|
|
<text class="lf-color-222">¥375</text> |
|
|
|
<text class="lf-color-222">¥{{order_details.total_yuan}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="card"> |
|
|
|
<view class="lf-row-between lf-font-28"> |
|
|
|
<text class="lf-color-777">商品订单编号</text> |
|
|
|
<text> |
|
|
|
<text class="lf-color-222">75894375395739345</text> |
|
|
|
<text class="lf-font-28 lf-m-l-20" style="color: #22A19F;">复制</text> |
|
|
|
<text class="lf-color-222">{{order_details.order_no}}</text> |
|
|
|
<text class="lf-font-28 lf-m-l-20" style="color: #22A19F;" @click="copy(order_details.order_no)">复制</text> |
|
|
|
</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<text class="lf-color-777">订单编号</text> |
|
|
|
<text class="lf-color-222">75894375395739345</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<text class="lf-color-777">创建时间</text> |
|
|
|
<text class="lf-color-222">2021-09-07 10:21:38</text> |
|
|
|
<text class="lf-color-222">{{order_details.created_at}}</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<!-- <view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<text class="lf-color-777">留言</text> |
|
|
|
<text class="lf-color-222">暂无留言</text> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30" v-if="type == 'point'"> |
|
|
|
<text class="lf-color-777">兑换状态</text> |
|
|
|
<text class="lf-color-222">兑换成功</text> |
|
|
|
<text class="lf-color-777">订单状态</text> |
|
|
|
<text class="lf-color-222">{{order_details.status_text}}</text> |
|
|
|
</view> |
|
|
|
<!-- 待发货 --> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<text class="lf-color-777">支付方式</text> |
|
|
|
<text class="lf-color-222">余额支付</text> |
|
|
|
<text class="lf-color-222">{{order_details.payment_text}}</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30" v-if="type == 'point'"> |
|
|
|
<text class="lf-color-777">收货方式</text> |
|
|
|
<text class="lf-color-222">邮寄</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30" v-else> |
|
|
|
<text class="lf-color-777">收货方式</text> |
|
|
|
<text class="lf-color-222">自提</text> |
|
|
|
</view> |
|
|
|
<view class="lf-row-between lf-font-28 lf-m-t-30"> |
|
|
|
<text class="lf-color-777">支付时间</text> |
|
|
|
<text class="lf-color-222">2021-09-07 10:21:38</text> |
|
|
|
<text class="lf-color-222">{{order_details.pay_time}}</text> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view style="height: 120rpx;margin-top: 20rpx;"></view> |
|
|
|
<!-- 待付款 --> |
|
|
|
<view class="order-btn"> |
|
|
|
<!-- <view class="order-btn"> |
|
|
|
<view class="lf-font-28 lf-row-center" style="color:#F63434"> |
|
|
|
待付款 |
|
|
|
</view> |
|
|
|
@ -126,9 +134,9 @@ |
|
|
|
立即付款 |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<!-- 待发货 --> |
|
|
|
<view class="order-btn"> |
|
|
|
<view class="order-btn" v-if="order_details.status == 2"> |
|
|
|
<view class="lf-font-28 lf-row-center lf-color-777"> |
|
|
|
待发货 |
|
|
|
</view> |
|
|
|
@ -138,7 +146,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 待收货 --> |
|
|
|
<view class="order-btn"> |
|
|
|
<view class="order-btn" v-if="order_details.status == 3"> |
|
|
|
<view class="lf-font-28 lf-row-center lf-color-black"> |
|
|
|
待收货 |
|
|
|
</view> |
|
|
|
@ -150,7 +158,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 已完成 --> |
|
|
|
<view class="order-btn"> |
|
|
|
<view class="order-btn" v-if="order_details.status == 4"> |
|
|
|
<view class="lf-font-28 lf-row-center" style="color: #22A19F;"> |
|
|
|
已完成 |
|
|
|
</view> |
|
|
|
@ -168,7 +176,9 @@ |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
type: 'default' ,// point积分订单详情, default默认普通商品订单详情 |
|
|
|
time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime() |
|
|
|
time: new Date('2021/09/8 14:15:00').getTime() - new Date('2021/09/8 14:10:00').getTime(), |
|
|
|
order_no: '', |
|
|
|
order_details: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
@ -176,11 +186,32 @@ |
|
|
|
}, |
|
|
|
onLoad(options){ |
|
|
|
this.type = options.type || this.type; |
|
|
|
this.order_no = options.order_id; |
|
|
|
if(this.order_no) { |
|
|
|
this.getOrderDetails(); |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 点击复制 |
|
|
|
copy(text) { |
|
|
|
uni.setClipboardData({ |
|
|
|
data: text |
|
|
|
}); |
|
|
|
}, |
|
|
|
dateFinish(){ |
|
|
|
console.log("倒计时结束"); |
|
|
|
}, |
|
|
|
getOrderDetails() { |
|
|
|
this.$http.get({ |
|
|
|
api: 'api/order/'+this.order_no, |
|
|
|
header: { |
|
|
|
Authorization: `Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjVkYTY5YjM5NWFhYzM5NzVmMzI3ZTEwZDEyMzAzZjI5MzE4ZmU2OGE2Njg0MTU0MWVjMjQ2NWM4ZWJkYjRlMTUwMmY1NWM0NDlkOTcxZDdjIn0.eyJhdWQiOiIzIiwianRpIjoiNWRhNjliMzk1YWFjMzk3NWYzMjdlMTBkMTIzMDNmMjkzMThmZTY4YTY2ODQxNTQxZWMyNDY1YzhlYmRiNGUxNTAyZjU1YzQ0OWQ5NzFkN2MiLCJpYXQiOjE2MzIzODY3NDAsIm5iZiI6MTYzMjM4Njc0MCwiZXhwIjoxNjYzOTIyNzQwLCJzdWIiOiIxIiwic2NvcGVzIjpbXX0.am-szF_sZcjtyOnEJT1DHMnr1hjAZ90MJc1Pc3AD3FrcQU5xb-u43ddL70ZmM3OxxLTZlmrB8OA3XJYREMtcz26MzwOMfopB9A5AH1EjHiFCV_368cq4ZpXNFi_Sn_LrY9Wje0-WMvkznF8tbrdCNrZn5YyIV47cwEnUNQrrREX4OhcgrSfNvwnh8_O_fueBwws9yY3tTlvVB7-AvG2urFI5XCzygsE3llE0wxF5ZJO1T5QRYLDse2BQ3d9feFzO5_7FiVspKr8DrJUlZP-Zz02UgIDIA_PX0UO2M0KeBwqPYq2d5uEnXT8or7K9coSnHRqbbr4qn6iczxDu4ofM58oCcaPycbtI3RvP2SMZuWmX8fXw-T99XltK_uJEU_wlIkrjvabzyo3tkrxRrwmzJEb3Yf4Lbah_xtfi24Nsu9SRjdw8YoiF6YhuuU5YaOn-wLltgmugfYpkFpEOneVAxoMjkm5IxZAJYMXF-DeSpdOoiTmuIRZYX4GDa55s_31r0YMyF6IIQNUvOjHHk-sJSHG0kPd5QivLP7dxE5XndwyFKAOeM97X2TjdYMhJz0EBCyS4Y_pI6AFWsxJkKsa0aqvBAeJyOV9k8kbYwtPeeBhBNsDWSlGBEZYMcoAv-C-IBZzd7gu2Ceh_MJPItrnsvj8W43Cv1TwxD26bJyt9EUY` |
|
|
|
} |
|
|
|
}).then(res => { |
|
|
|
this.order_details = res.data.data |
|
|
|
console.log(this.order_details); |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|