From 07f4401f679bb78d56a6ce8c3bf9a7bf2a63863e Mon Sep 17 00:00:00 2001 From: "DESKTOP-RQ919RC\\Pc" <1300399510@qq.com> Date: Tue, 4 Nov 2025 19:05:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=A7=9F=E6=88=BF?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=9B=BE=E6=A0=87=E5=92=8C=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix: 修复投票状态显示逻辑 refactor: 重命名ajaxget为ajaxGet style: 优化CSS样式和布局 docs: 更新组件文档和注释 --- component/head-top/head-top.js | 37 +- component/head-top/head-top.txt | 10 +- component/item-head/item-head.js | 7 +- component/item-head/item-head.txt | 2 +- component/item-tenement/item-tenement.js | 17 +- component/item-tenement/item-tenement.txt | 9 +- component/item-vote/item-vote.js | 2 +- component/item-vote/item-vote.txt | 2 +- component/latest-list/latest-list.js | 11 +- css/details.css | 7 + css/details.less | 9 + css/homepage-me.css | 61 ++++ css/homepage-me.less | 71 ++++ css/index.css | 36 ++ css/index.less | 42 +++ css/public.css | 61 ++++ css/public.less | 69 ++++ css/section.css | 37 ++ css/section.less | 48 +++ img/admission-officer-icon.png | Bin 0 -> 2468 bytes img/attestation-icon.png | Bin 0 -> 98922 bytes img/cong-ge.png | Bin 0 -> 78934 bytes img/intermediary-icon.png | Bin 0 -> 95384 bytes img/university-manager.png | Bin 0 -> 34408 bytes js/public.js | 4 +- js/search.js | 4 +- js/section.js | 12 +- section.html | 418 ++++++++++++---------- 28 files changed, 735 insertions(+), 241 deletions(-) create mode 100644 img/admission-officer-icon.png create mode 100644 img/attestation-icon.png create mode 100644 img/cong-ge.png create mode 100644 img/intermediary-icon.png create mode 100644 img/university-manager.png diff --git a/component/head-top/head-top.js b/component/head-top/head-top.js index 048a9bc..4b6b498 100644 --- a/component/head-top/head-top.js +++ b/component/head-top/head-top.js @@ -5,17 +5,35 @@ const { defineComponent, ref, onMounted, nextTick } = Vue; // 定义组件(直接使用模板) export const headTop = defineComponent({ name: "headTop", - props: { - itemdata: { - type: Object, - default: () => {}, - }, - }, + props: {}, setup(props) { onMounted(() => {}); - let signInAlreadyState = ref(false); + let state = ref(0); // 是否已经签到 + + let userInfoWinTimerCount = 0; + const userInfoWinTimer = setInterval(() => { + if (todaysignedState) { + state.value = todaysigned; + clearInterval(userInfoWinTimer); + } + userInfoWinTimerCount++; + if (userInfoWinTimerCount >= 3000) clearInterval(userInfoWinTimer); + }, 50); + + const signIn = () => { + ajax("/v2/api/forum/sign").then((res) => { + if (res.code != 200) { + creationAlertBox("error", res.message); + return; + } + + let data = res.data; + state.value = 1; + creationAlertBox("success", res.message || "签到成功"); + }); + }; let input = ref(""); let defaultSearchText = ref("屯特"); @@ -23,8 +41,9 @@ export const headTop = defineComponent({ const searchText = input.value || defaultSearchText.value; redirectToExternalWebsite("/search/" + searchText); }; - return { input, defaultSearchText, goSearch, signInAlreadyState }; + + return { state, signIn, input, defaultSearchText, goSearch }; }, - template: `
`, + template: ``, }); diff --git a/component/head-top/head-top.txt b/component/head-top/head-top.txt index 0cb4d61..8a29215 100644 --- a/component/head-top/head-top.txt +++ b/component/head-top/head-top.txt @@ -8,11 +8,7 @@
{{ item }}
{{ item.location || '' }}
{{ item }}
{{ item.location || '' }} ?bbw0m0tC{mB>4Ph @*(`OZddu*(&R`H-20@sxV3ec+c9eKQdXl0X%-B4A
zX!2rub7isG>3yuU^0Cl9Ub5mI*KMqd(n009tvuWHCRRpo!-0MC#%(yTd(Fn(b$o4W
zfR7enpDHZQ2Ejpbh)4W9x@C&|8BX_FCh6~EfgHGe#m;C3_^KLKS+}sNOS+xC?PjXm
zwf(i+T5$bMz6=IEa7@?k_PjZ*Gxz`kU-;?*k4`VEa0V}a*nsfErW33YwxRX4RNT)S?_I^
z(q{-#w|P2b *VO>>V1m>^!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