emis-sapp/components/buns-locus-pos/buns-locus-pos.vue

82 lines
1.5 KiB
Vue
Raw Normal View History

2023-12-13 17:46:04 +00:00
<template>
2024-05-31 10:42:15 +00:00
<view>
<u-steps direction="column" activeColor="#969799">
<u-steps-item v-for="(item, index) in filDataList"
>
<template v-slot:icon>
<u-image width="60" height="60" :src="getCdnUrl(`${current == index + 1?'post/hwu-check.png':'post/hwu-un.png'}`)"></u-image>
</template>
<template v-slot:title>
<view class="clr-sub pl-20">
{{item.time}}
</view>
</template>
<template v-slot:desc>
<view class="kydec mt-10 pl-20">
{{item.content}}
</view>
</template>
</u-steps-item>
</u-steps>
<tpx-empty v-if="filDataList.length == 0" size="sm"></tpx-empty>
</view>
2023-12-13 17:46:04 +00:00
</template>
<script>
2024-05-31 10:42:15 +00:00
import * as apiService from "@/common/api"
2023-12-13 17:46:04 +00:00
export default {
// computed: {
// filDataList() {
// return []
// },
// },
props: {
list: {
default () {
return []
}
},
2024-05-31 10:42:15 +00:00
billCode: {
default () {
return ''
}
},
2023-12-13 17:46:04 +00:00
current: {
default () {
return 1
}
}
},
data() {
return {
2024-05-31 10:42:15 +00:00
filDataList: this.list
2023-12-13 17:46:04 +00:00
}
},
2024-09-19 04:33:43 +00:00
mounted() {
2024-05-31 10:42:15 +00:00
this.initData()
2023-12-13 17:46:04 +00:00
},
onHide() {
},
2024-01-30 03:09:49 +00:00
unmounted() {},
2023-12-13 17:46:04 +00:00
methods: {
2024-05-31 10:42:15 +00:00
async initData(){
if(this.billCode) {
const res = await apiService.queryWaybillTraceInfo({trackingNo: this.billCode})
this.filDataList = res?.data?.[0]?.steps || []
}
}
2023-12-13 17:46:04 +00:00
}
}
</script>
<style scoped lang="scss">
.kydec{
padding: 20rpx;
background: #F6F6F6;
border-radius: 20rpx;
word-wrap: break-word;
width: 580rpx;
}
</style>