This commit is contained in:
2026-07-28 13:59:16 +08:00 Unverified
parent be842cc1d5
commit 9a75589282
13 changed files with 1119 additions and 43 deletions
+2 -1
View File
@@ -314,8 +314,9 @@ async function showQrCode() {
ElMessage.warning('未取得签到码,请刷新考勤表后重试。')
return
}
const publicBase = import.meta.env.VITE_PUBLIC_BASE_URL ?? window.location.origin
qrCheckInUrl.value =
`${window.location.origin}/my-attendance?token=${encodeURIComponent(sheet.checkInToken)}`
`${publicBase}/my-attendance?token=${encodeURIComponent(sheet.checkInToken)}`
try {
qrDataUrl.value = await QRCode.toDataURL(qrCheckInUrl.value, {
width: 360,
+2 -1
View File
@@ -610,9 +610,10 @@ function openCalendarClient() {
function normalizeCalendarSubscription(value: any) {
if (!value?.feedPath) return value
const configuredBase = String(http.defaults.baseURL ?? '/api')
const publicBase = import.meta.env.VITE_PUBLIC_BASE_URL ?? window.location.origin
const apiBase = new URL(
configuredBase.endsWith('/') ? configuredBase : `${configuredBase}/`,
window.location.origin,
publicBase,
)
const feedUrl = new URL(value.feedPath, apiBase).toString()
return {