login_and_register.html 11.1 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471
<!DOCTYPE html>
<html lang="zh">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>微博舆情分析系统 | 登录</title>
    <link rel="icon" href="../../../static/原神启动/favicon.ico" />
  </head>

  <style>
    * {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    html,
    body {
      width: 100%;
      height: 100%;
      overflow: hidden;
    }

    a {
      text-decoration: none;
    }

    .login,
    .register {
      display: none;
    }

    .show {
      display: block;
    }

    #video-background {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      z-index: -3;
      overflow: hidden;
    }

    #video-background video {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      min-width: 100%;
      max-height: 110%;
      object-fit: cover;
    }

    #black-hid {
      position: fixed;
      width: 100%;
      height: 100%;
      background-color: #0a0a0a;
      opacity: 0.6;
      z-index: -2;
    }

    form {
      position: relative;
      width: 642.03px;
      height: 477.28px;
      background-color: #fff;
      margin: auto;
      top: 20%;
      border-radius: 0.1cm;
    }

    .login_box {
      position: absolute;
      width: 100%;
      height: 100%;
      background-color: #fff;
      box-shadow: inset 0px 0px 3px black;
      padding: 15px;
      box-sizing: border-box;
    }

    .title {
      position: absolute;
      top: 0;
      left: 0;
      width: 612px;
      height: auto;
      padding: 15px;
      left: 50%;
      transform: translateX(-50%);
    }

    .QRcode img {
      height: 70px;
      width: 70px;
      object-fit: unset;
      /* 添加过渡效果 */
      cursor: pointer;
    }

    .QRcode {
      height: 90px;
      width: 90px;
    }

    .QRcode:hover > img {
      line-height: normal;
      /* transform-origin: unset; */
    }

    .logo {
      position: absolute;
      width: 150px;
      height: 50px;
      left: 50%;
      transform: translateX(-50%);
      margin-top: 15px;
      transition: opacity 0.5s ease; /* 添加过渡效果 */
    }

    .logo img {
      width: 150px;
      height: 50px;
    }

    .content {
      position: absolute;
      width: 612px;
      height: 150px;
      top: 80px;
      left: 50%;
      transform: translateX(-50%);
    }

    .input {
      height: 60px;
      width: 522px;
      margin-top: 25px;
      margin-left: 40px;
      border: none;
    }

    .content input {
      height: 60px;
      width: 522px;
      text-indent: 1em;
      font-size: 18px;
      letter-spacing: 0.2em;
      font-weight: 700;
      outline: none;
      border: none;
      box-shadow: inset 0px 0px 2px rgb(207, 206, 206);
      box-shadow: 0px 0px 4px rgb(207, 206, 206);
      border-radius: 0.1cm;
    }

    .content input::placeholder {
      opacity: 0.4;
    }

    .register-text {
      position: absolute;
      width: 522px;
      height: 30px;
      top: 270px;
      left: 50%;
      transform: translateX(-50%);
    }

    .register-text a {
      font-weight: 700;
      font-size: 18px;
      letter-spacing: 0.1em;
    }

    .a1 {
      color: #949292;
    }

    .a2 {
      color: #d6c194;
    }

    .a2:hover {
      color: #d6a948;
    }

    .a3:hover {
      color: #d6a948;
    }

    .a3 {
      position: absolute;
      right: 0;
      color: #d6c194;
    }

    .start {
      position: absolute;
      top: 320px;
      width: 612px;
      height: 60px;
      left: 50%;
      transform: translateX(-50%);
    }

    .start button {
      position: absolute;
      width: 522px;
      height: 60px;
      left: 50%;
      transform: translateX(-50%);
      cursor: pointer;
      border: none;
      font-size: 20px;
      letter-spacing: 0.1em;
      background-color: rgb(54, 54, 61);
      color: rgb(215, 210, 180);
      font-weight: 700;
      border-radius: 0.1cm;
      box-shadow: 0px 0px 3px 1px #969595;
    }

    .start button:hover {
      color: #d6c194;
    }

    .exit {
      position: absolute;
      right: 20px;
      width: 25px;
      height: 25px;
    }

    .exit img {
      width: 25px;
      height: 25px;
    }

    .other-login {
      position: absolute;
      width: 612px;
      height: 80px;
      top: 400px;
      left: 50%;
      transform: translateX(-50%);
      padding-left: 80px;
      font-size: 18px;
      letter-spacing: 0.1em;
      font-weight: 700;
    }

    .other-login a {
      color: rgb(15, 15, 15);
    }

    .other-login span:first-child {
      margin-left: 15px;
    }

    .other-login span:last-child {
      position: absolute;
      right: 80px;
    }

    .xieyi {
      position: absolute;
      width: 612px;
      height: 40px;
      line-height: 40px;
      left: 50%;
      transform: translateX(-50%);
      top: 310px;
      font-size: 18px;
      font-weight: 700;
      color: #8d8c8b;
    }

    .xieyi input {
      margin-left: 45px;
    }

    .yanzhengma:hover {
      color: #aa863e;
    }
  </style>

  <body onclick="playAudio()">
    <audio id="audio-player" autoplay class="hide-player">
      <source
        src="https://lovexl-oss.oss-cn-beijing.aliyuncs.com/bed/%E5%8E%9F%E7%A5%9E%E9%A6%96%E9%A1%B5%E8%83%8C%E6%99%AF%E9%9F%B3.mp4"
        type="audio/mp3"
      />
    </audio>

    <div id="video-background">
      <video
        src="https://lovexl-oss.oss-cn-beijing.aliyuncs.com/bed/%E5%8E%9F%E7%A5%9E%E9%A6%96%E9%A1%B5%E8%A7%86%E9%A2%91.mp4"
        autoplay="autoplay"
        muted="muted"
        loop="loop"
      ></video>
    </div>

    <div id="black-hid"></div>

    <form id="login" class="login show" method="POST" action="/user/login">
      <div class="login_box">
        <div class="title">
          <a class="QRcode" href=""
            ><img src="../../../static/原神启动/二维码.png" alt="二维码"
          /></a>
          <a class="logo" href=""
            ><img src="../../../static/原神启动/logo2.08ebb840.png" alt=""
          /></a>
          <a class="exit" href=""
            ><img src="../../../static/原神启动/关闭 (1).png" alt=""
          /></a>
        </div>
      </div>
      <div class="content">
        <div class="input">
          <input type="text" name="username" placeholder="输入账号/原神" />
        </div>
        <div class="input">
          <input
            type="password"
            name="password"
            placeholder="输入密码/始める!"
          />
        </div>
      </div>
      <div class="register-text">
        <span>
          <a href="" class="a1">没有账号?</a>
          <a href="" class="a2" id="register_btn">立即注册</a>
        </span>
        <span><a href="" class="a3">忘记密码</a></span>
      </div>
      <div class="start">
        <button>进入系统</button>
      </div>
      <div class="other-login">
        <span><a href="" class="a4">手机快捷登录</a></span>
        <span><a href="" class="a5">TapTap</a></span>
      </div>
    </form>

    <form id="register" class="register" method="POST" action="/user/register">
      <div class="login_box">
        <div class="title">
          <a class="logo" href=""
            ><img src="../../../static/原神启动//logo2.08ebb840.png" alt=""
          /></a>
          <a class="exit" href=""
            ><img src="../../../static/原神启动//关闭 (1).png" alt=""
          /></a>
        </div>
      </div>
      <div class="content">
        <div class="input">
          <span
            style="
              display: inline-block;
              width: 60px;
              height: 60px;
              font-size: 21px;
              font-weight: 800;
              color: black;
              line-height: 60px;
              text-align: center;
            "
          >
            +86</span
          >
          <input
            style="width: 452px; float: right"
            type="text"
            name="username"
            placeholder="输入要注册的账号"
          />
          <a
            class="yanzhengma"
            href=""
            style="
              position: absolute;
              top: 43px;
              right: 60px;
              color: #d6c194;
              font-weight: 700;
              letter-spacing: 0.1em;
            "
            >我是假按钮</a
          >
        </div>
        <div class="input">
          <input type="text" name="password" placeholder="设定密码" />
        </div>
      </div>
      <div class="xieyi">
        <input type="checkbox" />
        <span>已同意《用户协议》和《隐私权益》</span>
      </div>
      <div class="register-text">
        <span>
          <a href="" class="a2" id="login_btn">返回登录页面</a>
        </span>
      </div>
      <div class="start" style="top: 370px">
        <button>注册并返回</button>
      </div>
    </form>

    <script>
      //点击网页后,播放音乐
      function playAudio() {
        var audioPlayer = document.getElementById("audio-player");
        audioPlayer.play();
      }

      // 获取表单和链接的引用
      const loginForm = document.getElementById("login");
      const registerForm = document.getElementById("register");
      const registerLink = document.getElementById("register_btn");
      const loginLink = document.getElementById("login_btn");

      // 点击"立即注册"链接时切换表单显示状态
      registerLink.addEventListener("click", function (event) {
        event.preventDefault(); // 阻止链接默认行为
        loginForm.classList.remove("show");
        registerForm.classList.add("show");
      });

      // 点击"返回登录界面"链接时切换表单显示状态
      loginLink.addEventListener("click", function (event) {
        event.preventDefault(); // 阻止链接默认行为
        registerForm.classList.remove("show");
        loginForm.classList.add("show");
      });

      // 在页面加载3秒后更改图片链接和文本内容
      setTimeout(function () {
        // 更改二维码图片链接
        const qrCode = document.querySelector(".QRcode img");
        qrCode.style.transition = "opacity 1s ease"; // 添加过渡效果
        qrCode.style.opacity = 0; // 渐隐

        // 等待过渡效果完成后隐藏图片
        setTimeout(function () {
          qrCode.style.display = "none"; // 隐藏二维码图片
        }, 1000); // 1秒等于1000毫秒

        // 更改logo为文本并添加样式
        const logo = document.querySelector(".logo");
        logo.style.transition = "opacity 1s ease"; // 添加过渡效果
        logo.style.opacity = 0; // 渐隐

        // 等待过渡效果完成后更改内容并渐显
        setTimeout(function () {
          logo.innerHTML =
            '<div style="width:500px;height:50px;margin-left:-200px;display:flex;align-items:center;"><img style="width:150px;height:75px;margin-bottom:20px" src="../../../static/原神启动/微博logo.png" alt=""/><div style="font-size: 35px; font-weight: bold; color: black;">微博舆情分析系统</div></div>';
          logo.style.opacity = 1; // 渐显
        }, 1000); // 1秒等于1000毫秒
      }, 3000); // 3000 毫秒 等于 3 秒
    </script>
  </body>
</html>