From 7101e6006b9416eb0960defd234b3683061be453 Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Mon, 17 Nov 2025 16:58:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/project.js | 26 + pages.json | 7 + pages/project/form/index.vue | 1071 ++++++++++++++++++++++++++++++++++ pages/project/list/index.vue | 40 +- 4 files changed, 1135 insertions(+), 9 deletions(-) create mode 100644 pages/project/form/index.vue diff --git a/api/project.js b/api/project.js index 1af6abd..66cb8d4 100644 --- a/api/project.js +++ b/api/project.js @@ -100,3 +100,29 @@ export const getProjectDetail = (id) => { }); }; +/** + * 创建项目 + * @param {Object} data 项目数据 + * @returns {Promise} 创建结果 + */ +export const createProject = (data) => { + return uni.$uv.http.post('bst/project', data, { + custom: { + auth: true + } + }); +}; + +/** + * 更新项目 + * @param {Object} data 项目数据(需包含 id) + * @returns {Promise} 更新结果 + */ +export const updateProject = (data) => { + return uni.$uv.http.put('bst/project', data, { + custom: { + auth: true + } + }); +}; + diff --git a/pages.json b/pages.json index a06ec67..b9edee3 100644 --- a/pages.json +++ b/pages.json @@ -138,6 +138,13 @@ "navigationStyle": "custom" } }, + { + "path": "pages/project/form/index", + "style": { + "navigationBarTitleText": "项目编辑", + "navigationStyle": "custom" + } + }, { "path": "pages/project/list/index", "style": { diff --git a/pages/project/form/index.vue b/pages/project/form/index.vue new file mode 100644 index 0000000..86cb32f --- /dev/null +++ b/pages/project/form/index.vue @@ -0,0 +1,1071 @@ +