From fb4da655c61269f280aa4670e30a07e6dd68468f Mon Sep 17 00:00:00 2001 From: Sunwuyuan Date: Sun, 28 Dec 2025 17:08:08 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=8B=89=E8=B5=B7EA2?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=99=A8=E5=8A=9F=E8=83=BD=EF=BC=8C=E6=94=AF?= =?UTF-8?q?=E6=8C=81=E5=B0=86=E9=85=8D=E7=BD=AEJSON=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E4=B8=BAbase64=E5=B9=B6=E9=80=9A=E8=BF=87=E5=8D=8F=E8=AE=AE?= =?UTF-8?q?=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ExamConfigEditor.vue | 49 ++++++++++++++++++++++++++++- 1 file changed, 48 insertions(+), 1 deletion(-) diff --git a/src/components/ExamConfigEditor.vue b/src/components/ExamConfigEditor.vue index 95bfa84..3871194 100644 --- a/src/components/ExamConfigEditor.vue +++ b/src/components/ExamConfigEditor.vue @@ -108,7 +108,18 @@ variant="elevated" @click="downloadAsEa2" > - 部署到 ExamAware2 知试 + .ea2 文件 + + + + 拉起EA2播放器 ({ + name: info.name, + start: this.formatDisplayDateTime(info.start), + end: this.formatDisplayDateTime(info.end), + alertTime: parseInt(info.alertTime) || 15, + })), + }; + + const jsonString = JSON.stringify(configToSave); + + // 转换为base64 + const base64Data = btoa(unescape(encodeURIComponent(jsonString))); + + // 构建examaware://协议URL + const ea2Url = `examaware://player?data=${base64Data}`; + + // 尝试打开 + window.location.href = ea2Url; + + this.$message?.success('正在拉起 ExamAware2 播放器...'); + } catch (err) { + this.error = '拉起播放器失败: ' + err.message; + } + }, }, };