From 1f93f4cd918e5423defd3fbb114633c019dfc101 Mon Sep 17 00:00:00 2001 From: zhaichao Date: Thu, 24 Sep 2026 15:12:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8D=A1403=E6=9D=83=E9=99=90?= =?UTF-8?q?=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/store.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/utils/store.js b/utils/store.js index a087ffe..51e8b7b 100644 --- a/utils/store.js +++ b/utils/store.js @@ -865,13 +865,15 @@ export const store = { try { this.attendRules.locations = asList(await api.oaGet('/profile/attendance/locations', this.token)) } catch (_) {} - try { - const pack = await api.oaGet('/system/attend-rules', this.token) - if (pack && typeof pack === 'object') { - this.attendRules.workStart = pack.workStart || this.attendRules.workStart - this.attendRules.workEnd = pack.workEnd || this.attendRules.workEnd - } - } catch (_) {} + if (this.can('system', 'attend')) { + try { + const pack = await api.oaGet('/system/attend-rules', this.token) + if (pack && typeof pack === 'object') { + this.attendRules.workStart = pack.workStart || this.attendRules.workStart + this.attendRules.workEnd = pack.workEnd || this.attendRules.workEnd + } + } catch (_) {} + } try { this.attendance = asList(await api.oaGet('/profile/attendance', this.token)) } catch (_) {}