소스 검색

详情bug

panhui 4 년 전
부모
커밋
30ba4f6b6e
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      src/main/nine-space/src/mixins/list.js

+ 6 - 0
src/main/nine-space/src/mixins/list.js

@@ -29,6 +29,9 @@ export default {
 
 
             if (this.httpType === 'get') {
             if (this.httpType === 'get') {
                 this.$http.get(this.url, data, { body: 'json' }).then(res => {
                 this.$http.get(this.url, data, { body: 'json' }).then(res => {
+                    if (res.first) {
+                        this.list = [];
+                    }
                     this.list = [...this.list, ...res.content];
                     this.list = [...this.list, ...res.content];
                     this.empty = res.empty;
                     this.empty = res.empty;
                     this.loading = false;
                     this.loading = false;
@@ -39,6 +42,9 @@ export default {
                 });
                 });
             } else {
             } else {
                 this.$http.post(this.url, data, { body: 'json' }).then(res => {
                 this.$http.post(this.url, data, { body: 'json' }).then(res => {
+                    if (res.first) {
+                        this.list = [];
+                    }
                     this.list = [...this.list, ...res.content];
                     this.list = [...this.list, ...res.content];
                     this.empty = res.empty;
                     this.empty = res.empty;
                     this.loading = false;
                     this.loading = false;