Skip to content

Commit 37cb271

Browse files
committed
LetCalendar: 前端事件创建功能测试成功(bug)
Signed-off-by: LetMeFly666 <[email protected]>
1 parent 125ea26 commit 37cb271

File tree

8 files changed

+472
-30
lines changed

8 files changed

+472
-30
lines changed

api/calendar/README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: LetMeFly
33
* @Date: 2024-12-15 16:10:07
44
* @LastEditors: LetMeFly.xyz
5-
* @LastEditTime: 2025-01-03 22:06:01
5+
* @LastEditTime: 2025-01-03 23:48:56
66
-->
77
# 目的
88

@@ -29,6 +29,8 @@
2929
- [ ] 删除标签时,前端提醒“所有任务的xx标签将会被移除”
3030
- [ ] 前端,事件修改 - 这个可以全部删了重建
3131
- [ ] 后端 - 事件创建 - 时间覆盖重叠问题
32+
- [ ] fix: 前端 - 拖拽后默认时间不正确
33+
- [ ] fix: 前端 - 单次点击无法触发事件创建
3234
- [x] 后端,标签修改 - 不能删了再重新创建,要不然关联的键会出问题
3335
- [x] 后端 - 标签相关api - 创建、删除、查询
3436
- [x] 标签数据库添加一列 - 创建者
@@ -860,6 +862,20 @@ html表格,设置所有列等宽。
860862

861863
<hr/>
862864

865+
我的后端接口如下,如果你了解了,请回复好的,并等待我的下一步指令
866+
867+
```
868+
869+
```
870+
871+
<hr/>
872+
873+
我想在拖拽选中一段时间时,弹出一个框。
874+
875+
在框里,可以创建事件并选择一个或多个标签。
876+
877+
创建事件时,可以输入事件标题、事件描述,默认依据用户的拖拽范围给定一个起止时间,用户也可以调整起止时间。
878+
863879
<hr/>
864880
<hr/>
865881
<hr/>

api/calendar/back/tags.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: LetMeFly
33
* @Date: 2024-12-23 18:19:16
44
* @LastEditors: LetMeFly.xyz
5-
* @LastEditTime: 2024-12-24 10:27:27
5+
* @LastEditTime: 2025-01-03 23:23:42
66
*/
77
import { getCookie } from "./utils/cookie";
88
import { getUserIdFromPassKey } from "./utils/user";
@@ -60,7 +60,8 @@ export async function deleteTag(request, env) {
6060
if (deleteResult.meta.changes === 0) {
6161
return new Response(JSON.stringify({status: 2, message: "Access Denied!"}), {status: 404});
6262
} else {
63-
return new Response(JSON.stringify({status: 0, message: `Tag ${tagId} deleted successfully.`}), {status: 200})
63+
return new Response(JSON.stringify({status: 0, message: `Tag ${tagId} deleted successfully.`}), {status: 200});
64+
// return new Response(JSON.stringify({status: 0, message: `Tag ${tagId} deleted successfully.`}), {status: 200, headers: {'Access-Control-Allow-Origin': '*'}}); // 开发用
6465
}
6566
}
6667

api/calendar/front/fileRouter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* @Author: LetMeFly
33
* @Date: 2024-12-15 16:56:16
44
* @LastEditors: LetMeFly.xyz
5-
* @LastEditTime: 2025-01-02 22:00:52
5+
* @LastEditTime: 2025-01-03 23:15:49
66
*/
77
import { indexHTML, stylesCSS, scriptsJS } from './files'
88

@@ -37,5 +37,6 @@ export async function files(request) {
3737
}
3838
const fileType = filePath.split('.').pop();
3939
// console.log(fileType); // 例如css
40-
return new Response(fileRoutePath[filePath], { headers: fileTypeDict[fileType] || {} });
40+
const headers = fileTypeDict[fileType] || {};
41+
return new Response(fileRoutePath[filePath], { headers });
4142
}

0 commit comments

Comments
 (0)