Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
studyweb_Prototype
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
yujiejie
studyweb_Prototype
Commits
c411495d
提交
c411495d
authored
8月 23, 2026
作者:
yujiejie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
821步骤七完成
上级
2dfb77de
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
44 行增加
和
4 行删除
+44
-4
pages-mentor.js
pages-mentor.js
+44
-4
没有找到文件。
pages-mentor.js
浏览文件 @
c411495d
...
...
@@ -1542,8 +1542,48 @@ function getMentorDeployCompletenessLabel(studentId, taskKey) {
}
function
maskMentorDeployApiKey
(
key
)
{
if
(
!
key
)
return
'未配置'
;
return
'已配置 · '
+
String
(
key
).
slice
(
0
,
3
)
+
'••••••••'
;
if
(
!
key
)
return
''
;
return
String
(
key
).
slice
(
0
,
3
)
+
'••••••••'
;
}
function
getMentorDeployApiKeyStatus
(
key
)
{
return
key
?
'已配置'
:
'未配置'
;
}
function
copyMentorDeployApiKey
(
btn
,
key
)
{
var
el
=
document
.
createElement
(
'textarea'
);
el
.
value
=
key
||
''
;
el
.
style
.
position
=
'fixed'
;
el
.
style
.
opacity
=
'0'
;
document
.
body
.
appendChild
(
el
);
el
.
select
();
try
{
document
.
execCommand
(
'copy'
);
}
catch
(
e
)
{}
document
.
body
.
removeChild
(
el
);
if
(
btn
)
{
btn
.
innerHTML
=
'<svg class="w-3.5 h-3.5" data-lucide="check"></svg>'
;
btn
.
classList
.
add
(
'bg-emerald-100'
,
'text-emerald-700'
);
btn
.
classList
.
remove
(
'bg-[#F2F3F5]'
,
'text-[#4E5969]'
);
setTimeout
(
function
()
{
btn
.
innerHTML
=
'<svg class="w-3.5 h-3.5" data-lucide="copy"></svg>'
;
btn
.
classList
.
add
(
'bg-[#F2F3F5]'
,
'text-[#4E5969]'
);
btn
.
classList
.
remove
(
'bg-emerald-100'
,
'text-emerald-700'
);
if
(
window
.
lucide
)
lucide
.
createIcons
();
},
1500
);
}
if
(
window
.
lucide
)
lucide
.
createIcons
();
}
function
buildMentorDeployApiKeyCell
(
key
)
{
var
status
=
getMentorDeployApiKeyStatus
(
key
);
var
statusClass
=
key
?
'bg-emerald-50 text-emerald-700'
:
'bg-[#F2F3F5] text-[#86909C]'
;
var
copyBtn
=
key
?
'<button type="button" title="复制 API Key" class="w-6 h-6 flex items-center justify-center rounded bg-[#F2F3F5] text-[#4E5969] hover:bg-[#E8F3FF] hover:text-[#165DFF] transition-all flex-shrink-0" onclick="copyMentorDeployApiKey(this,
\'
'
+
mentorDeployReviewEsc
(
key
)
+
'
\'
)"><svg class="w-3.5 h-3.5" data-lucide="copy"></svg></button>'
:
''
;
return
'<div class="flex items-center gap-1.5 mt-1 min-w-0">'
+
'<span class="text-[11px] px-1.5 py-0.5 rounded flex-shrink-0 '
+
statusClass
+
'">'
+
status
+
'</span>'
+
'<span class="text-sm font-medium font-mono break-all">'
+
mentorDeployReviewEsc
(
maskMentorDeployApiKey
(
key
))
+
'</span>'
+
copyBtn
+
'</div>'
;
}
function
getMentorDeployNowTimestamp
()
{
...
...
@@ -1618,7 +1658,7 @@ function buildMentorDeploySubmissionPanel(sub) {
'<div class="p-3 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">API 地址</div><div class="text-sm font-medium mt-1 break-all font-mono">'
+
mentorDeployReviewEsc
(
a
.
apiUrl
||
'—'
)
+
'</div></div>'
+
'<div class="p-3 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">请求路径</div><div class="text-sm font-medium mt-1 font-mono">'
+
mentorDeployReviewEsc
(
a
.
apiPath
||
'—'
)
+
'</div></div>'
+
'<div class="p-3 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">端口</div><div class="text-sm font-medium mt-1 font-mono">'
+
mentorDeployReviewEsc
(
a
.
port
||
'—'
)
+
'</div></div>'
+
'<div class="p-3 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">API Key</div>
<div class="text-sm font-medium mt-1">'
+
maskMentorDeployApiKey
(
a
.
apiKey
)
+
'</div>
</div>'
+
'<div class="p-3 rounded-lg bg-[#F7F8FA]"><div class="text-xs text-[#86909C]">API Key</div>
'
+
buildMentorDeployApiKeyCell
(
a
.
apiKey
)
+
'
</div>'
+
'</div>'
)
+
'</div>'
;
var
logHtml
=
'<div class="'
+
(
activeTab
===
'log'
?
''
:
'hidden'
)
+
'">'
+
...
...
@@ -2178,7 +2218,7 @@ function buildMentorDeployParamsPanel(sid) {
'<p class="text-xs text-[#86909C] mb-3">已带入学生提交值,以下调整仅用于本次验收,不会修改学生原始提交内容。</p>'
+
'<div class="space-y-2.5">'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API 地址</label><input class="input-field text-sm font-mono'
+
readonlyClass
+
'" value="'
+
mentorDeployReviewEsc
(
p
.
apiUrl
)
+
'" placeholder="http://IP:端口"'
+
disabled
+
'></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API Key</label>
<input class="input-field text-sm font-mono'
+
readonlyClass
+
'" type="password" value="'
+
mentorDeployReviewEsc
(
p
.
apiKey
)
+
'" placeholder="sk-..."'
+
disabled
+
'>
</div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">API Key</label>
'
+
buildMentorDeployApiKeyCell
(
p
.
apiKey
)
+
'
</div>'
+
'<div class="grid grid-cols-2 gap-2">'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">模型名称</label><input class="input-field text-sm font-mono'
+
readonlyClass
+
'" value="'
+
mentorDeployReviewEsc
(
p
.
modelName
)
+
'"'
+
disabled
+
'></div>'
+
'<div><label class="text-xs font-medium text-[#4E5969] block mb-1">请求路径</label><input class="input-field text-sm font-mono'
+
readonlyClass
+
'" value="'
+
mentorDeployReviewEsc
(
p
.
apiPath
)
+
'"'
+
disabled
+
'></div>'
+
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论