2024-07-16 14:36:31 +08:00
|
|
|
import service from '@/utils/request'
|
|
|
|
|
2024-07-19 15:27:42 +08:00
|
|
|
export const getBookDetails = (id: string) => {
|
2024-07-16 14:36:31 +08:00
|
|
|
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-18 16:39:55 +08:00
|
|
|
}
|
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
|
|
|
|
}
|