mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-24 07:52:53 +08:00
修改上传图片分类, 优化接口报错处理
This commit is contained in:
@@ -119,7 +119,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
active: 0,
|
||||
pendingListLoading: false,
|
||||
pendingListLoading: true,
|
||||
processedListLoading: false,
|
||||
pendingListFinished: false,
|
||||
processedListFinished: false,
|
||||
@@ -149,33 +149,46 @@ export default {
|
||||
this.searchValue = ''
|
||||
},
|
||||
async loadMore() {
|
||||
const rs = await getQuestionList({
|
||||
type: this.active,
|
||||
pageInfo: {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.searchValue ? this.searchValue : ''
|
||||
}
|
||||
})
|
||||
if (rs && rs.result === '0') {
|
||||
this.currentPage++
|
||||
if (this.active === 0) {
|
||||
this.pendingListLoading = false
|
||||
this.pendingList.push(...rs.content.list)
|
||||
try {
|
||||
const rs = await getQuestionList({
|
||||
type: this.active,
|
||||
pageInfo: {
|
||||
pageNum: this.currentPage,
|
||||
pageSize: this.pageSize,
|
||||
keyword: this.searchValue ? this.searchValue : ''
|
||||
}
|
||||
})
|
||||
if (rs && rs.result === '0') {
|
||||
this.currentPage++
|
||||
if (this.active === 0) {
|
||||
this.pendingListLoading = false
|
||||
this.pendingList.push(...rs.content.list)
|
||||
this.pendingList.sort((prev, next) => {
|
||||
return -(new Date(prev.createdTime).getTime() - new Date(next.createdTime).getTime())
|
||||
})
|
||||
} else {
|
||||
this.processedListLoading = false
|
||||
this.processedList.push(...rs.content.list)
|
||||
this.processedList.sort((prev, next) => {
|
||||
return -(new Date(prev.createdTime).getTime() - new Date(next.createdTime).getTime())
|
||||
})
|
||||
}
|
||||
if (rs.content.pageNum >= rs.content.pages && this.active === 0) {
|
||||
this.pendingListFinished = true
|
||||
} else if (rs.content.pageNum >= rs.content.pages && this.active === 1) {
|
||||
this.processedListFinished = true
|
||||
}
|
||||
} else {
|
||||
this.processedListLoading = false
|
||||
this.processedList.push(...rs.content.list)
|
||||
}
|
||||
if (rs.content.pageNum >= rs.content.pages && this.active === 0) {
|
||||
this.pendingListFinished = true
|
||||
} else if (rs.content.pageNum >= rs.content.pages && this.active === 1) {
|
||||
this.processedListFinished = true
|
||||
this.pendingListLoading = false
|
||||
this.processedListLoading = false
|
||||
}
|
||||
} else {
|
||||
this.pendingListFinished = true
|
||||
this.processedListFinished = true
|
||||
} catch (reson) {
|
||||
this.pendingListLoading = false
|
||||
this.pendingListFinished = true
|
||||
this.processedListLoading = false
|
||||
this.processedListFinished = true
|
||||
}
|
||||
},
|
||||
changeProblemList() {
|
||||
|
||||
Reference in New Issue
Block a user