bug提交zzy

This commit is contained in:
zzyuan 2024-10-30 10:38:01 +08:00
parent d483fcff4c
commit f0b4888014
3 changed files with 11 additions and 9 deletions

View File

@ -13,7 +13,7 @@
"type" : "uniCloud" "type" : "uniCloud"
}, },
{ {
"playground" : "custom", "playground" : "standard",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
} }
] ]

View File

@ -458,9 +458,8 @@ export default {
}, },
methods: { methods: {
scrolltolower() { scrolltolower() {
this.queryParams.limit = 10
// * // *
if (this.queryParams.page * this.queryParams.limit >= this.recordsTotal) { if (this.queryParams.limit >= this.recordsTotal) {
uni.$u.toast('数据加载完毕') uni.$u.toast('数据加载完毕')
return return
} }
@ -468,14 +467,16 @@ export default {
//+1, //+1,
if (this.queryParams.page == 0) { if (this.queryParams.page == 0) {
this.queryParams.offset = 0 this.queryParams.offset = 0
this.queryParams.limit = 10
} else { } else {
this.queryParams.offset = this.queryParams.page * this.queryParams.limit this.queryParams.limit = this.queryParams.page * 10
} }
// //
this.getListData() this.getListData()
}, },
searchList() { searchList() {
this.queryParams.page = 0 this.queryParams.page = 0
this.queryParams.limit = 10
this.companyInfoList = [] this.companyInfoList = []
this.getListData() this.getListData()
}, },
@ -505,11 +506,11 @@ export default {
success: res => { success: res => {
console.log('res****', res) console.log('res****', res)
if (res.data.data?.length > 0) { if (res.data.data?.length > 0) {
if (this.queryParams.offset == 0) { // if (this.queryParams.offset == 0) {
this.companyInfoList = res.data.data this.companyInfoList = res.data.data
} else { // } else {
this.companyInfoList = [...this.companyInfoList, ...res.data.data] // this.companyInfoList = [...this.companyInfoList, ...res.data.data]
} // }
this.recordsTotal = res.data.recordsTotal this.recordsTotal = res.data.recordsTotal
} }
this.isLoading = false this.isLoading = false
@ -606,6 +607,7 @@ export default {
/* 查询 */ /* 查询 */
onQuery() { onQuery() {
this.queryParams.page = 0 this.queryParams.page = 0
this.queryParams.limit = 10
this.companyInfoList = [] this.companyInfoList = []
this.getListData().then(() => { this.getListData().then(() => {
this.$refs.popup.close() this.$refs.popup.close()

View File

@ -265,7 +265,7 @@ export default {
const proType = JSON.parse(option.proType) const proType = JSON.parse(option.proType)
const { currentIndex, name } = proType const { currentIndex, name } = proType
this.activeIndex4 = currentIndex + 1 this.activeIndex4 = currentIndex + 1
this.queryParams.params.proType = this.proTypeList[currentIndex + 1].id this.queryParams.params.proType = name
this.getListData() this.getListData()
} else if (option.survey) { } else if (option.survey) {
// //