|
@@ -324,18 +324,26 @@
|
|
|
}
|
|
|
}).then(res => {
|
|
|
console.log(res)
|
|
|
- this.total = res.data.stock
|
|
|
- this.length = res.data.count
|
|
|
- this.itemList = this.itemList.concat(res.data.record)
|
|
|
- if (this.itemList.length >= res.data.count) this.status = 'nomore';
|
|
|
- else this.status = 'loading';
|
|
|
- if (this.itemList.length == 0) {
|
|
|
- this.judge = true
|
|
|
- } else {
|
|
|
- this.judge = false
|
|
|
+ if(res.data.code = 500){
|
|
|
+ uni.showToast({
|
|
|
+ icon: 'none',
|
|
|
+ title: res.data.msg,
|
|
|
+ position: "bottom"
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.total = res.data.stock
|
|
|
+ this.length = res.data.count
|
|
|
+ this.itemList = this.itemList.concat(res.data.record)
|
|
|
+ if (this.itemList.length >= res.data.count) this.status = 'nomore';
|
|
|
+ else this.status = 'loading';
|
|
|
+ if (this.itemList.length == 0) {
|
|
|
+ this.judge = true
|
|
|
+ } else {
|
|
|
+ this.judge = false
|
|
|
+ }
|
|
|
+ console.log(this.itemList)
|
|
|
+ return this.itemList
|
|
|
}
|
|
|
- console.log(this.itemList)
|
|
|
- return this.itemList
|
|
|
}).catch(err => {
|
|
|
console.log(err)
|
|
|
}).finally(() => {
|