123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- <!DOCTYPE html>
- <html lang="zh-CN">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
- <title></title>
- <link rel="stylesheet" href="./bootstrap/css/bootstrap.min.css" />
- <link rel="stylesheet" href="./bootstrap/css/bootstrap-theme.min.css" />
- <link rel="stylesheet" href="./css/index.css" />
- <script src="./js/jquery.js"></script>
- <script src="./bootstrap/js/bootstrap.min.js"></script>
- </head>
- <body>
- <div class="loginPage">
- <div class="loginItem">
- <div class="form">
- <img src="https://dangjian-web.oss-cn-chengdu.aliyuncs.com/img/logo.png"
- style="width: 289px;margin: 0 auto;display: block;margin-bottom: 131px;">
- <div class="login-head">
- <h3>用 户 登 录</h3>
- </div>
- <form>
- <div class="input-group">
- <span class="input-group-addon" id="basic-addon1">
- <svg t="1640764623435" class="icon" viewBox="0 0 1024 1024" version="1.1"
- xmlns="http://www.w3.org/2000/svg" p-id="2115" width="18" height="18">
- <path
- d="M498.602667 191.744a204.714667 204.714667 0 0 1 116.906666 372.8c133.162667 47.317333 229.077333 173.290667 231.893334 322.026667l0.085333 6.784h-64c0-157.333333-127.573333-284.885333-284.885333-284.885334-155.136 0-281.301333 123.968-284.821334 278.250667l-0.085333 6.613333h-64c0-151.68 96.810667-280.746667 232-328.810666a204.714667 204.714667 0 0 1 116.906667-372.8z m0 64a140.714667 140.714667 0 1 0 0 281.450667 140.714667 140.714667 0 0 0 0-281.450667z"
- fill="#1677FF" p-id="2116"></path>
- </svg>
- </span>
- <input type="text" class="form-control" placeholder="请输入账号" id="user"
- aria-describedby="basic-addon1">
- </div>
- <br />
- <div class="input-group">
- <span class="input-group-addon" id="basic-addon1">
- <svg t="1640764744340" class="icon" viewBox="0 0 1024 1024" version="1.1"
- xmlns="http://www.w3.org/2000/svg" p-id="2910" width="18" height="18">
- <path
- d="M512 768c-17.664 0-32-14.304-32-32l0-96c0-17.696 14.336-32 32-32s32 14.304 32 32l0 96C544 753.696 529.664 768 512 768z"
- p-id="2911" fill="#049aef"></path>
- <path
- d="M832 960 192 960c-52.928 0-96-43.072-96-96L96 512c0-52.928 43.072-96 96-96l640 0c52.928 0 96 43.072 96 96l0 352C928 916.928 884.928 960 832 960zM192 480c-17.632 0-32 14.368-32 32l0 352c0 17.664 14.368 32 32 32l640 0c17.664 0 32-14.336 32-32L864 512c0-17.632-14.336-32-32-32L192 480z"
- p-id="2912" fill="#049aef"></path>
- <path
- d="M736 480c-17.696 0-32-14.336-32-32L704 318.016C704 209.248 601.76 128 510.336 128 416.768 128 320 198.912 320 317.568L320 448c0 17.664-14.336 32-32 32s-32-14.336-32-32L256 317.568C256 158.848 385.312 64 510.336 64 632.224 64 768 168.32 768 318.016L768 448C768 465.664 753.696 480 736 480z"
- p-id="2913" fill="#049aef"></path>
- </svg>
- </span>
- <input class="form-control" type="password" placeholder="请输入密码" id="password"
- aria-describedby="basic-addon1">
- </div>
- <br />
- <br />
- <div style="text-align: center">
- <div class="btn btn-primary submit" style="border: none;margin: 0 70px;display:block;height: 39px;background: linear-gradient(-90deg, #23cffd, #1f81e7);opacity: 0.96;border-radius: 20px;">确 认</div>
- </div>
- </form>
- </div>
- </div>
- </div>
- <script src="./js/base.js"></script>
- <script>
- $(".submit").click(() => {
- const user = $("#user").val();
- const password = $("#password").val();
- console.log(user, password);
- if (!user || !password) {
- showAlert("请输入账号或密码");
- return;
- }
- $.post(Config.baseUrl + "/login", {
- username: user,
- password: password
- }, function (e) {
- console.log(e)
- if (e.code === 0) {
- localStorage.login = user
- localStorage.token = e.data.token;
- location.href = "./skeleton.html";
- } else {
- showAlert("账号或密码错误");
- }
- })
- });
- </script>
- </body>
- </html>
|