Toggle navigation
Toggle navigation
This project
Loading...
Sign in
万朱浩
/
Venue-Ops
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
juanboy
2024-10-18 22:02:52 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
249313662c0072abd06afe7b0755adf838ef78bf
24931366
1 parent
9bfc6f36
waiting.html page built
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
86 additions
and
0 deletions
BCAT_front/templates/waiting.html
BCAT_front/templates/waiting.html
0 → 100644
View file @
2493136
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<meta
charset=
"UTF-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
处理中
</title>
<style>
body
{
font-family
:
Arial
,
sans-serif
;
background-color
:
#f4f4f4
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
height
:
100vh
;
margin
:
0
;
}
.container
{
text-align
:
center
;
width
:
600px
;
/* 调整容器宽度与 main.html 一致 */
background-color
:
#fff
;
padding
:
50px
;
border-radius
:
15px
;
box-shadow
:
0
0
15px
rgba
(
0
,
0
,
0
,
0.1
);
/* 与 main.html 相同的阴影效果 */
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
/* 水平居中 */
}
h1
{
font-size
:
28px
;
/* 与 main.html 标题保持一致 */
margin-bottom
:
20px
;
}
p
{
font-size
:
18px
;
/* 与 main.html 副标题大小一致 */
color
:
#888
;
margin-top
:
20px
;
}
.loading-icon
{
margin-top
:
20px
;
width
:
50px
;
/* 调整图标大小 */
height
:
50px
;
border
:
5px
solid
#f3f3f3
;
border-radius
:
50%
;
border-top
:
5px
solid
#4caf50
;
animation
:
spin
1s
linear
infinite
;
}
@keyframes
spin
{
0
%
{
transform
:
rotate
(
0deg
);
}
100
%
{
transform
:
rotate
(
360deg
);
}
}
</style>
</head>
<body>
<div
class=
"container"
>
<h1>
处理中,请稍候...
</h1>
<div
class=
"loading-icon"
></div>
<p>
您的文件正在分析中,请稍等片刻。
</p>
</div>
<script>
function
checkStatus
()
{
fetch
(
'{{ url_for('
check_status
', filename=filename) }}'
)
.
then
(
response
=>
response
.
json
())
.
then
(
data
=>
{
if
(
data
.
status
===
'success'
)
{
// 成功,跳转到成功页面,并传递文件名以获取统计信息
window
.
location
.
href
=
"{{ url_for('upload_success') }}?filename="
+
encodeURIComponent
(
'{{ filename }}'
);
}
else
if
(
data
.
status
===
'failure'
)
{
// 失败,跳转到失败页面,并传递文件名以获取统计信息
window
.
location
.
href
=
"{{ url_for('upload_failure') }}?filename="
+
encodeURIComponent
(
'{{ filename }}'
);
}
else
{
// 继续等待
setTimeout
(
checkStatus
,
2000
);
}
})
.
catch
(
error
=>
{
console
.
error
(
'Error:'
,
error
);
setTimeout
(
checkStatus
,
2000
);
});
}
document
.
addEventListener
(
'DOMContentLoaded'
,
function
()
{
checkStatus
();
});
</script>
</body>
</html>
...
...
Please
register
or
login
to post a comment