2023-08-09 09:11:05 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
2023-08-09 10:31:02 +08:00
|
|
|
<view style="background-color: #fff;padding: 18rpx 28rpx 0 18rpx;">
|
|
|
|
<u-search placeholder="搜索你的订单" @search="getOrderList" :show-action='false' bg-color='#f5f5f5'
|
|
|
|
v-model="keywords"></u-search>
|
|
|
|
</view>
|
|
|
|
<!-- <view style="margin: 10rpx 0 0 0;"></view> -->
|
|
|
|
<u-sticky bgColor="#fff">
|
2023-08-09 10:43:00 +08:00
|
|
|
<u-tabs :list="list" lineColor='#3274F9' inactiveStyle='color:#666' activeStyle="color:#3274F9" :current="curNow" @change="sectionChange" :scrollable="false"></u-tabs>
|
2023-08-09 09:11:05 +08:00
|
|
|
</u-sticky>
|
|
|
|
<view v-if="!orderlist.length">
|
|
|
|
<u-empty mode="data" icon="../../static/img/empty/data.png">
|
|
|
|
</u-empty>
|
|
|
|
</view>
|
2023-08-09 10:31:02 +08:00
|
|
|
<view v-else style="padding: 28rpx;">
|
2023-08-09 09:11:05 +08:00
|
|
|
<logistiCard v-for='(item,index) in orderlist' @getlist="getOrderList" :goodsInfo="item" :key="index">
|
|
|
|
</logistiCard>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import {
|
|
|
|
getList
|
|
|
|
} from "@/api/logistics.js"
|
|
|
|
import {
|
|
|
|
informationAdd
|
|
|
|
} from "@/api/logistics.js"
|
|
|
|
import logistiCard from "@/components/logistiComptent/logistiCard/logistiCard.vue"
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
logistiCard
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
keywords: "",
|
2023-08-09 10:31:02 +08:00
|
|
|
list: [{name:'待取货'}, {name:'已取货'}, {name:'已送达'}],
|
2023-08-09 09:11:05 +08:00
|
|
|
curNow: 0,
|
|
|
|
orderlist: []
|
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
2023-08-09 10:31:02 +08:00
|
|
|
sectionChange(e) {
|
|
|
|
this.curNow = e.index;
|
2023-08-09 09:11:05 +08:00
|
|
|
this.getOrderList()
|
|
|
|
// console.log(this.curNow)
|
|
|
|
},
|
|
|
|
|
|
|
|
getOrderList() {
|
|
|
|
// console.log(9999)
|
|
|
|
// return
|
|
|
|
let id = JSON.parse(uni.getStorageSync('USER_INFO')).id
|
|
|
|
getList({
|
|
|
|
status: this.curNow,
|
|
|
|
// courier_id: id,
|
|
|
|
courier_id: id,
|
|
|
|
keywords: this.keywords
|
|
|
|
}).then(res => {
|
|
|
|
this.orderlist = res.data.data
|
|
|
|
console.log(this.orderlist)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
onShow() {
|
|
|
|
// this.curNow = 1
|
|
|
|
this.getOrderList()
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss'>
|
|
|
|
</style>
|