From a1d7e81859f554f3a53680cc35f0f49bf1f77098 Mon Sep 17 00:00:00 2001
From: wwf <1971391498@qq.com>
Date: 星期四, 14 五月 2026 14:37:02 +0800
Subject: [PATCH] 导入项目
---
src/api/infra/demo/demo01/index.ts | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 50 insertions(+), 0 deletions(-)
diff --git a/src/api/infra/demo/demo01/index.ts b/src/api/infra/demo/demo01/index.ts
new file mode 100644
index 0000000..982049c
--- /dev/null
+++ b/src/api/infra/demo/demo01/index.ts
@@ -0,0 +1,50 @@
+import request from '@/config/axios'
+import type { Dayjs } from 'dayjs'
+
+/** 绀轰緥鑱旂郴浜轰俊鎭� */
+export interface Demo01Contact {
+ id: number // 缂栧彿
+ name?: string // 鍚嶅瓧
+ sex?: number // 鎬у埆
+ birthday?: string | Dayjs // 鍑虹敓骞�
+ description?: string // 绠�浠�
+ avatar: string // 澶村儚
+}
+
+// 绀轰緥鑱旂郴浜� API
+export const Demo01ContactApi = {
+ // 鏌ヨ绀轰緥鑱旂郴浜哄垎椤�
+ getDemo01ContactPage: async (params: any) => {
+ return await request.get({ url: `/infra/demo01-contact/page`, params })
+ },
+
+ // 鏌ヨ绀轰緥鑱旂郴浜鸿鎯�
+ getDemo01Contact: async (id: number) => {
+ return await request.get({ url: `/infra/demo01-contact/get?id=` + id })
+ },
+
+ // 鏂板绀轰緥鑱旂郴浜�
+ createDemo01Contact: async (data: Demo01Contact) => {
+ return await request.post({ url: `/infra/demo01-contact/create`, data })
+ },
+
+ // 淇敼绀轰緥鑱旂郴浜�
+ updateDemo01Contact: async (data: Demo01Contact) => {
+ return await request.put({ url: `/infra/demo01-contact/update`, data })
+ },
+
+ // 鍒犻櫎绀轰緥鑱旂郴浜�
+ deleteDemo01Contact: async (id: number) => {
+ return await request.delete({ url: `/infra/demo01-contact/delete?id=` + id })
+ },
+
+ /** 鎵归噺鍒犻櫎绀轰緥鑱旂郴浜� */
+ deleteDemo01ContactList: async (ids: number[]) => {
+ return await request.delete({ url: `/infra/demo01-contact/delete-list?ids=${ids.join(',')}` })
+ },
+
+ // 瀵煎嚭绀轰緥鑱旂郴浜� Excel
+ exportDemo01Contact: async (params) => {
+ return await request.download({ url: `/infra/demo01-contact/export-excel`, params })
+ }
+}
--
Gitblit v1.8.0