forked from Gitlink/forgeplus-react
pr校验
This commit is contained in:
parent
4c711be24d
commit
297a7fdf2d
|
@ -135,9 +135,14 @@ function StudentSubmit(props){
|
|||
return isLt100M;
|
||||
}
|
||||
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) {
|
||||
axios
|
||||
.get(`https://www.gitlink.org.cn/check_pr_url`, {
|
||||
.get(`${getUrl}/check_pr_url`, {
|
||||
params: {
|
||||
url: value,
|
||||
task: checkedTaskId,
|
||||
|
@ -163,10 +168,10 @@ function StudentSubmit(props){
|
|||
}
|
||||
callback();
|
||||
}).catch(() => {
|
||||
callback("请正确输入视频链接");
|
||||
callback("请正确输入pr地址");
|
||||
});
|
||||
} else {
|
||||
callback("请输入视频链接");
|
||||
callback("请输入pr地址");
|
||||
}
|
||||
}
|
||||
return <div className="interimBox">
|
||||
|
|
Loading…
Reference in New Issue