You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-pc/pages/account/index/order/detail/index.vue

76 lines
1.7 KiB

<!--
* @Author: ch
* @Date: 2022-05-08 01:14:03
* @LastEditors: ch
3 years ago
* @LastEditTime: 2022-05-27 15:37:30
* @Description: file content
-->
<template>
3 years ago
<div>
<div class="box">
3 years ago
<StatusInfo :orderInfo="orderInfo" @changeStatus="getOrderInfo"/>
3 years ago
<StatusStep :orderInfo="orderInfo" />
</div>
<LogisitcsInfo v-if="orderInfo.orderType !== ORDER_TYPE.VIRTUAL" :orderInfo="orderInfo" />
3 years ago
<div class="pay-type" v-if="orderInfo.payType !== 1">
<p>支付方式{{orderInfo.payTypeDesc}}</p>
3 years ago
<p>支付时间{{orderInfo.payTime}}</p>
3 years ago
</div>
<GoodsInfo :orderInfo="orderInfo"/>
</div>
</template>
<script>
import {ApiGetOrderDetail} from '@/plugins/api/order';
import {ORDER_TYPE} from '@/plugins/dicts/order';
3 years ago
import StatusInfo from './module/StatusInfo.vue';
import StatusStep from './module/StatusStep.vue';
import LogisitcsInfo from './module/LogisitcsInfo.vue';
import GoodsInfo from './module/GoodsInfo.vue';
export default {
components: { StatusInfo, StatusStep, LogisitcsInfo, GoodsInfo },
data(){
return {
ORDER_TYPE,
3 years ago
orderInfo : {
orderType : ORDER_TYPE.VIRTUAL
}
3 years ago
}
},
mounted(){
this.getOrderInfo();
},
methods:{
/**
* 获取订单最新信息
*/
async getOrderInfo(){
const {error, result} = await ApiGetOrderDetail(this.$route.query.id);
if(error){
this.$message.warning(error.message);
return false;
}
this.orderInfo = {...result};
},
}
}
</script>
<style lang="scss" scoped>
.box{
min-width: 1000px;
3 years ago
border: 1px solid #ddd;
border-radius: 4px;
display: flex;
margin: 0 0 30px 0;
3 years ago
}
.pay-type{
margin: 30px 0;
3 years ago
border: 1px solid #ddd;
background: #f8f8f8;
height: 59px;
line-height: 59px;
padding: 0 30px;
display: flex;
justify-content: space-between;
}
</style>