86 lines
3.9 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport'/>
<!-- Fonts -->
<!-- <link href="https://fonts.googleapis.com/css?family=Nunito:300,300i,400,600,700" rel="stylesheet"> -->
<!-- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous"> -->
<!-- <link href="./css/anchor/fonts_all.css" rel="stylesheet"/> -->
<!-- CSS -->
<link href="/css/anchor/main.css" rel="stylesheet"/>
<link href="/css/anchor/vendor/aos.css" rel="stylesheet"/>
<title>Users Page</title>
<link rel="icon" href="/pic/ico/Home.png">
</head>
<body>
<!-- <div class="include" src="/html/base/base_modal.html"></div> -->
<div class="include" src="/html/base/base_nav.html"></div>
<main class="container pb-5 pt-5">
<!-- <div id="linking-cards" class="row"></div> -->
<h1>Users</h1>
<form id="login-form">
<!-- remote-data-processing-display -->
<h2>Remote Data Processing Display</h2>
<div class="form-group">
<input type="input" class="form-control input-round" id="input0" placeholder="input0" required="">
</div>
<div class="form-group">
<input type="input" class="form-control input-round" id="input1" placeholder="input1" required="">
</div>
<div class="form-group">
<input type="input" class="form-control input-round" id="input2" placeholder="input2" required="">
</div>
<button type="submit" class="btn btn-success btn-round">submit</button>
<div class="form-group">
<input type="input" class="form-control input-round" id="output" placeholder="output" required="">
</div>
</form>
</main>
<div class="include" src="/html/base/base_footer.html"></div>
<!-- Javascript -->
<script src="/js/anchor/vendor/jquery.min.js" type="text/javascript"></script>
<script src="/js/anchor/vendor/popper.min.js" type="text/javascript"></script>
<script src="/js/anchor/vendor/bootstrap.min.js" type="text/javascript"></script>
<script src="/js/anchor/functions.js" type="text/javascript"></script>
<script src="/js/base_script.js" type="text/javascript" charset="utf-8"></script>
<script src="/fetch-wrapper.js"></script>
<script>
document.getElementById('login-form').addEventListener('submit', function(event) {
event.preventDefault();
var input = [];
input[0] = document.getElementById('input0').value;
input[1] = document.getElementById('input1').value;
input[2] = document.getElementById('input2').value;
submit(input);
});
async function submit(input) {
try {
// 这里应该调用后端API进行登录操作以下仅为模拟示例
const wrapper = new FetchWrapper(window.location.origin);
const response = await wrapper.post('/api/users/_rdpd', {
input: input
})
if (response.data.code === '0000') {
document.querySelector('.message').textContent = `${response.data.data}`;
} else {
document.querySelector('.message').textContent =
'Login failed.登录失败...' + response.data.code;
window.location.href = '/users/login';
}
} catch (error) {
console.error('Error fetching:', error);
}
}
</script>
</body>
</html>