82 lines
No EOL
3.3 KiB
HTML
82 lines
No EOL
3.3 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="cn">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Github文件下载加速</title>
|
|
<!-- 引入 Bootstrap 5 CSS -->
|
|
<link href="static/css/bootstarp/5/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous">
|
|
<link href="static/css/custom/Common.css" rel="stylesheet" crossorigin="anonymous">
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div class="container mt-5">
|
|
<div class="row justify-content-center">
|
|
<div id="loading-mask" style="display: none;">
|
|
<div class="loading-spinner"></div>
|
|
<p class="loading-text">数据提交中,请稍等...</p>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div id="from_data" class="card-body">
|
|
<h5 class="card-title text-center">Github文件下载加速</h5>
|
|
|
|
<!-- URL 输入框 -->
|
|
<div class="mb-3">
|
|
<label for="url_ipt" class="form-label">目标文件URL</label>
|
|
<input type="text" required="required" class="form-control" id="url_ipt"
|
|
placeholder="请输入要下载的文件链接">
|
|
</div>
|
|
|
|
<!-- 验证码 输入框 -->
|
|
<!-- <div class="mb-3 input-group">
|
|
<input type="text" class="form-control" id="vcode" placeholder="交易验证码">
|
|
<button type="button" id="send_vcode_btn" class="btn btn-primary">发送验证码</button>
|
|
</div> -->
|
|
|
|
<!-- 提交按钮 -->
|
|
<div class="d-grid gap-2">
|
|
<button type="button" id="sub_btn" class="btn btn-primary">提交</button>
|
|
</div>
|
|
<br />
|
|
<hr />
|
|
<p class="more-content"><a href="/query_download_task.html">查询文件下载任务状态</a> | 捐赠</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 优先加载jq一类的三方库 -->
|
|
<script src="static/js/bootstarp/5/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
|
|
<script src="static/js/jquery/2.1.4/jquery.min.js"></script>
|
|
<script src="static/js/custom/Common.js"></script>
|
|
<script>
|
|
$(document).ready(function () {
|
|
console.log("document ready")
|
|
sub_btn.addEventListener('click', function (param) {
|
|
showLoadingMask();
|
|
$.ajax({
|
|
type: "POST",
|
|
url: "/AddOfflineTask",
|
|
data: {
|
|
url: url_ipt.value
|
|
},
|
|
dataType: "json",
|
|
success: function (response) {
|
|
hideLoadingMask();
|
|
if (response.retcode == 0)
|
|
alert("任务提交成功! 请稍后点击页面下方的 \"查询文件下载任务状态\" 超链接查询任务状态!");
|
|
else
|
|
alert(response.message);
|
|
}
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html> |