Skip to content

Commit fd3b590

Browse files
committed
deal with api response
1 parent 41bdf29 commit fd3b590

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/views/Home.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ export default {
169169
that.page = urlPage;
170170
}
171171
this.$api.get("Blog/?page=" + that.page, { test: 33 }, r => {
172-
this.list = r.data;
173-
this.page = r.page;
174-
this.TotalCount = r.pageCount;
172+
this.list = r.response.data;
173+
this.page = r.response.page;
174+
this.TotalCount = r.response.pageCount;
175175
this.isShow = false;
176176
this.pictLoading = false;
177177
});

src/views/Home2.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,9 @@ export default {
101101
that.page = urlPage;
102102
}
103103
this.$api.get("Blog/?page=" + that.page, null, r => {
104-
this.list = r.data;
105-
this.page = r.page;
106-
this.TotalCount = r.pageCount;
104+
this.list = r.response.data;
105+
this.page = r.response.page;
106+
this.TotalCount = r.response.pageCount;
107107
this.isShow = false;
108108
});
109109
}

src/views/content.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default {
9494
methods: {
9595
getData() {
9696
this.$api.get("Blog/" + this.id, null, r => {
97-
this.dat = r.data;
97+
this.dat = r.response.data;
9898
this.isShow = false;
9999
});
100100
}

0 commit comments

Comments
 (0)