From 3b83eebbebadc4b43c3cafbe877aaeb6fe7b079b Mon Sep 17 00:00:00 2001
From: csy <435732439@qq.com>
Date: Fri, 23 Feb 2024 19:50:15 +0800
Subject: [PATCH] day01
---
src/api/system/bookInfo.js | 41 ++++
src/components/ImageUpload/index.vue | 2 +-
src/views/system/book/index.vue | 353 +++++++++++++++++++++++++++
3 files changed, 395 insertions(+), 1 deletion(-)
create mode 100644 src/api/system/bookInfo.js
create mode 100644 src/views/system/book/index.vue
diff --git a/src/api/system/bookInfo.js b/src/api/system/bookInfo.js
new file mode 100644
index 0000000..6f9d9c7
--- /dev/null
+++ b/src/api/system/bookInfo.js
@@ -0,0 +1,41 @@
+import request from '@/utils/request'
+
+// 查询参数列表
+export function listBookInfo(query) {
+ return request({
+ url: '/system/book_info/list',
+ method: 'get',
+ params: query
+ })
+}
+// 查询参数详细
+export function getBookInfo(id) {
+ return request({
+ url: '/system/book_info/' + id,
+ method: 'get'
+ })
+}
+// 新增书籍信息
+export function addBookInfo(data) {
+ return request({
+ url: '/system/book_info',
+ method: 'post',
+ data: data
+ })
+}
+// 修改书籍信息
+export function updateBookInfo(data) {
+ return request({
+ url: '/system/book_info',
+ method: 'put',
+ data: data
+ })
+}
+
+// 删除书籍信息
+export function delBookInfo(configId) {
+ return request({
+ url: '/system/book_info/' + configId,
+ method: 'delete'
+ })
+}
diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue
index bc8a76f..3e32010 100644
--- a/src/components/ImageUpload/index.vue
+++ b/src/components/ImageUpload/index.vue
@@ -149,7 +149,7 @@ export default {
},
// 上传成功回调
handleUploadSuccess(res, file) {
- if (res.data.code === 200) {
+ if (res.code === 200) {
this.uploadList.push({name: res.data.url, url: res.data.url});
this.uploadedSuccessfully();
} else {
diff --git a/src/views/system/book/index.vue b/src/views/system/book/index.vue
new file mode 100644
index 0000000..2146e87
--- /dev/null
+++ b/src/views/system/book/index.vue
@@ -0,0 +1,353 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+ 新增
+
+
+
+ 修改
+
+
+
+ 删除
+
+
+
+ 导出
+
+
+
+ 刷新缓存
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.shelTime) }}
+
+
+
+
+ 修改
+
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ dict.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+