feat(签到组件): 添加签到功能及相关样式和逻辑

- 新增签到组件HTML模板和CSS样式
- 实现签到功能的核心逻辑和交互
- 添加签到日历和用户列表展示
- 支持签到规则查看和签到操作
- 集成API接口获取签到数据和提交签到
This commit is contained in:
DESKTOP-RQ919RC\Pc
2025-11-24 19:12:53 +08:00
parent 8c62e294cf
commit aa0723d138
7 changed files with 958 additions and 5 deletions

View File

@@ -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>', "[b]");
html = html.replaceAll('</b>', "[/b]");
html = html.replaceAll("<b>", "[b]");
html = html.replaceAll("</b>", "[/b]");
// 1. 还原换行符为<br>标签
html = html.replace(/\n/g, "<br>");

View File

@@ -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}\``);