首页 > 其他分享 >2024年4月23日

2024年4月23日

时间:2024-04-23 22:22:06浏览次数:28  
标签:box 23 color top 2024 animation background left

今天我主要将结组作业的登录页面的后端逻辑写了一下

代码如下:

<script>
export default {
name: "loginOne",
data()
{
return {
form:
{
id:'',
password:''
}
}
},
methods:
{
register()
{
this.$router.push({ name: 'registerOne' });
},
login()
{
this.$axios.post('http://localhost:8090/user/login',this.form).then(res=>res.data).then(res=> {
console.log(res);
alert("登录成功");
this.$router.replace({ name: 'indexOne', params: { data: this.form } });
}).catch(error=>
{
console.error(error);
alert("登录失败")
});
}
}
}
</script>

<template>
<!-- 背景 -->
<div class="background">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</div>

<div class="Box">
<h3>不知道名字的神秘的防霸凌系统</h3>
<el-form :model="form">
<input type="text" v-model="form.id" placeholder="请输入账号" required>
<input type="password" v-model="form.password" placeholder="请输入密码" required>
<button type="button" class="loginBtn" @click="login">登录</button>
<!-- <div style="float: right;" v-if="register"></div> -->
<div style="text-align: center;">
<a @click="register" class="no">没有账号?立即注册</a>
</div>
</el-form>
</div>
</template>

<style scoped>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}

/* 动态背景 */
@keyframes move {
100% {
transform: translate3d(0, 0, 1px) rotate(360deg);
}
}

.background {
position: fixed;
width: 100vw;
height: 100vh;
top: 0;
left: 0;
background: #3E1E68;
overflow: hidden;
}

.background span {
width: 20vmin;
height: 20vmin;
border-radius: 20vmin;
backface-visibility: hidden;
position: absolute;
animation: move;
animation-timing-function: linear;
animation-iteration-count: infinite;
}


.background span:nth-child(0) {
color: #FFACAC;
top: 90%;
left: 47%;
animation-duration: 8s;
animation-delay: -17s;
transform-origin: 2vw 17vh;
box-shadow: -40vmin 0 5.494502440636581vmin currentColor;
}

.background span:nth-child(1) {
color: #FFACAC;
top: 31%;
left: 5%;
animation-duration: 40s;
animation-delay: -14s;
transform-origin: -5vw -14vh;
box-shadow: -40vmin 0 5.192195104974926vmin currentColor;
}

.background span:nth-child(2) {
color: #FFACAC;
top: 18%;
left: 62%;
animation-duration: 20s;
animation-delay: -5s;
transform-origin: -18vw -12vh;
box-shadow: 40vmin 0 5.72205756381233vmin currentColor;
}

.background span:nth-child(3) {
color: #FFACAC;
top: 71%;
left: 45%;
animation-duration: 30s;
animation-delay: -2s;
transform-origin: -4vw -20vh;
box-shadow: -40vmin 0 5.303503038071778vmin currentColor;
}

.background span:nth-child(4) {
color: #E45A84;
top: 90%;
left: 38%;
animation-duration: 15s;
animation-delay: -48s;
transform-origin: 7vw -9vh;
box-shadow: -40vmin 0 5.882238754040052vmin currentColor;
}

.background span:nth-child(5) {
color: #583C87;
top: 34%;
left: 32%;
animation-duration: 30s;
animation-delay: -36s;
transform-origin: -6vw -15vh;
box-shadow: 40vmin 0 5.183333217256063vmin currentColor;
}

.background span:nth-child(6) {
color: #583C87;
top: 25%;
left: 41%;
animation-duration: 21s;
animation-delay: -47s;
transform-origin: -10vw -5vh;
box-shadow: 40vmin 0 5.345257098222438vmin currentColor;
}

.background span:nth-child(7) {
color: #E45A84;
top: 16%;
left: 39%;
animation-duration: 30s;
animation-delay: -33s;
transform-origin: -15vw 3vh;
box-shadow: -40vmin 0 5.693872337330205vmin currentColor;
}

.background span:nth-child(8) {
color: #583C87;
top: 42%;
left: 55%;
animation-duration: 46s;
animation-delay: -50s;
transform-origin: -6vw 25vh;
box-shadow: 40vmin 0 5.588315610213253vmin currentColor;
}

.background span:nth-child(9) {
color: #E45A84;
top: 78%;
left: 25%;
animation-duration: 44s;
animation-delay: -21s;
transform-origin: -4vw -12vh;
box-shadow: -40vmin 0 5.82170170819547vmin currentColor;
}

.background span:nth-child(10) {
color: #E45A84;
top: 73%;
left: 77%;
animation-duration: 41s;
animation-delay: -40s;
transform-origin: 21vw -11vh;
box-shadow: -40vmin 0 5.838449416658446vmin currentColor;
}

.background span:nth-child(11) {
color: #E45A84;
top: 48%;
left: 81%;
animation-duration: 33s;
animation-delay: -42s;
transform-origin: 6vw 19vh;
box-shadow: 40vmin 0 5.848850560573668vmin currentColor;
}

.background span:nth-child(12) {
color: #E45A84;
top: 77%;
left: 7%;
animation-duration: 25s;
animation-delay: -1s;
transform-origin: 15vw 24vh;
box-shadow: -40vmin 0 5.800039290361969vmin currentColor;
}

.background span:nth-child(13) {
color: #E45A84;
top: 77%;
left: 38%;
animation-duration: 51s;
animation-delay: -40s;
transform-origin: -1vw -13vh;
box-shadow: -40vmin 0 5.876822672246133vmin currentColor;
}

.background span:nth-child(14) {
color: #583C87;
top: 58%;
left: 98%;
animation-duration: 7s;
animation-delay: -1s;
transform-origin: -19vw -20vh;
box-shadow: -40vmin 0 5.622075629639948vmin currentColor;
}

.background span:nth-child(15) {
color: #583C87;
top: 79%;
left: 31%;
animation-duration: 39s;
animation-delay: -46s;
transform-origin: 14vw 21vh;
box-shadow: 40vmin 0 5.022352355698978vmin currentColor;
}

.background span:nth-child(16) {
color: #E45A84;
top: 41%;
left: 74%;
animation-duration: 37s;
animation-delay: -4s;
transform-origin: -19vw 3vh;
box-shadow: 40vmin 0 5.049960684696969vmin currentColor;
}

.background span:nth-child(17) {
color: #583C87;
top: 56%;
left: 34%;
animation-duration: 26s;
animation-delay: -35s;
transform-origin: -16vw -7vh;
box-shadow: -40vmin 0 5.11253385954465vmin currentColor;
}

.background span:nth-child(18) {
color: #583C87;
top: 84%;
left: 2%;
animation-duration: 14s;
animation-delay: -39s;
transform-origin: -10vw -6vh;
box-shadow: 40vmin 0 5.903761483531039vmin currentColor;
}

.background span:nth-child(19) {
color: #E45A84;
top: 61%;
left: 39%;
animation-duration: 21s;
animation-delay: -36s;
transform-origin: 14vw 9vh;
box-shadow: 40vmin 0 5.448311817969409vmin currentColor;
}

.background span:nth-child(20) {
color: #E45A84;
top: 33%;
left: 5%;
animation-duration: 8s;
animation-delay: -7s;
transform-origin: 4vw 2vh;
box-shadow: 40vmin 0 5.013421190075091vmin currentColor;
}

/* 动态背景 */

body {
height: 100vh;
background-color: aquamarine;
}

.Box {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 320px;
background-color: rgba(0, 0, 0, 0.24);
border-radius: 6px;
padding: 20px 32px;
}

h3 {
font-size: 22px;
color: #fff;
text-align: center;
margin-bottom: 40px;
font-weight: 500;
letter-spacing: 5px;
}

input {
width: 100%;
height: 35px;
border: 1px solid #fff;
background-color: transparent;
padding-left: 10px;
font-size: 12px;
color: #fff;
margin-bottom: 20px;
outline: none;
border-radius: 5px;
}

input::placeholder {
color: #fff;
}

.yzmBox {
display: flex;
justify-content: flex-start;
}

.yzmBox input {
width: 70%;
border-top-right-radius: 0;
border-bottom-right-radius: 0;
}

.yzmBox .btn {
cursor: pointer;
width: 29%;
background-color: #aa55ff;
color: #d8d8d8;
height: 35px;
outline: none;
border: 1px solid #aa55ff;
font-size: 12px;
border-radius: 6px;
margin-left: 1%;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}

.forgetPwd {
text-align: end;
font-size: 12px;
color: #ffffff;
padding-right: 5px;
}

.loginBtn {
width: 100%;
line-height: 36px;
text-align: center;
font-size: 15px;
color: #fff;
border-radius: 6px;
background: linear-gradient(to right, #aa55ff, #E45A84);
outline: none;
border: none;
margin-top: 30px;
}

.no {
margin-top: 30px;
text-align: center;
font-size: 12px;
color: #ffffff;
}

</style>
package com.example.chat.controller;


import com.example.chat.entity.User;
import com.example.chat.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
* <p>
* 前端控制器
* </p>
*
* @author chat
* @since 2024-04-23
*/
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserServiceImpl userService;
@PostMapping("/login")
private Boolean login(@RequestBody User user)
{
List<User> wrapper = userService.lambdaQuery()
.eq(User::getId, user.getId())
.eq(User::getPassword, user.getPassword()).list();
if(wrapper.isEmpty())
{
return false;
}else
{
return true;
}

}

}

没有遇到什么困难

明天将完成注册页面的后端逻辑

 

标签:box,23,color,top,2024,animation,background,left
From: https://www.cnblogs.com/czfznb/p/18153929

相关文章

  • Codeforces Round 940 (Div. 2) and CodeCraft-23
    A.Stickogon#include<bits/stdc++.h>usingnamespacestd;usingi32=int32_t;usingi64=longlong;#defineinti64usingvi=vector<int>;constintN=3e5,mod=1e9+7;voidsolve(){ vicnt(101); intn; cin>>n; for(i......
  • 2024.4.23 近期练习
    CF1924D先考虑一个串的最长合法序列,维护一个栈,答案就是右括号加入时栈非空的次数。我们看成从\((0,0)\)走到\((n,m)\),发现没被匹配的右括号个数就是\(x-y\)的最大值。要想只有\(k\)个匹配,那么要和\(x-y=m-k\)“相切”。若\(f(k)\)表示穿过直线的方案数,答案是\(f(k......
  • 2024/4/23
    今天上午计算机网络课程下午的软件工程课程中学习了:用户需求分析是软件开发过程中至关重要的一步,它确保了开发团队和最终用户之间的需求理解一致性。用户需求分析的过程通常包括以下几个关键步骤:需求收集:这是识别和收集用户需求的阶段。开发团队通过与客户和最终用户进行沟通......
  • Google Play App Store API 采集谷歌安卓应用商城app的数据接口 - 2024最新
    iDataRiver平台https://www.idatariver.com/zh-cn/提供开箱即用的谷歌安卓应用商城googleplayappstore数据采集API,供用户按需调用。接口使用详情请参考GooglePlayAppStore接口文档接口列表1.获取指定app的基础信息参数类型是否必填默认值示例值描述apik......
  • 2023中国企业敏捷实践白皮书发布,免费下载
    《2023中国企业敏捷实践白皮书》发布!免费下载在人工智能技术飞速发展,组织面临的复杂性和多变性不断加剧的背景下,《2023中国企业敏捷实践白皮书》通过广泛的调查,洞察剧变之下,谁在逆流而上,如何逆流而上。敏捷作为适应市场变化的关键策略,已被越来越多的企业采用,然而新技术与经济......
  • 2024用云渲染好还是自己渲染好!
    cg动画的渲染上经常需要使用到“云渲染”,当然也有小型的动画渲染使用的自己本地电脑渲染。云渲染可节省时间,减少硬件投资;本地电脑渲染就比较灵活的,但是需要高配置的硬件支持,那么两者那个好呢,一起来看看吧。一、项目规模与成本效益云渲染在影视动画渲染上具有明显的优势,特别是在......
  • 2351. 第一次出现两次的字母
    题目链接:自己的做法:classSolution{public:charrepeatedCharacter(strings){intn=s.size(); vector<int>v(28); vector<pair<char,int>>p; for(inti=0;i<s.size();i++){ intj=s[i]-'a'......
  • MySQL的在sync_binlog!=1造成1236报错【转】
    前言本文总结了主从复制的原理及日常运维的坑1.主从复制简介MySQL复制是指从一个MySQL主服务器(master)将数据拷贝到另一台或多台MySQL从服务器(slaves)的过程,将主数据库的DDL和DML操作通过二进制日志传到从库服务器上,然后在从服务器上对这些日志重新执行,从而使得主......
  • GJOI 2024.4.20 总结
    Morning:T1小鸟Statement:在一个\(n\)的二维平面里,\(X\)轴的正方向是向右的,\(Y\)轴的正方向是向上的。在坐标系第一象限里,左下角的点的坐标是\((0,0)\),右上角的点的坐标是\((n-1,n-1)\)。所以本题我们考虑的整个平面总共有\(n\timesn\)个整点,每个整点都有一只小......
  • FasterViT:英伟达提出分层注意力,构造高吞吐CNN-ViT混合网络 | ICLR 2024
    论文设计了新的CNN-ViT混合神经网络FasterViT,重点关注计算机视觉应用的图像吞吐能力。FasterViT结合CNN的局部特征学习的特性和ViT的全局建模特性,引入分层注意力(HAT)方法在降低计算成本的同时增加窗口间的交互。在包括分类、对象检测和分割各种CV任务上,FasterViT在精度与图像吞吐......