This commit is contained in:
weipengfei 2023-09-11 14:21:57 +08:00
commit 2f845460b3
2 changed files with 45 additions and 38 deletions

View File

@ -95,6 +95,9 @@
}).then(res => {
this.orderlist = []
this.orderlist = res.data.data
if (this.orderlist.length < 15) {
this.status = 'nomore'
}
})
}
@ -122,6 +125,7 @@
this.getOrderList()
},
onReachBottom() {
if (this.flag) return
this.status = "loading"
@ -143,6 +147,7 @@
})
},
}
</script>

View File

@ -348,43 +348,7 @@
},
onLoad() {
let type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
this.company_type = type
//
if (type == 18) {
// getvehicleDetailApi().then(res => {})
villageCompanyApi().then(res => {
this.showLoading = false
this.datas = res.data
this.step = res.data?.status || 9999
switch (this.step) {
case 3:
uni.redirectTo({
url: `/subpkg/property/vehicle_a?id=${res.data.cars_info.id}`
})
// this.step =
break;
default:
break;
}
})
}
//
else {
getvehicleListApi().then(res => {
this.datas = res.data
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList = res
.data.apply.slice(0, 2)
// this.applicationList = res.data.apply
this.dataList = res.data.car_list
this.showLoading = false
})
// getAgencyListApi().then(res => {
// this.applicationList = res.data
// })
}
// if (true) {
// uni.navigateTo({
// url: '/subpkg/property/vehicle_a'
@ -398,18 +362,56 @@
// // this.applicationList=res
// })
this.initIndex()
setTimeout(() => {
this.flag = true
})
},
onPullDownRefresh() {
this.initIndex()
//
// setTimeout(() => {
// const newList = this.hostProduct.reverse();
// this.hostProduct = newList;
uni.stopPullDownRefresh();
// }, 500)
},
methods: {
//
initIndex() {
let type = (JSON.parse(Cache.get("USER_INFO")).company.company_type)
this.company_type = type
//
if (type == 18) {
villageCompanyApi().then(res => {
this.showLoading = false
this.datas = res.data
this.step = res.data?.status || 9999
if (this.step == 3) {
uni.redirectTo({
url: `/subpkg/property/vehicle_a?id=${res.data.cars_info.id}`
})
}
})
}
//
else {
getvehicleListApi().then(res => {
this.datas = res.data
res.data.apply.length >= 2 ? this.applicationList = res.data.apply : this.applicationList =
res
.data.apply.slice(0, 2)
this.dataList = res.data.car_list
this.showLoading = false
})
}
},
async afterReadAvatar(event) {
upLoadImage({
filePath: event.file.url,
}).then(res => {
this.imgUrl = res.data.uri
// this.formData.avatar = res.data.uri