Skip to content

Commit 10bbb51

Browse files
committed
feat: 修改集合返回字段
1 parent 0227e6d commit 10bbb51

File tree

7 files changed

+11
-212
lines changed

7 files changed

+11
-212
lines changed

.env.development

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
ENV = 'development'
22

3-
VUE_APP_BASE_URL = 'http://koa.lin.colorful3.com/'
3+
VUE_APP_BASE_URL = 'http://localhost:5000/'

public/iconfont111.css

Lines changed: 0 additions & 201 deletions
This file was deleted.

src/components/layout/User.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export default {
263263
264264
return this.$axios({
265265
method: 'post',
266-
url: '/cms/file/',
266+
url: '/cms/file',
267267
data: {
268268
file,
269269
},

src/lin/models/log.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class Log {
112112
if (page === 0) {
113113
this.lPage = 0
114114
}
115-
const res = await get('cms/log/', {
115+
const res = await get('cms/log', {
116116
count: count || this.lCount,
117117
page: page || this.lPage,
118118
name: name || this.name,

src/models/book.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class Book {
1212

1313
// 类中的方法可以代表一个用户行为
1414
async addBook(info) {
15-
const res = await post('v1/book/', info)
15+
const res = await post('v1/book', info)
1616
return res
1717
}
1818

@@ -35,7 +35,7 @@ class Book {
3535
}
3636

3737
async getBooks() {
38-
const res = await get('v1/book/')
38+
const res = await get('v1/book', { handleError: true })
3939
return res
4040
}
4141
}

src/views/admin/user/UserList.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ export default {
113113
this.loading = true
114114
res = await Admin.getAdminUsers({ group_id: this.group_id, count: this.pageCount, page: currentPage }) // eslint-disable-line
115115
this.loading = false
116-
this.tableData = [...res.collection]
117-
this.total_nums = res.total_nums
116+
this.tableData = [...res.items]
117+
this.total_nums = res.total
118118
} catch (e) {
119119
this.loading = false
120120
console.log(e)

src/views/log/Log.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ export default {
174174
this.users = await log.getLoggedUsers({})
175175
}
176176
const res = await log.getLogs({ page: 0 })
177-
this.logs = res.collection
177+
this.logs = res.items
178178
} catch (err) {
179179
console.error(err)
180180
}
@@ -194,8 +194,8 @@ export default {
194194
end: this.searchDate[1],
195195
})
196196
if (res) {
197-
let logs = res.collection
198-
this.totalCount = res.total_nums
197+
let logs = res.items
198+
this.totalCount = res.total
199199
if (this.searchKeyword) {
200200
logs = await searchLogKeyword(this.searchKeyword, logs)
201201
}
@@ -216,7 +216,7 @@ export default {
216216
res = await log.moreLogPage()
217217
}
218218
if (res) {
219-
let moreLogs = res.collection
219+
let moreLogs = res.items
220220
if (this.isSearch && this.searchKeyword) {
221221
moreLogs = await searchLogKeyword(this.searchKeyword, moreLogs)
222222
}

0 commit comments

Comments
 (0)