From 9b12a829d2f1aedf37252b137394511ce23523a7 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Mon, 11 Aug 2025 05:15:35 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=AD=BE=E5=88=B0=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E6=B7=BB=E5=8A=A0=E6=89=93=E5=BC=80=E7=AD=BE?= =?UTF-8?q?=E5=88=B0=E6=9C=BA=E5=99=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/pages/manage/setting/checkin.vue | 30 ++++++++++++++++++- resources/assets/sass/pages/page-setting.scss | 8 +++++ 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/pages/manage/setting/checkin.vue b/resources/assets/js/pages/manage/setting/checkin.vue index e14cd5dc5..bfc609e02 100644 --- a/resources/assets/js/pages/manage/setting/checkin.vue +++ b/resources/assets/js/pages/manage/setting/checkin.vue @@ -16,6 +16,10 @@
{{ $L('查看更多签到数据') }}
+
+ {{ $L('打开签到机器人') }} + +
{{ $L('签到设置') }}
@@ -82,6 +86,7 @@ export default { data() { return { loadIng: 0, + openBotIng: 0, formData: [], faceimgs: [], @@ -209,7 +214,7 @@ export default { latelySection(section) { return section.map(item => { - return `${item[0]} - ${item[1] || 'None'}` + return `${item[0]} - ${item[1] || 'none'}` }).join('
') }, @@ -238,6 +243,29 @@ export default { }).finally(_ => { this.calendarLoading--; }) + }, + + async openBot() { + this.openBotIng++; + try { + const {data} = await this.$store.dispatch("call", { + url: 'users/search', + data: { + keys: { + key: 'check-in@bot.system', + bot: 1, + } + }, + }) + if (data.length === 0) { + throw new Error('机器人暂未开启'); + } + await this.$store.dispatch("openDialogUserid", data[0].userid) + } catch (error) { + $A.modalError(error.msg || '机器人暂未开启'); + } finally { + this.openBotIng--; + } } } } diff --git a/resources/assets/sass/pages/page-setting.scss b/resources/assets/sass/pages/page-setting.scss index 05a2e4345..9d86609a2 100755 --- a/resources/assets/sass/pages/page-setting.scss +++ b/resources/assets/sass/pages/page-setting.scss @@ -252,12 +252,20 @@ overflow: auto; } .setting-checkin-button { + display: flex; + align-items: center; + gap: 8px; padding-bottom: 4px; cursor: pointer; color: #2b85e4; &:hover { text-decoration: underline; } + > svg { + width: 16px; + height: 16px; + margin: 0; + } } &.submit { position: absolute;