update
This commit is contained in:
parent
0f479b1f9b
commit
d507cbff55
@ -58,15 +58,16 @@ export default {
|
||||
if (typeof id !== 'string') return
|
||||
this.nowGroup = id
|
||||
this.page = { cur: 1, total: 1 }
|
||||
this.getLog(1)
|
||||
this.getLog()
|
||||
},
|
||||
getLog (page = 1) {
|
||||
getLog (page = -1) {
|
||||
this.getLogList({
|
||||
group: this.nowGroup,
|
||||
page: this.page.cur,
|
||||
page: page,
|
||||
max: 20,
|
||||
cb: list => {
|
||||
this.list = list
|
||||
cb: data => {
|
||||
this.list = data.list
|
||||
this.page = data.page
|
||||
}})
|
||||
}
|
||||
},
|
||||
|
@ -255,13 +255,15 @@ export default {
|
||||
let opts = {
|
||||
method: 'get',
|
||||
url: '/api/line/logs',
|
||||
params: {}
|
||||
params: {
|
||||
order: 'asc'
|
||||
}
|
||||
}
|
||||
if (group.length > 0) opts.params.group = group
|
||||
if (page > 1) opts.params.p = page
|
||||
if (page > 1 || page < 0) opts.params.p = page
|
||||
if (max > 0) opts.params.max = max
|
||||
let res = await client(opts)
|
||||
if (cb !== null && typeof cb === 'function') cb(res.data.list)
|
||||
if (cb !== null && typeof cb === 'function') cb(res.data)
|
||||
} catch (err) {
|
||||
errorCatch.call(commit, err)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user