refactor: 重构博客管理模块

This commit is contained in:
2025-06-10 23:29:55 +08:00
parent 5bf38c2f1a
commit 2fcc2453cf
15 changed files with 149 additions and 87 deletions

View File

@@ -5,7 +5,6 @@ import {
IBillPay,
IBillQuery,
IBillRecord,
IBillSummaryStats
} from '@/types/bill'
import { IStatsChart } from 'vue3-common/dist/types'
@@ -69,42 +68,42 @@ export const queryBillCategoryApi = (): Promise<IBillCategory[]> =>
export const addBillPayApi = (billPay: IBillPay): Promise<boolean> =>
cloudService({
url: '/admin-service/bill-manage/pay',
url: '/home-service/bill-manage/pay',
method: 'post',
data: billPay
})
export const updateBillPayApi = (id: number, billPay: IBillPay): Promise<boolean> =>
cloudService({
url: `/admin-service/bill-manage/pay/${id}`,
url: `/home-service/bill-manage/pay/${id}`,
method: 'put',
data: billPay
})
export const addBillBookApi = (billBook: IBillBook): Promise<boolean> =>
cloudService({
url: '/admin-service/bill-manage/book',
url: '/home-service/bill-manage/book',
method: 'post',
data: billBook
})
export const updateBillBookApi = (id: number, billBook: IBillBook): Promise<boolean> =>
cloudService({
url: `/admin-service/bill-manage/book/${id}`,
url: `/home-service/bill-manage/book/${id}`,
method: 'put',
data: billBook
})
export const addBillCategoryApi = (billCategory: IBillCategory): Promise<boolean> =>
cloudService({
url: '/admin-service/bill-manage/category',
url: '/home-service/bill-manage/category',
method: 'post',
data: billCategory
})
export const updateBillCategoryApi = (id: number, billCategory: IBillCategory): Promise<boolean> =>
cloudService({
url: `/admin-service/bill-manage/category/${id}`,
url: `/home-service/bill-manage/category/${id}`,
method: 'put',
data: billCategory
})