update
This commit is contained in:
parent
8e4a4132e6
commit
ca224c7291
@ -165,10 +165,14 @@ export default defineComponent({
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const res = await request.get('/api/community-time-periods/group_by_community')
|
const params = {
|
||||||
|
skip: (pagination.value.current - 1) * pagination.value.pageSize,
|
||||||
|
limit: pagination.value.pageSize
|
||||||
|
}
|
||||||
|
const res = await request.get('/api/community-time-periods/group_by_community', { params })
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
tableData.value = res.data
|
tableData.value = res.data.items || res.data
|
||||||
pagination.value.total = res.data.length
|
pagination.value.total = res.data.total || res.data.length
|
||||||
} else {
|
} else {
|
||||||
message.error(res.message || '获取数据失败')
|
message.error(res.message || '获取数据失败')
|
||||||
}
|
}
|
||||||
|
|||||||
@ -167,10 +167,14 @@ export default defineComponent({
|
|||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const res = await request.get('/api/time-periods')
|
const params = {
|
||||||
|
skip: (pagination.value.current - 1) * pagination.value.pageSize,
|
||||||
|
limit: pagination.value.pageSize
|
||||||
|
}
|
||||||
|
const res = await request.get('/api/time-periods', { params })
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
tableData.value = res.data
|
tableData.value = res.data.items || res.data
|
||||||
pagination.value.total = res.data.length
|
pagination.value.total = res.data.total || res.data.length
|
||||||
} else {
|
} else {
|
||||||
message.error(res.message || '获取数据失败')
|
message.error(res.message || '获取数据失败')
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user