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

View File

@ -348,43 +348,7 @@
}, },
onLoad() { 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) { // if (true) {
// uni.navigateTo({ // uni.navigateTo({
// url: '/subpkg/property/vehicle_a' // url: '/subpkg/property/vehicle_a'
@ -398,18 +362,56 @@
// // this.applicationList=res // // this.applicationList=res
// }) // })
this.initIndex()
setTimeout(() => { setTimeout(() => {
this.flag = true this.flag = true
}) })
}, },
onPullDownRefresh() {
this.initIndex()
//
// setTimeout(() => {
// const newList = this.hostProduct.reverse();
// this.hostProduct = newList;
uni.stopPullDownRefresh();
// }, 500)
},
methods: { 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) { async afterReadAvatar(event) {
upLoadImage({ upLoadImage({
filePath: event.file.url, filePath: event.file.url,
}).then(res => { }).then(res => {
this.imgUrl = res.data.uri this.imgUrl = res.data.uri
// this.formData.avatar = res.data.uri // this.formData.avatar = res.data.uri