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-app/pages/order/detail/components/LogisitcsInfo.vue

96 lines
2.0 KiB

3 years ago
<!--
* @Author: ch
* @Date: 2022-04-15 16:36:02
* @LastEditors: ch
* @LastEditTime: 2022-04-22 21:10:56
3 years ago
* @Description: file content
-->
<template>
<UiWhiteBox>
<u-cell class="address" isLink v-if="lastLogisitcs"
@click="$Router.push(`/logisitcsInfo?orderId=${orderId}`)">
<view slot="title" class="address--title">{{lastLogisitcs.context}}</view>
<image class="address--icon" slot="icon" src="@/static/order/fj.png" />
<view slot="label" class="address--label">
<text>{{lastLogisitcs.time}}</text>
</view>
</u-cell>
<u-cell class="address" :border="false">
<view slot="title" :class="lastLogisitcs ? 'address--title__grey' :''">
{{logisitcsInfo.recipientAddress}}
</view>
<image class="address--icon" slot="icon" v-if="lastLogisitcs" src="@/static/order/dw2.png" />
<image class="address--icon" slot="icon" v-else src="@/static/order/dw.png" />
<view slot="label" class="address--label">
<text>{{logisitcsInfo.recipientName}}</text>
<text>{{logisitcsInfo.recipientPhone}}</text>
</view>
3 years ago
</u-cell>
</UiWhiteBox>
</template>
<script>
import UiWhiteBox from '@/components/UiWhiteBox.vue';
export default {
components : {UiWhiteBox},
props: {
logisitcsInfo : {
type : Object,
defalut : () => ({})
},
orderId: {
type : Number | null,
defalut : null
3 years ago
}
},
computed : {
lastLogisitcs (){
const list = this.logisitcsInfo && this.logisitcsInfo.logisticsDataList
if(list && list.length > 0){
return list[0]
}else{
return null
}
}
3 years ago
}
}
</script>
<style lang="scss" scoped>
.address{
&--title{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 500rpx;
&__grey{
color: $color-grey4;
}
}
&--icon{
width: 28rpx;
height: 34rpx;
margin-right: 30rpx;
}
&--label{
margin-top: 26rpx;
text{
color: $color-grey4;
margin-right: 40rpx;
}
}
3 years ago
}
/deep/{
.u-cell__body__content{
padding: 10rpx 0;
}
.u-cell__title{
font-weight: bold;
line-height: 36rpx;
}
.address--label{
font-weight: normal;
}
}
3 years ago
</style>