From aa0723d1387c4bca94f3b24dda78554512f7c827 Mon Sep 17 00:00:00 2001
From: "DESKTOP-RQ919RC\\Pc" <1300399510@qq.com>
Date: Mon, 24 Nov 2025 19:12:53 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E7=AD=BE=E5=88=B0=E7=BB=84=E4=BB=B6):=20?=
=?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AD=BE=E5=88=B0=E5=8A=9F=E8=83=BD=E5=8F=8A?=
=?UTF-8?q?=E7=9B=B8=E5=85=B3=E6=A0=B7=E5=BC=8F=E5=92=8C=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 新增签到组件HTML模板和CSS样式
- 实现签到功能的核心逻辑和交互
- 添加签到日历和用户列表展示
- 支持签到规则查看和签到操作
- 集成API接口获取签到数据和提交签到
---
component/sign-in/sign-in.js | 259 +++++++++++++
component/sign-in/sign-in.txt | 659 ++++++++++++++++++++++++++++++++++
css/signIn.css | 14 +
css/signIn.less | 15 +
details.html | 3 +-
js/details.js | 7 +-
js/save.js | 6 +-
7 files changed, 958 insertions(+), 5 deletions(-)
create mode 100644 component/sign-in/sign-in.js
create mode 100644 component/sign-in/sign-in.txt
diff --git a/component/sign-in/sign-in.js b/component/sign-in/sign-in.js
new file mode 100644
index 0000000..b419508
--- /dev/null
+++ b/component/sign-in/sign-in.js
@@ -0,0 +1,259 @@
+const signTemplate = document.createElement("template");
+signTemplate.innerHTML = `
-
fi88yrHXiDSj
+
fi88yrHXiDSj

@@ -483,6 +483,7 @@
+
diff --git a/js/details.js b/js/details.js
index 64706e7..09c218d 100644
--- a/js/details.js
+++ b/js/details.js
@@ -15,6 +15,9 @@ const appSectionIndex = createApp({
setup() {
onMounted(() => {
getUserInfoWin();
+ setTimeout(() => {
+ signInBox._init();
+ }, 3000);
});
let isLogin = ref(false);
@@ -176,8 +179,8 @@ const appSectionIndex = createApp({
let html = formattedText;
- html = html.replaceAll('
', "[b]");
- html = html.replaceAll('', "[/b]");
+ html = html.replaceAll("
", "[b]");
+ html = html.replaceAll("", "[/b]");
// 1. 还原换行符为
标签
html = html.replace(/\n/g, "
");
diff --git a/js/save.js b/js/save.js
index 3ca5e83..f00a368 100644
--- a/js/save.js
+++ b/js/save.js
@@ -32,6 +32,9 @@ const watchList = {
// 监听 item-project.txt,同步到 item-project.js
"../component/item-project/item-project.txt": "../component/item-project/item-project.js",
+ // 监听 sign-in.txt,同步到 sign-in.js
+ "../component/sign-in/sign-in.txt": "../component/sign-in/sign-in.js",
+
// 监听 bi.txt,同步到 bi.js
"../component/bi/bi.txt": "../component/bi/bi.js",
@@ -61,8 +64,7 @@ function syncContent(txtPath, jsPath) {
// 匹配 template: `...` 结构,替换反引号内的内容
const templateRegex = /(template:\s*)(`[^`]*`)/;
- // 匹配 template.innerHTML = `...` 结构
- const innerHTMLRegex = /(template\.innerHTML\s*=\s*)(`[^`]*`)/;
+ const innerHTMLRegex = /((?:[A-Za-z_\$][\w\$]*Template|template)\.innerHTML\s*=\s*)(`[^`]*`)/;
if (templateRegex.test(jsContent)) {
jsContent = jsContent.replace(templateRegex, `$1\`${txtContent}\``);