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.

82 lines
1.7 KiB

5 years ago
<template>
<view>
<view class="box bg-white">
<view class="item flex justify-between" v-for="(item,index) in msg" :key="index">
<image class="goods-pic" :src="IMAGE_URL+item.picUrls[0]" mode="aspectFill"></image>
<view class="msg-con flex-sub clear flex flex-direction justify-between">
<view class="">
<view class="text-black">快递单号{{item.no}}</view>
<view class="name">{{item.name}}</view>
</view>
<view class="flex justify-end">
<button class="cu-btn line-red round btn" @tap="toDetail(item.data)"></button>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
IMAGE_URL:this.IMAGE_URL,
orderId:0,
msg:[]
};
},
onLoad(options) {
if(options.orderId){
this.orderId = parseInt(options.orderId)
this.getList()
}
},
methods:{
getList(){
this.$u.post('/api/v1/order/express/query', {
userID: uni.getStorageSync("userInfo").id,
orderId: this.orderId
}).then(res => {
console.log(res.data);
if (res.data.code == "FAIL") {
this.$u.toast(res.data.msg);
return
}
this.msg = res.data.data
});
},
toDetail(data){
this.$store.commit('setLogisticsDetail',data);
uni.navigateTo({
url:"../logisticsDetail/logisticsDetail"
})
}
}
}
</script>
<style lang="scss">
.item{
border-bottom: 1rpx solid #f1f1f1;
padding: 20rpx;
&:last-child{
border-bottom: 0;
}
.goods-pic{
width: 180rpx;
height: 180rpx;
margin-right: 20rpx;
border-radius: 10rpx;
}
.name{
font-size: 26rpx;
color: #666666;
margin-top: 10rpx;
}
.btn{
height: 60rpx;
}
}
</style>