book-web/src/api/maku/t_book.ts

45 lines
870 B
TypeScript
Raw Normal View History

import service from '@/utils/request'
2024-07-19 15:27:42 +08:00
export const getBookDetails = (id: string) => {
return service.get('/maku/t_book/' + id)
}
export const useT_bookApi = (id: number) => {
return service.get('/maku/t_book/' + id)
}
export const useT_bookSubmitApi = (dataForm: any) => {
if (dataForm.id) {
return service.put('/maku/t_book', dataForm)
} else {
return service.post('/maku/t_book', dataForm)
}
}
2024-07-19 15:27:42 +08:00
/*
*
* */
export const bookList = () => {
return service.get('maku/t_book/list')
}
/*
*
* */
export const bookSearchList = (name: string) => {
return service.get('/maku/t_book/list/search?name=' + name)
}
export interface bookEntity {
id: number
bookName: string
author: string
price: number
bookCover: string
introduction: string
description: string
store: number
createTime: string
updateTime: string
}