Merge remote-tracking branch 'origin/master'

master
istars 7 years ago
commit e1ca079766

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -0,0 +1,443 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="#" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>账号登录</title>
<style>
*{
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
@font-face {
font-family: 'neo';
src: url("NEOTERICc.ttf")/*tpa=http://www.17sucai.com/preview/384665/2018-12-28/login/font/NEOTERICc.ttf*/;
}
input:focus{
outline: none;
}
.form input{
width: 300px;
height: 30px;
font-size: 18px;
background: none;
border: none;
border-bottom: 1px solid #fff;
color: #fff;
margin-bottom: 20px;
}
.form input::placeholder{
color: rgba(255,255,255,0.8);
font-size: 18px;
font-family: "neo";
}
.confirm{
height: 0;
overflow: hidden;
transition: .25s;
}
.btn{
width:140px;
height: 40px;
border: 1px solid #fff;
background: none;
font-size:20px;
color: #fff;
cursor: pointer;
margin-top: 25px;
font-family: "neo";
transition: .25s;
}
.btn:hover{
background: rgba(255,255,255,.25);
}
#login_wrap{
width: 980px;
min-height: 500px;
border-radius: 10px;
font-family: "neo";
overflow: hidden;
box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.25);
position: fixed;
top: 50%;
right: 50%;
margin-top: -250px;
margin-right: -490px;
}
#login{
width: 50%;
height: 100%;
min-height: 500px;
background: linear-gradient(45deg, #9a444e, #e06267);
position: relative;
float: right;
}
#login #status{
width: 90px;
height: 35px;
margin: 40px auto;
color: #fff;
font-size: 30px;
font-weight: 600;
position: relative;
overflow: hidden;
}
#login #status i{
font-style: normal;
position: absolute;
transition: .5s
}
#login span{
text-align: center;
position: absolute;
left: 50%;
margin-left: -150px;
top: 52%;
margin-top: -140px;
}
#login span a{
text-decoration: none;
color: #fff;
display: block;
margin-top: 80px;
font-size: 18px;
}
#bg{
background: linear-gradient(45deg, #211136, #bf5853);
height: 100%;
}
/*绘图*/
#login_img{
width: 50%;
min-height: 500px;
background: linear-gradient(45deg, #221334, #6c3049);
float: left;
position: relative;
}
#login_img span{
position: absolute;
display: block;
}
#login_img .circle{
width: 200px;
height: 200px;
border-radius: 50%;
background: linear-gradient(45deg, #df5555, #ef907a);
top: 70px;
left: 50%;
margin-left: -100px;
overflow: hidden;
}
#login_img .circle span{
width: 150px;
height: 40px;
border-radius: 50px;
position: absolute;
}
#login_img .circle span:nth-child(1){
top: 30px;
left: -38px;
background: #c55c59;
}
#login_img .circle span:nth-child(2){
bottom: 20px;
right: -35px;
background: #934555;
}
#login_img .star span{
background: radial-gradient(#fff 10%,#fff 20%,rgba(72, 34, 64, 0));
border-radius: 50%;
box-shadow: 0 0 7px #fff;
}
#login_img .star span:nth-child(1){
width: 15px;
height: 15px;
top: 50px;
left: 30px;
}
#login_img .star span:nth-child(2){
width: 10px;
height: 10px;
left: 360px;
top: 80px;
}
#login_img .star span:nth-child(3){
width: 5px;
height: 5px;
top: 400px;
left: 80px;
}
#login_img .star span:nth-child(4){
width: 8px;
height: 8px;
top: 240px;
left: 60px;
}
#login_img .star span:nth-child(5){
width: 4px;
height: 4px;
top: 20px;
left: 200px;
}
#login_img .star span:nth-child(6){
width: 4px;
height: 4px;
top: 460px;
left: 410px;
}
#login_img .star span:nth-child(7){
width: 6px;
height: 6px;
top: 250px;
left: 350px;
}
#login_img .fly_star span{
width: 90px;
height: 3px;
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: -o-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: linear-gradient(to right, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
transform: rotate(-45deg);
}
#login_img .fly_star span:nth-child(1){
top:60px;
left: 80px;
}
#login_img .fly_star span:nth-child(2){
top: 210px;
left: 332px;
opacity: 0.6;
}
#login_img p{
text-align: center;
color: #af4b55;
font-weight: 600;
margin-top: 365px;
font-size: 25px;
}
#login_img p i{
font-style: normal;
margin-right: 45px;
}
#login_img p i:nth-last-child(1){
margin-right: 0;
}
/*提示*/
#hint{
width: 100%;
line-height: 70px;
background: linear-gradient(-90deg, #9b494d, #bf5853);
text-align: center;
font-size: 25px;
color: #fff;
box-shadow: 0 0 20px #733544;
display: none;
opacity: 0;
transition: .5s;
position: absolute;
top: 0;
z-index: 999;
}
/* 响应式 */
@media screen and (max-width:1000px ) {
#login_img{
display: none;
}
#login_wrap{
width: 490px;
margin-right: -245px;
}
#login{
width: 100%;
}
}
@media screen and (max-width:560px ) {
#login_wrap{
width: 330px;
margin-right: -165px;
}
#login span{
margin-left: -125px;
}
.form input{
width: 250px;
}
.btn{
width: 113px;
}
}
@media screen and (max-width:345px ) {
#login_wrap {
width: 290px;
margin-right: -145px;
}
}
</style>
</head>
<body>
<div id="bg">
<div id="hint"><!-- 提示框 -->
<p>登录失败</p>
</div>
<div id="login_wrap">
<div id="login"><!-- 登录注册切换动画 -->
<div id="status">
<i style="top: 0"></i>
<i style="top: 35px"></i>
<i style="right: 5px"></i>
</div>
<span>
<form action=" ">
<p class="form"><input type="text" id="user" placeholder="账号"></p>
<p class="form"><input type="password" id="passwd" placeholder="密码"></p>
<p class="form confirm"><input type="password" id="confirm-passwd" placeholder="确认密码"></p>
<input type="button" value="登录" class="btn" onclick="login()" style="margin-right: 20px;">
<input type="button" value="注册" class="btn" onclick="signin()" id="btn">
</form>
<a href="#">忘记密码</a>
</span>
</div>
<div id="login_img"><!-- 图片绘制框 -->
<span class="circle">
<span></span>
<span></span>
</span>
<span class="star">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</span>
<span class="fly_star">
<span></span>
<span></span>
</span>
<p id="title">CLOUD</p>
</div>
</div>
</div>
</body>
<script>
var onoff = true//根据此布尔值判断当前为注册状态还是登录状态
var confirm = document.getElementsByClassName("confirm")[0]
//var user = document.getElementById("user")
//var passwd = document.getElementById("passwd")
//var con_pass = document.getElementById("confirm-passwd")
//自动居中title
var name_c = document.getElementById("title")
name = name_c.innerHTML.split("")
name_c.innerHTML = ""
for (i = 0; i < name.length; i++)
if (name[i] != ",")
name_c.innerHTML += "<i>" + name[i] + "</i>"
//引用hint()在最上方弹出提示
function hint() {
let hit = document.getElementById("hint")
hit.style.display = "block"
setTimeout("hit.style.opacity = 1", 0)
setTimeout("hit.style.opacity = 0", 2000)
setTimeout('hit.style.display = "none"', 3000)
}
//回调函数
/*function submit(callback) {
//if (passwd.value == con_pass.value) {
let request = new XMLHttpRequest()
let url = ""
request.open("post", url, true)
let data = new FormData()
data.append("user", user.value)
data.append("passwd", passwd.value)
request.onreadystatechange = function() {
if (this.readyState == 4) {
callback.call(this, this.response)
//console.log(this.responseText)
}
}
request.send(data)
}*/
/*else {
hit.innerHTML = "两次密码不同"
hitting()
}
}*/
//注册按钮
function signin() {
let status = document.getElementById("status").getElementsByTagName("i")
let hit = document.getElementById("hint").getElementsByTagName("p")[0]
if (onoff) {
confirm.style.height = 51 + "px"
status[0].style.top = 35 + "px"
status[1].style.top = 0
onoff = !onoff
} else {
/*if (!/^[A-Za-z0-9]+$/.test(user.value))
hit.innerHTML = "账号只能为英文和数字"
else if (user.value.length < 6)
hit.innerHTML = "账号长度必须大于6位"
else if (passwd.value.length < 6)
hit.innerHTML = "密码长度必须大于6位"
else if (passwd.value != con_pass.value)
hit.innerHTML = "两次密码不相等"
else if (passwd.value = con_pass.value) {
submit(function(res) {
if (res == "exist")
hit.innerHTML = "该账号已存在"
else if (res == true) {
hit.innerHTML = "账号注册成功,两秒后自动刷新页面"
setTimeout("window.location.reload()", 2000)
} else if (res == false)
hit.innerHTML = "账号注册失败"
})
}
hint()*/
}
}
//登录按钮
function login() {
if (onoff) {
/*let request = new XMLHttpRequest()
let url = ""
request.open("post", url, true)
let data = new FormData()
data.append("user", user.value)
data.append("passwd", passwd.value)
request.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.responseText == false)
hint()
else
window.location.href = this.responseText;
}
}
request.send(data)*/
} else {
let status = document.getElementById("status").getElementsByTagName("i")
confirm.style.height = 0
status[0].style.top = 0
status[1].style.top = 35 + "px"
onoff = !onoff
}
}
</script>
</html>

Binary file not shown.

@ -0,0 +1,274 @@
*{
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
@font-face {
font-family: 'neo';
src: url("NEOTERICc-1.ttf")/*tpa=http://www.17sucai.com/preview/384665/2018-12-28/login/css/font/NEOTERICc.ttf*/;
}
input:focus{
outline: none;
}
.form input{
width: 300px;
height: 30px;
font-size: 18px;
background: none;
border: none;
border-bottom: 1px solid #fff;
color: #fff;
margin-bottom: 20px;
}
.form input::placeholder{
color: rgba(255,255,255,0.8);
font-size: 18px;
font-family: "neo";
}
.confirm{
height: 0;
overflow: hidden;
transition: .25s;
}
.btn{
width:140px;
height: 40px;
border: 1px solid #fff;
background: none;
font-size:20px;
color: #fff;
cursor: pointer;
margin-top: 25px;
font-family: "neo";
transition: .25s;
}
.btn:hover{
background: rgba(255,255,255,.25);
}
#login_wrap{
width: 980px;
min-height: 500px;
border-radius: 10px;
font-family: "neo";
overflow: hidden;
box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.25);
position: fixed;
top: 50%;
right: 50%;
margin-top: -250px;
margin-right: -490px;
}
#login{
width: 50%;
height: 100%;
min-height: 500px;
background: linear-gradient(45deg, #9a444e, #e06267);
position: relative;
float: right;
}
#login #status{
width: 90px;
height: 35px;
margin: 40px auto;
color: #fff;
font-size: 30px;
font-weight: 600;
position: relative;
overflow: hidden;
}
#login #status i{
font-style: normal;
position: absolute;
transition: .5s
}
#login span{
text-align: center;
position: absolute;
left: 50%;
margin-left: -150px;
top: 52%;
margin-top: -140px;
}
#login span a{
text-decoration: none;
color: #fff;
display: block;
margin-top: 80px;
font-size: 18px;
}
#bg{
background: linear-gradient(45deg, #211136, #bf5853);
height: 100%;
}
/*绘图*/
#login_img{
width: 50%;
min-height: 500px;
background: linear-gradient(45deg, #221334, #6c3049);
float: left;
position: relative;
}
#login_img span{
position: absolute;
display: block;
}
#login_img .circle{
width: 200px;
height: 200px;
border-radius: 50%;
background: linear-gradient(45deg, #df5555, #ef907a);
top: 70px;
left: 50%;
margin-left: -100px;
overflow: hidden;
}
#login_img .circle span{
width: 150px;
height: 40px;
border-radius: 50px;
position: absolute;
}
#login_img .circle span:nth-child(1){
top: 30px;
left: -38px;
background: #c55c59;
}
#login_img .circle span:nth-child(2){
bottom: 20px;
right: -35px;
background: #934555;
}
#login_img .star span{
background: radial-gradient(#fff 10%,#fff 20%,rgba(72, 34, 64, 0));
border-radius: 50%;
box-shadow: 0 0 7px #fff;
}
#login_img .star span:nth-child(1){
width: 15px;
height: 15px;
top: 50px;
left: 30px;
}
#login_img .star span:nth-child(2){
width: 10px;
height: 10px;
left: 360px;
top: 80px;
}
#login_img .star span:nth-child(3){
width: 5px;
height: 5px;
top: 400px;
left: 80px;
}
#login_img .star span:nth-child(4){
width: 8px;
height: 8px;
top: 240px;
left: 60px;
}
#login_img .star span:nth-child(5){
width: 4px;
height: 4px;
top: 20px;
left: 200px;
}
#login_img .star span:nth-child(6){
width: 4px;
height: 4px;
top: 460px;
left: 410px;
}
#login_img .star span:nth-child(7){
width: 6px;
height: 6px;
top: 250px;
left: 350px;
}
#login_img .fly_star span{
width: 90px;
height: 3px;
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: -o-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: linear-gradient(to right, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
transform: rotate(-45deg);
}
#login_img .fly_star span:nth-child(1){
top:60px;
left: 80px;
}
#login_img .fly_star span:nth-child(2){
top: 210px;
left: 332px;
opacity: 0.6;
}
#login_img p{
text-align: center;
color: #af4b55;
font-weight: 600;
margin-top: 365px;
font-size: 25px;
}
#login_img p i{
font-style: normal;
margin-right: 45px;
}
#login_img p i:nth-last-child(1){
margin-right: 0;
}
/*提示*/
#hint{
width: 100%;
line-height: 70px;
background: linear-gradient(-90deg, #9b494d, #bf5853);
text-align: center;
font-size: 25px;
color: #fff;
box-shadow: 0 0 20px #733544;
display: none;
opacity: 0;
transition: .5s;
position: absolute;
top: 0;
z-index: 999;
}
/* 响应式 */
@media screen and (max-width:1000px ) {
#login_img{
display: none;
}
#login_wrap{
width: 490px;
margin-right: -245px;
}
#login{
width: 100%;
}
}
@media screen and (max-width:560px ) {
#login_wrap{
width: 330px;
margin-right: -165px;
}
#login span{
margin-left: -125px;
}
.form input{
width: 250px;
}
.btn{
width: 113px;
}
}
@media screen and (max-width:345px ) {
#login_wrap {
width: 290px;
margin-right: -145px;
}
}

@ -0,0 +1,442 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="#" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>手机登录</title>
<style>
*{
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
@font-face {
font-family: 'neo';
src: url("NEOTERICc.ttf")/*tpa=http://www.17sucai.com/preview/384665/2018-12-28/login/font/NEOTERICc.ttf*/;
}
input:focus{
outline: none;
}
.form input{
width: 300px;
height: 30px;
font-size: 18px;
background: none;
border: none;
border-bottom: 1px solid #fff;
color: #fff;
margin-bottom: 20px;
}
.form input::placeholder{
color: rgba(255,255,255,0.8);
font-size: 18px;
font-family: "neo";
}
.confirm{
height: 0;
overflow: hidden;
transition: .25s;
}
.btn{
width:140px;
height: 40px;
border: 1px solid #fff;
background: none;
font-size:20px;
color: #fff;
cursor: pointer;
margin-top: 25px;
font-family: "neo";
transition: .25s;
}
.btn:hover{
background: rgba(255,255,255,.25);
}
#login_wrap{
width: 980px;
min-height: 500px;
border-radius: 10px;
font-family: "neo";
overflow: hidden;
box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.25);
position: fixed;
top: 50%;
right: 50%;
margin-top: -250px;
margin-right: -490px;
}
#login{
width: 50%;
height: 100%;
min-height: 500px;
background: linear-gradient(45deg, #9a444e, #e06267);
position: relative;
float: right;
}
#login #status{
width: 90px;
height: 35px;
margin: 40px auto;
color: #fff;
font-size: 30px;
font-weight: 600;
position: relative;
overflow: hidden;
}
#login #status i{
font-style: normal;
position: absolute;
transition: .5s
}
#login span{
text-align: center;
position: absolute;
left: 50%;
margin-left: -150px;
top: 52%;
margin-top: -140px;
}
#login span a{
text-decoration: none;
color: #fff;
display: block;
margin-top: 80px;
font-size: 18px;
}
#bg{
background: linear-gradient(45deg, #211136, #bf5853);
height: 100%;
}
/*绘图*/
#login_img{
width: 50%;
min-height: 500px;
background: linear-gradient(45deg, #221334, #6c3049);
float: left;
position: relative;
}
#login_img span{
position: absolute;
display: block;
}
#login_img .circle{
width: 200px;
height: 200px;
border-radius: 50%;
background: linear-gradient(45deg, #df5555, #ef907a);
top: 70px;
left: 50%;
margin-left: -100px;
overflow: hidden;
}
#login_img .circle span{
width: 150px;
height: 40px;
border-radius: 50px;
position: absolute;
}
#login_img .circle span:nth-child(1){
top: 30px;
left: -38px;
background: #c55c59;
}
#login_img .circle span:nth-child(2){
bottom: 20px;
right: -35px;
background: #934555;
}
#login_img .star span{
background: radial-gradient(#fff 10%,#fff 20%,rgba(72, 34, 64, 0));
border-radius: 50%;
box-shadow: 0 0 7px #fff;
}
#login_img .star span:nth-child(1){
width: 15px;
height: 15px;
top: 50px;
left: 30px;
}
#login_img .star span:nth-child(2){
width: 10px;
height: 10px;
left: 360px;
top: 80px;
}
#login_img .star span:nth-child(3){
width: 5px;
height: 5px;
top: 400px;
left: 80px;
}
#login_img .star span:nth-child(4){
width: 8px;
height: 8px;
top: 240px;
left: 60px;
}
#login_img .star span:nth-child(5){
width: 4px;
height: 4px;
top: 20px;
left: 200px;
}
#login_img .star span:nth-child(6){
width: 4px;
height: 4px;
top: 460px;
left: 410px;
}
#login_img .star span:nth-child(7){
width: 6px;
height: 6px;
top: 250px;
left: 350px;
}
#login_img .fly_star span{
width: 90px;
height: 3px;
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: -o-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: linear-gradient(to right, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
transform: rotate(-45deg);
}
#login_img .fly_star span:nth-child(1){
top:60px;
left: 80px;
}
#login_img .fly_star span:nth-child(2){
top: 210px;
left: 332px;
opacity: 0.6;
}
#login_img p{
text-align: center;
color: #af4b55;
font-weight: 600;
margin-top: 365px;
font-size: 25px;
}
#login_img p i{
font-style: normal;
margin-right: 45px;
}
#login_img p i:nth-last-child(1){
margin-right: 0;
}
/*提示*/
#hint{
width: 100%;
line-height: 70px;
background: linear-gradient(-90deg, #9b494d, #bf5853);
text-align: center;
font-size: 25px;
color: #fff;
box-shadow: 0 0 20px #733544;
display: none;
opacity: 0;
transition: .5s;
position: absolute;
top: 0;
z-index: 999;
}
/* 响应式 */
@media screen and (max-width:1000px ) {
#login_img{
display: none;
}
#login_wrap{
width: 490px;
margin-right: -245px;
}
#login{
width: 100%;
}
}
@media screen and (max-width:560px ) {
#login_wrap{
width: 330px;
margin-right: -165px;
}
#login span{
margin-left: -125px;
}
.form input{
width: 250px;
}
.btn{
width: 113px;
}
}
@media screen and (max-width:345px ) {
#login_wrap {
width: 290px;
margin-right: -145px;
}
}
</style>
</head>
<body>
<div id="bg">
<div id="hint"><!-- 提示框 -->
<p>登录失败</p>
</div>
<div id="login_wrap">
<div id="login"><!-- 登录注册切换动画 -->
<div id="status">
<i style="top: 0"></i>
<i style="top: 35px"></i>
<i style="right: 5px"></i>
</div>
<span>
<form action=" ">
<p class="form"><input type="text" id="user" placeholder="手机号"></p>
<p class="form"><input type="password" id="passwd" placeholder="密码"></p>
<p class="form confirm"><input type="password" id="confirm-passwd" placeholder="验证码"></p>
<input type="button" value="登录" class="btn" onclick="login()" style="margin-right: 20px;">
<input type="button" value="发送验证码" class="btn" onclick="signin()" id="btn">
</form>
</span>
</div>
<div id="login_img"><!-- 图片绘制框 -->
<span class="circle">
<span></span>
<span></span>
</span>
<span class="star">
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
<span></span>
</span>
<span class="fly_star">
<span></span>
<span></span>
</span>
<p id="title">CLOUD</p>
</div>
</div>
</div>
</body>
<script>
var onoff = true//根据此布尔值判断当前为注册状态还是登录状态
var confirm = document.getElementsByClassName("confirm")[0]
//var user = document.getElementById("user")
//var passwd = document.getElementById("passwd")
//var con_pass = document.getElementById("confirm-passwd")
//自动居中title
var name_c = document.getElementById("title")
name = name_c.innerHTML.split("")
name_c.innerHTML = ""
for (i = 0; i < name.length; i++)
if (name[i] != ",")
name_c.innerHTML += "<i>" + name[i] + "</i>"
//引用hint()在最上方弹出提示
function hint() {
let hit = document.getElementById("hint")
hit.style.display = "block"
setTimeout("hit.style.opacity = 1", 0)
setTimeout("hit.style.opacity = 0", 2000)
setTimeout('hit.style.display = "none"', 3000)
}
//回调函数
/*function submit(callback) {
//if (passwd.value == con_pass.value) {
let request = new XMLHttpRequest()
let url = ""
request.open("post", url, true)
let data = new FormData()
data.append("user", user.value)
data.append("passwd", passwd.value)
request.onreadystatechange = function() {
if (this.readyState == 4) {
callback.call(this, this.response)
//console.log(this.responseText)
}
}
request.send(data)
}*/
/*else {
hit.innerHTML = "两次密码不同"
hitting()
}
}*/
//注册按钮
function signin() {
let status = document.getElementById("status").getElementsByTagName("i")
let hit = document.getElementById("hint").getElementsByTagName("p")[0]
if (onoff) {
confirm.style.height = 51 + "px"
status[0].style.top = 35 + "px"
status[1].style.top = 0
onoff = !onoff
} else {
/*if (!/^[A-Za-z0-9]+$/.test(user.value))
hit.innerHTML = "账号只能为英文和数字"
else if (user.value.length < 6)
hit.innerHTML = "账号长度必须大于6位"
else if (passwd.value.length < 6)
hit.innerHTML = "密码长度必须大于6位"
else if (passwd.value != con_pass.value)
hit.innerHTML = "两次密码不相等"
else if (passwd.value = con_pass.value) {
submit(function(res) {
if (res == "exist")
hit.innerHTML = "该账号已存在"
else if (res == true) {
hit.innerHTML = "账号注册成功,两秒后自动刷新页面"
setTimeout("window.location.reload()", 2000)
} else if (res == false)
hit.innerHTML = "账号注册失败"
})
}
hint()*/
}
}
//登录按钮
function login() {
if (onoff) {
/*let request = new XMLHttpRequest()
let url = ""
request.open("post", url, true)
let data = new FormData()
data.append("user", user.value)
data.append("passwd", passwd.value)
request.onreadystatechange = function() {
if (this.readyState == 4) {
if (this.responseText == false)
hint()
else
window.location.href = this.responseText;
}
}
request.send(data)*/
} else {
let status = document.getElementById("status").getElementsByTagName("i")
confirm.style.height = 0
status[0].style.top = 0
status[1].style.top = 35 + "px"
onoff = !onoff
}
}
</script>
</html>

@ -0,0 +1,274 @@
*{
margin: 0;
padding: 0;
}
html,
body {
height: 100%;
}
@font-face {
font-family: 'neo';
src: url("NEOTERICc-1.ttf")/*tpa=http://www.17sucai.com/preview/384665/2018-12-28/login/css/font/NEOTERICc.ttf*/;
}
input:focus{
outline: none;
}
.form input{
width: 300px;
height: 30px;
font-size: 18px;
background: none;
border: none;
border-bottom: 1px solid #fff;
color: #fff;
margin-bottom: 20px;
}
.form input::placeholder{
color: rgba(255,255,255,0.8);
font-size: 18px;
font-family: "neo";
}
.confirm{
height: 0;
overflow: hidden;
transition: .25s;
}
.btn{
width:140px;
height: 40px;
border: 1px solid #fff;
background: none;
font-size:20px;
color: #fff;
cursor: pointer;
margin-top: 25px;
font-family: "neo";
transition: .25s;
}
.btn:hover{
background: rgba(255,255,255,.25);
}
#login_wrap{
width: 980px;
min-height: 500px;
border-radius: 10px;
font-family: "neo";
overflow: hidden;
box-shadow: 0px 0px 120px rgba(0, 0, 0, 0.25);
position: fixed;
top: 50%;
right: 50%;
margin-top: -250px;
margin-right: -490px;
}
#login{
width: 50%;
height: 100%;
min-height: 500px;
background: linear-gradient(45deg, #9a444e, #e06267);
position: relative;
float: right;
}
#login #status{
width: 90px;
height: 35px;
margin: 40px auto;
color: #fff;
font-size: 30px;
font-weight: 600;
position: relative;
overflow: hidden;
}
#login #status i{
font-style: normal;
position: absolute;
transition: .5s
}
#login span{
text-align: center;
position: absolute;
left: 50%;
margin-left: -150px;
top: 52%;
margin-top: -140px;
}
#login span a{
text-decoration: none;
color: #fff;
display: block;
margin-top: 80px;
font-size: 18px;
}
#bg{
background: linear-gradient(45deg, #211136, #bf5853);
height: 100%;
}
/*绘图*/
#login_img{
width: 50%;
min-height: 500px;
background: linear-gradient(45deg, #221334, #6c3049);
float: left;
position: relative;
}
#login_img span{
position: absolute;
display: block;
}
#login_img .circle{
width: 200px;
height: 200px;
border-radius: 50%;
background: linear-gradient(45deg, #df5555, #ef907a);
top: 70px;
left: 50%;
margin-left: -100px;
overflow: hidden;
}
#login_img .circle span{
width: 150px;
height: 40px;
border-radius: 50px;
position: absolute;
}
#login_img .circle span:nth-child(1){
top: 30px;
left: -38px;
background: #c55c59;
}
#login_img .circle span:nth-child(2){
bottom: 20px;
right: -35px;
background: #934555;
}
#login_img .star span{
background: radial-gradient(#fff 10%,#fff 20%,rgba(72, 34, 64, 0));
border-radius: 50%;
box-shadow: 0 0 7px #fff;
}
#login_img .star span:nth-child(1){
width: 15px;
height: 15px;
top: 50px;
left: 30px;
}
#login_img .star span:nth-child(2){
width: 10px;
height: 10px;
left: 360px;
top: 80px;
}
#login_img .star span:nth-child(3){
width: 5px;
height: 5px;
top: 400px;
left: 80px;
}
#login_img .star span:nth-child(4){
width: 8px;
height: 8px;
top: 240px;
left: 60px;
}
#login_img .star span:nth-child(5){
width: 4px;
height: 4px;
top: 20px;
left: 200px;
}
#login_img .star span:nth-child(6){
width: 4px;
height: 4px;
top: 460px;
left: 410px;
}
#login_img .star span:nth-child(7){
width: 6px;
height: 6px;
top: 250px;
left: 350px;
}
#login_img .fly_star span{
width: 90px;
height: 3px;
background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: -o-linear-gradient(left, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
background: linear-gradient(to right, rgba(255, 255, 255, 0.67), rgba(255,255,255,0));
transform: rotate(-45deg);
}
#login_img .fly_star span:nth-child(1){
top:60px;
left: 80px;
}
#login_img .fly_star span:nth-child(2){
top: 210px;
left: 332px;
opacity: 0.6;
}
#login_img p{
text-align: center;
color: #af4b55;
font-weight: 600;
margin-top: 365px;
font-size: 25px;
}
#login_img p i{
font-style: normal;
margin-right: 45px;
}
#login_img p i:nth-last-child(1){
margin-right: 0;
}
/*提示*/
#hint{
width: 100%;
line-height: 70px;
background: linear-gradient(-90deg, #9b494d, #bf5853);
text-align: center;
font-size: 25px;
color: #fff;
box-shadow: 0 0 20px #733544;
display: none;
opacity: 0;
transition: .5s;
position: absolute;
top: 0;
z-index: 999;
}
/* 响应式 */
@media screen and (max-width:1000px ) {
#login_img{
display: none;
}
#login_wrap{
width: 490px;
margin-right: -245px;
}
#login{
width: 100%;
}
}
@media screen and (max-width:560px ) {
#login_wrap{
width: 330px;
margin-right: -165px;
}
#login span{
margin-left: -125px;
}
.form input{
width: 250px;
}
.btn{
width: 113px;
}
}
@media screen and (max-width:345px ) {
#login_wrap {
width: 290px;
margin-right: -145px;
}
}

@ -12,7 +12,7 @@ import java.util.List;
@Mapper
public interface auditMapper {
@Select("select * from audit where checkNum = #{checkNum}")
public Audit selectAudioByCheckNum(String checkNum);
public Audit selectAudioByCheckNum(int checkNum);
@Select("select * from audit")
public List<Audit> select();
@ -31,5 +31,5 @@ public interface auditMapper {
public void updateAudit(Audit audits);
@Delete("delete from audit where checkNum=#{checkNum}")
public void deleteAudit(String checkNum);
public void deleteAudit(int checkNum);
}

@ -9,7 +9,7 @@ import java.util.List;
public interface bankMapper {
@Select("select * from bank where bankNum = #{bankNum}")
public Bank selectBankByBankNum(String bankNum);
public Bank selectBankByBankNum(int bankNum);
@Select("select * from bank where bankName = #{bankName}")
public Bank selectBankByBankName(String bankName);

@ -0,0 +1,31 @@
package com.example.demo.Dao;
import com.example.demo.bean.ProductHistroy;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface productHistroyMapper {
@Select("select * from producthistroy where productNum = #{productNum}")
public ProductHistroy selectAudioByCheckNum(int productNum);
@Select("select * from producthistroy")
public List<ProductHistroy> select();
@Insert("insert into productHistroy(productNum, productName, category, " +
"intrate, bankNum, productDescription, uploadTime, deleteTime, alterTime)" +
" values (#{productNum},#{productName},#{category},#{intrate},#{bankNum}," +
"#{productDescription},#{uploadTime},#{deleteTime},#{alterTime})")
public void addProductHistroy(ProductHistroy productHistroys);
// @Update("update producthistroy set productNum=#{productNum},productName=#{productName}" +
// ",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
// "productDescription=#{productDescription},uploadTime=#{uploadTime},deleteTime=#{deleteTime}," +
// "alterTime=#{alterTime}where productNum=#{productNum}")
// public void updateProductHistroy(ProductHistroy productHistroys);
// @Delete("delete from producthistroy where productNum=#{productNum}")
// public void deleteProductHistroy(int productNum);
}

@ -8,13 +8,10 @@ import java.util.List;
@Mapper
public interface productMapper {
@Select("select * from product where productNum = #{productNum}")
public Product selectProductByProductNum(String productNum);
@Select("select intrate from product where productNum = #{productNum}")
public Product selectProductIntrateByProductNum(String productNum);
public Product selectProductByProductNum(long productNum);
@Select("select * from product where productName = #{productName}")
public Product selectProductByProductName(String productName);
public Product selectProductByProductName(long productName);
@Select("select * from product")
public List<Product> select();
@ -28,8 +25,8 @@ public interface productMapper {
@Update("update product set productNum=#{productNum},productName=#{productName}" +
",category=#{category},intrate=#{intrate},bankNum=#{bankNum}," +
"productDescription=#{productDescription},pictureAddress=#{pictureAddress}")
public void updateAudio(Product products);
public void updateProduct(Product products);
@Delete("delete from product where productNum=#{productNum}")
public void deleteAudio(String productNum);
public void deleteProduct(int productNum);
}

@ -0,0 +1,29 @@
package com.example.demo.Dao;
import com.example.demo.bean.Transaction;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface transMapper {
@Select("select * from transaction where transactionNum = #{transactionNum}")
public Transaction selectAudioByCheckNum(int transactionNum);
@Select("select * from transaction")
public List<Transaction> select();
@Insert("insert into transaction(transactionNum, payer, payee," +
" transactionTime, transactionAmount, note)" +
" values (#{transactionNum},#{payer},#{payee},#{transactionTime},#{transactionAmount}," +
"#{note})")
public void addTransaction(Transaction transactions);
@Update("update audio set transactionNum=#{transactionNum},payer=#{payer}" +
",payee=#{payee},transactionTime=#{transactionTime},transactionAmount=#{transactionAmount}," +
"note=#{note}")
public void updateTransaction(Transaction transactions);
@Delete("delete from audio where transactionNum=#{transactionNum}")
public void deleteTransaction(int transactionNum);
}

@ -1,8 +0,0 @@
package com.example.demo.Dao;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface transationMapping {
}

@ -0,0 +1,30 @@
package com.example.demo.Dao;
import com.example.demo.bean.UsageDate;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface usageDateMapper {
@Select("select * from usagedate where transactionNum = #{transactionNum}")
public UsageDate selectUsageDateByCheckNum(int checkNum);
@Select("select * from usagedate")
public List<UsageDate> select();
@Insert("insert into usagedate(checkNum, productNum, userNum," +
" bankAccount, bankNum, year, amount, startTime)" +
" values (#{checkNum},#{productNum},#{userNum},#{bankAccount},#{bankNum}," +
"#{year},#{amount},#{startTime})")
public void addUsageDate(UsageDate usageDate);
@Update("update usagedate set checkNum=#{checkNum},productNum=#{productNum}" +
",userNum=#{userNum},bankAccount=#{bankAccount},bankNum=#{bankNum}," +
"year=#{year},amount=#{amount},startTime=#{startTime}")
public void updateUsageDate(UsageDate usageDate);
@Delete("delete from usagedate where checkNum=#{checkNum}")
public void deleteUsageDate(int checkNum);
}

@ -1,7 +0,0 @@
package com.example.demo.Dao;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface usageDateMapping {
}

@ -0,0 +1,26 @@
package com.example.demo.Dao;
import com.example.demo.bean.UserBankIdentify;
import org.apache.ibatis.annotations.*;
import java.util.List;
@Mapper
public interface userBankIdentify {
@Select("select * from userbankidentify where userName = #{userName}")
public UserBankIdentify selectUsageDateByCheckNum(String userName);
@Select("select * from userBankIdentify")
public List<UserBankIdentify> select();
@Insert("insert into usagedate(userName, bankAccount, bankAccountIdentify)" +
" values (#{userName},#{bankAccount},#{bankAccountIdentify})")
public void addUserBankIdentify(UserBankIdentify userBankIdentifys);
@Update("update usagedate set userName=#{userName},bankAccount=#{bankAccount}" +
",bankAccountIdentify=#{bankAccountIdentify}")
public void updateUserBankIdentify(UserBankIdentify userBankIdentifys);
@Delete("delete from usagedate where userName=#{userName}")
public void deleteUserBankIdentify(String userName);
}

@ -8,7 +8,7 @@ import java.util.List;
@Mapper
public interface userMapper {
@Select("select * from user where userNum = #{userNum}")
public User selectUserByuserNum(String userNum);
public User selectUserByuserNum(int userNum);
@Select("select * from user")
public List<User> select();
@ -26,5 +26,5 @@ public interface userMapper {
public void updateUser(User users);
@Delete("delete from user where userNum=#{userNum}")
public void deleteUser(String userNum);
public void deleteUser(int userNum);
}

@ -1,103 +1,28 @@
package com.example.demo.bean;
import javax.persistence.*;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
@Getter
@Setter
@Entity
public class Audit {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private String checkNum;
private String userNum;
private float amount;
private int checkNum;
private int userNum;
private double amount;
private String applyTime;
private String bankAccount;
private int checkState;
private String contractNum;
private int contractNum;
private short isSignContract;
private String productNum;
private int productNum;
private int year;
private int equation;
public Audit(){};
public int getYear() {
return year;
}
public void setYear(int year) {
this.year = year;
}
public String getProductNum() {
return productNum;
}
public void setProductNum(String productNum) {
this.productNum = productNum;
}
public short getIsSignContract() {
return isSignContract;
}
public void setIsSignContract(short isSignContract) {
this.isSignContract = isSignContract;
}
public String getContractNum() {
return contractNum;
}
public void setContractNum(String contractNum) {
this.contractNum = contractNum;
}
public int getCheckState() {
return checkState;
}
public void setCheckState(int checkState) {
this.checkState = checkState;
}
public String getCheckNum() {
return checkNum;
}
public void setCheckNum(String checkNum) {
this.checkNum = checkNum;
}
public float getAmount() {
return amount;
}
public void setAmount(float amount) {
this.amount = amount;
}
public String getBankAccount() {
return bankAccount;
}
public void setBankAccount(String bankAccount) {
this.bankAccount = bankAccount;
}
public String getApplyTime() {
return applyTime;
}
public void setApplyTime(String applyTime) {
this.applyTime = applyTime;
}
public String getUserNum() {
return userNum;
}
public void setUserNum(String userNum) {
this.userNum = userNum;
}
}

@ -1,37 +1,18 @@
package com.example.demo.bean;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
@Getter
@Setter
@Entity
public class Bank {
private String bankNum;
private int bankNum;
private String bankName;
private String contact;//联系方式
public Bank(){};
public String getBankNum() {
return bankNum;
}
public void setBankNum(String bankNum) {
this.bankNum = bankNum;
}
public String getContact() {
return contact;
}
public void setContact(String contact) {
this.contact = contact;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
}

@ -1,15 +1,20 @@
package com.example.demo.bean;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Getter
@Setter
@Entity
public class Manager {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private String managerNum;
private int managerNum;
private String managerName;
private String managerPwd;
private String managerRight;
@ -17,43 +22,11 @@ public class Manager {
public Manager(){};
public String getTelephoneNum() {
return telephoneNum;
}
public void setTelephoneNum(String telephoneNum) {
this.telephoneNum = telephoneNum;
}
public String getManagerRight() {
return managerRight;
}
public void setManagerRight(String managerRight) {
this.managerRight = managerRight;
}
public String getManagerPwd() {
return managerPwd;
}
public void setManagerPwd(String managerPwd) {
this.managerPwd = managerPwd;
}
public String getManagerName() {
return managerName;
}
public void setManagerName(String managerName) {
this.managerName = managerName;
}
public String getManagerNum() {
public int getManagerNum() {
return managerNum;
}
public void setManagerNum(String managerNum) {
public void setManagerNum(int managerNum) {
this.managerNum = managerNum;
}
}

@ -1,24 +1,41 @@
package com.example.demo.bean;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Getter
@Setter
@Entity
public class Product {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private String productNum;
private int productNum;
private String productName;
private String category;
private float intrate;
private String bankNum;
private int bankNum;
private String productDescription;
private String pictureAddress;
public Product(){};
public String getProductName() {
return productName;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getPictureAddress() {
return pictureAddress;
}
@ -35,11 +52,11 @@ public class Product {
this.productDescription = productDescription;
}
public String getBankNum() {
public int getBankNum() {
return bankNum;
}
public void setBankNum(String bankNum) {
public void setBankNum(int bankNum) {
this.bankNum = bankNum;
}
@ -51,27 +68,15 @@ public class Product {
this.intrate = intrate;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getProductName() {
return productName;
public int getProductNum() {
return productNum;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductNum() {
return productNum;
}
public void setProductNum(String productNum) {
public void setProductNum(int productNum) {
this.productNum = productNum;
}
}

@ -0,0 +1,110 @@
package com.example.demo.bean;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
@Getter
@Setter
public class ProductHistroy {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int productNum;
private int bankNum;
private int managerNum;
private String productName;
private String category;
private float intrate;
private String productDescription;
private String upLoadTime;
private String deleteTime;
private String alterTime;
public ProductHistroy(){};
public int getManagerNum() {
return managerNum;
}
public void setManagerNum(int managerNum) {
this.managerNum = managerNum;
}
public int getProductNum() {
return productNum;
}
public void setProductNum(int productNum) {
this.productNum = productNum;
}
public String getAlterTime() {
return alterTime;
}
public void setAlterTime(String alterTime) {
this.alterTime = alterTime;
}
public String getDeleteTime() {
return deleteTime;
}
public void setDeleteTime(String deleteTime) {
this.deleteTime = deleteTime;
}
public String getUpLoadTime() {
return upLoadTime;
}
public void setUpLoadTime(String upLoadTime) {
this.upLoadTime = upLoadTime;
}
public String getProductDescription() {
return productDescription;
}
public void setProductDescription(String productDescription) {
this.productDescription = productDescription;
}
public float getIntrate() {
return intrate;
}
public void setIntrate(float intrate) {
this.intrate = intrate;
}
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public int getBankNum() {
return bankNum;
}
public void setBankNum(int bankNum) {
this.bankNum = bankNum;
}
}

@ -1,15 +1,20 @@
package com.example.demo.bean;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Getter
@Setter
@Entity
public class Transaction {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private String transaction;
private int transactionNum;
private String payer;
private String payee;
private float transactionTime;
@ -17,52 +22,4 @@ public class Transaction {
private String note;
public Transaction(){};
public String getNote() {
return note;
}
public void setNote(String note) {
this.note = note;
}
public float getTransactionAmount() {
return transactionAmount;
}
public void setTransactionAmount(float transactionAmount) {
this.transactionAmount = transactionAmount;
}
public float getTransactionTime() {
return transactionTime;
}
public void setTransactionTime(float transactionTime) {
this.transactionTime = transactionTime;
}
public String getPayee() {
return payee;
}
public void setPayee(String payee) {
this.payee = payee;
}
public String getPayer() {
return payer;
}
public void setPayer(String payer) {
this.payer = payer;
}
public String getTransaction() {
return transaction;
}
public void setTransaction(String transaction) {
this.transaction = transaction;
}
}

@ -7,12 +7,15 @@ import javax.persistence.Entity;
@Getter
@Entity
public class UsageDate {
private String checkNum;
private String productNum;
private String userNum;
private long checkNum;
private long productNum;
private long userNum;
private String bankAccount;
private String bankNum;
private int bankNum;
private int year;
private float amount;
private String startTime;
public UsageDate(){};
private int equation;
}

@ -1,15 +1,20 @@
package com.example.demo.bean;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Getter
@Setter
@Entity
public class User {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private String userNum;
private int userNum;
private String userName;
private String userPwd;
private String userRight;
@ -21,84 +26,4 @@ public class User {
private String registerTime;
public User(){};
public String getRegisterTime() {
return registerTime;
}
public void setRegisterTime(String registerTime) {
this.registerTime = registerTime;
}
public int getIsIdentify() {
return isIdentify;
}
public void setIsIdentify(int isIdentify) {
this.isIdentify = isIdentify;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getTelephoneNum() {
return telephoneNum;
}
public void setTelephoneNum(String telephoneNum) {
this.telephoneNum = telephoneNum;
}
public String getIdNum() {
return idNum;
}
public void setIdNum(String idNum) {
this.idNum = idNum;
}
public String getTrueName() {
return trueName;
}
public void setTrueName(String trueName) {
this.trueName = trueName;
}
public String getUserRight() {
return userRight;
}
public void setUserRight(String userRight) {
this.userRight = userRight;
}
public String getUserPwd() {
return userPwd;
}
public void setUserPwd(String userPwd) {
this.userPwd = userPwd;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserNum() {
return userNum;
}
public void setUserNum(String userNum) {
this.userNum = userNum;
}
}

@ -7,7 +7,7 @@ import javax.persistence.Entity;
@Getter
@Entity
public class UserBankIdentify {
private String userNum;
private String userName;
private String bankAccount;
private short bankAccountIdentify;
}

@ -0,0 +1,16 @@
package com.example.demo.circulator.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
public abstract class CirService {
@PostConstruct
public void init(){}
@Transactional //数据库与事物的一致性
public double NextCirculator(long checkNum){return 0;}
public double SumCirculator(long productNum,double amount,int year){return 0;}
}

@ -1,25 +0,0 @@
package com.example.demo.circulator.service;
import com.example.demo.Dao.auditMapper;
import com.example.demo.Dao.productMapper;
import com.example.demo.bean.Product;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
public class CirculatorService {
@Autowired
private productMapper productMapper;
private auditMapper auditMapper;
@PostConstruct
public void init(){}
@Transactional //数据库与事物的一致性
public double countSumCirculator(String userNum,String productNum,float amount,int year){
Product product = productMapper.selectProductIntrateByProductNum(productNum);
float intrate = product.getIntrate();
return intrate;
}
}

@ -0,0 +1,40 @@
package com.example.demo.circulator.service;
import com.example.demo.Dao.productMapper;
import com.example.demo.Dao.usageDateMapper;
import com.example.demo.bean.Product;
import com.example.demo.bean.UsageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
public class EPAIR_CirService extends CirService{
@Autowired
private usageDateMapper usageDateMapper;
private productMapper productMapper;
@Transactional //数据库与事物的一致性
public double NextCirculator(long checkNum){
UsageDate usageDate = usageDateMapper.selectUsageDateByCheckNum(checkNum);
int year = usageDate.getYear();
double amount = usageDate.getAmount();
long productNum = usageDate.getProductNum();
Product product = productMapper.selectProductByProductNum(productNum);
float intrate = product.getIntrate();
intrate /= 12;
int month = year*12;
double rep = Math.pow((1+intrate),month)/(Math.pow((1+intrate),month)-1);
double next_principal_and_interest = rep * intrate * amount;
return next_principal_and_interest;
}
public double SumCirculator(long productNum,double amount,int year){
Product product = productMapper.selectProductByProductNum(productNum);
float intrate = product.getIntrate();
double rep = Math.pow((1+intrate),year)/(Math.pow((1+intrate),year)-1);
double principal_and_interest = rep * intrate * amount * year;
return principal_and_interest;
}
}

@ -0,0 +1,43 @@
package com.example.demo.circulator.service;
import com.example.demo.Dao.productMapper;
import com.example.demo.Dao.usageDateMapper;
import com.example.demo.bean.Product;
import com.example.demo.bean.UsageDate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.PostConstruct;
public class EPR_CirService extends CirService{
@Autowired
private usageDateMapper usageDateMapper;
private productMapper productMapper;
@Transactional //数据库与事物的一致性
public double NextCirculator(long checkNum){
UsageDate usageDate = usageDateMapper.selectUsageDateByCheckNum(checkNum);
int year = usageDate.getYear();
double amount = usageDate.getAmount();
long productNum = usageDate.getProductNum();
Product product = productMapper.selectProductByProductNum(productNum);
float intrate = product.getIntrate();
double rep_amount = 0;
intrate /= 12;
int month = year*12;
double next_principal_and_interest = amount/month + (amount - rep_amount) * intrate;
return next_principal_and_interest;
}
public double SumCirculator(long productNum,double amount,int year){
Product product = productMapper.selectProductByProductNum(productNum);
float intrate = product.getIntrate();
intrate /= 12;
int month = year * 12;
double first_principal_and_interest = amount/month + amount*intrate;
double last_principal_and_interest = amount/month + amount*(1-(month-1)/month)*intrate;
double principal_and_interest = (first_principal_and_interest + last_principal_and_interest)*month/2;
return principal_and_interest;
}
}

@ -0,0 +1,36 @@
package com.example.demo.circulator.service.controller;
import com.example.demo.circulator.service.CirService;
import com.example.demo.circulator.service.EPAIR_CirService;
import com.example.demo.circulator.service.EPR_CirService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
public class NextCirController {
//@Autowired
private CirService cirService;
@GetMapping("/cir/next")
public String nextCirculator(HttpServletRequest request,HttpServletResponse response){
long checkNum = (Long)request.getAttribute("checkNum");
int equation = (Integer)request.getAttribute("equation");
switch (equation){
case 1:
cirService = new EPAIR_CirService();
break;
case 2:
cirService = new EPR_CirService();
break;
default:
System.out.println("not exit");
break;
}
double next_principal_and_intrate = cirService.NextCirculator(checkNum);
request.setAttribute("next",next_principal_and_intrate);
return "/next";
}
}

@ -0,0 +1,39 @@
package com.example.demo.circulator.service.controller;
import com.example.demo.circulator.service.CirService;
import com.example.demo.circulator.service.EPAIR_CirService;
import com.example.demo.circulator.service.EPR_CirService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@Controller
public class SumCirController {
//@Autowired
private CirService cirService;
@GetMapping("/cir/sum")
public String SumCirculator(HttpServletRequest request, HttpServletResponse response){
long productNum = Long.parseLong(request.getParameter("productNum"));
double amount = Double.parseDouble(request.getParameter("amount"));
int year = Integer.parseInt(request.getParameter("year"));
int equation = Integer.parseInt(request.getParameter("equation"));
switch (equation){
case 1:
cirService = new EPAIR_CirService();
break;
case 2:
cirService = new EPR_CirService();
break;
default:
System.out.println("not exit");
break;
}
double sum_principal_and_intrate = cirService.SumCirculator(productNum,amount,year);
request.setAttribute("sum",sum_principal_and_intrate);
return "/circulator";
}
}

@ -1,4 +0,0 @@
package com.example.demo.circulator.service.controller;
public class SumCirculatorController {
}

@ -0,0 +1,46 @@
package com.example.demo.productService.controller;
import com.example.demo.bean.Product;
import com.example.demo.productService.tools.addPro;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
import org.springframework.stereotype.Controller;
@Controller
public class addController extends HttpServlet {
Product product;
addPro addPro;
@RequestMapping("/addproduct")
public String doPost(HttpServletResponse response,HttpServletRequest request){
PrintWriter writer=null;
try{
product.setProductNum(Integer.parseInt(request.getParameter("productNum")));
product.setProductName(request.getParameter("productName"));
product.setBankNum(Integer.parseInt(request.getParameter("bankNum")));
product.setCategory(request.getParameter("productName"));
product.setIntrate(Integer.parseInt(request.getParameter("intrate")));
product.setProductDescription(request.getParameter("description"));
product.setPictureAddress(request.getParameter("address"));
int result= addPro.add(product);
response.setContentType("text/hmtl;charset=utf-8");
writer=response.getWriter();
if(result==1){
writer.write("增加成功");
return "/";//返回增加删除修改的总页面
}
writer.write("增加失败");
return "/";//返回增加的页面
}catch(Exception e){
e.printStackTrace();
}finally {
if(writer!=null){
writer.close();
}
}
return "页面出错";
}
}

@ -0,0 +1,40 @@
package com.example.demo.productService.controller;
import com.example.demo.bean.Product;
import com.example.demo.productService.tools.deletePro;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
@Controller
public class deleteController {
Product product;
deletePro deletes;
@RequestMapping("/deleteproduct")
public String doPost(HttpServletResponse response, HttpServletRequest request){
PrintWriter writer=null;
try{
int productNum=Integer.parseInt(request.getParameter("productNum"));
int result= deletes.delete(productNum);
response.setContentType("text/hmtl;charset=utf-8");
writer=response.getWriter();
if(result==1){
writer.write("删除成功");
return "/";//返回增加删除修改的总页面
}
writer.write("删除失败");
return "/";//返回删除的页面
}catch(Exception e){
e.printStackTrace();
}finally {
if(writer!=null){
writer.close();
}
}
return "页面出错";
}
}

@ -0,0 +1,46 @@
package com.example.demo.productService.controller;
import com.example.demo.bean.Product;
import com.example.demo.productService.tools.updatePro;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
@Controller
public class updateController {
Product product;
updatePro updatePro;
@RequestMapping("/updateproduct")
public String doPost(HttpServletResponse response, HttpServletRequest request){
PrintWriter writer=null;
try{
product.setProductNum(Integer.parseInt(request.getParameter("productNum")));
product.setProductName(request.getParameter("productName"));
product.setBankNum(Integer.parseInt(request.getParameter("bankNum")));
product.setCategory(request.getParameter("productName"));
product.setIntrate(Integer.parseInt(request.getParameter("intrate")));
product.setProductDescription(request.getParameter("description"));
product.setPictureAddress(request.getParameter("address"));
int result= updatePro.update(product);
response.setContentType("text/hmtl;charset=utf-8");
writer=response.getWriter();
if(result==1){
writer.write("修改成功");
return "/";//返回增加删除修改的总页面
}
writer.write("修改失败");
return "/";//返回修改的页面
}catch(Exception e){
e.printStackTrace();
}finally {
if(writer!=null){
writer.close();
}
}
return "页面出错";
}
}

@ -0,0 +1,27 @@
package com.example.demo.productService.tools;
import com.example.demo.Dao.productHistroyMapper;
import com.example.demo.Dao.productMapper;
import com.example.demo.bean.Product;
import com.example.demo.bean.ProductHistroy;
public class addPro {
private com.example.demo.productService.tools.nowTime nowTime;
private productMapper productMapper;
private productHistroyMapper proHisMapper;
private ProductHistroy productHistroy;
public int add(Product product1){
productMapper.addProduct(product1);
productHistroy.setProductNum(product1.getProductNum());
productHistroy.setProductName(product1.getProductName());
productHistroy.setBankNum(product1.getBankNum());
productHistroy.setCategory(product1.getCategory());
productHistroy.setIntrate(product1.getIntrate());
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
productHistroy.setProductDescription(product1.getProductDescription());
productHistroy.setUpLoadTime(nowTime.nowTime());
proHisMapper.addProductHistroy(productHistroy);
return 1;
}
}

@ -0,0 +1,21 @@
package com.example.demo.productService.tools;
import com.example.demo.Dao.productHistroyMapper;
import com.example.demo.bean.Product;
import com.example.demo.bean.ProductHistroy;
public class deletePro {
private com.example.demo.productService.tools.nowTime nowTime;
private com.example.demo.Dao.productMapper productMapper;
private productHistroyMapper proHisMapper;
private ProductHistroy productHistroy;
public int delete(int productNum){
productMapper.deleteProduct(productNum);
productHistroy.setProductNum(productNum);
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
productHistroy.setUpLoadTime(nowTime.nowTime());
proHisMapper.addProductHistroy(productHistroy);
return 1;
}
}

@ -0,0 +1,14 @@
package com.example.demo.productService.tools;
import java.util.Date;
import java.text.SimpleDateFormat;
public class nowTime{
public String nowTime(){
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
String time=(String)df.format(new Date());
return time;
}
}

@ -0,0 +1,27 @@
package com.example.demo.productService.tools;
import com.example.demo.Dao.productHistroyMapper;
import com.example.demo.Dao.productMapper;
import com.example.demo.bean.Product;
import com.example.demo.bean.ProductHistroy;
public class updatePro {
private com.example.demo.productService.tools.nowTime nowTime;
private productMapper productMapper;
private productHistroyMapper proHisMapper;
private ProductHistroy productHistroy;
public int update(Product product1){
productMapper.updateProduct(product1);
productHistroy.setProductNum(product1.getProductNum());
productHistroy.setProductName(product1.getProductName());
productHistroy.setBankNum(product1.getBankNum());
productHistroy.setCategory(product1.getCategory());
productHistroy.setIntrate(product1.getIntrate());
//productHistroy.setManagerNum(); manager.setManagerNum();调用登陆里面的一个接口得到managerNum
productHistroy.setProductDescription(product1.getProductDescription());
productHistroy.setAlterTime(nowTime.nowTime());
proHisMapper.addProductHistroy(productHistroy);
return 1;
}
}
Loading…
Cancel
Save