This commit is contained in:
namezlx 2023-09-26 10:41:03 +08:00
parent 4c711be24d
commit 297a7fdf2d
1 changed files with 8 additions and 3 deletions

View File

@ -135,9 +135,14 @@ function StudentSubmit(props){
return isLt100M; return isLt100M;
} }
function checkPrLink(rule, value, callback) { function checkPrLink(rule, value, callback) {
const getUrl = `${
window.location.href.indexOf("gitlink.org.cn") > -1
? "https://www.gitlink.org.cn"
: "https://testforgeplus.trustie.net"
}`;
if (value) { if (value) {
axios axios
.get(`https://www.gitlink.org.cn/check_pr_url`, { .get(`${getUrl}/check_pr_url`, {
params: { params: {
url: value, url: value,
task: checkedTaskId, task: checkedTaskId,
@ -163,10 +168,10 @@ function StudentSubmit(props){
} }
callback(); callback();
}).catch(() => { }).catch(() => {
callback("请正确输入视频链接"); callback("请正确输入pr地址");
}); });
} else { } else {
callback("请输入视频链接"); callback("请输入pr地址");
} }
} }
return <div className="interimBox"> return <div className="interimBox">