diff --git "a/\345\220\264\345\223\262\346\266\224/express\345\210\206\351\241\265/url\350\256\260\345\275\225.txt" "b/\345\220\264\345\223\262\346\266\224/express\345\210\206\351\241\265/url\350\256\260\345\275\225.txt" index 362353a4bec360dafab2d69b92aa9c3d07fa5383..0f92db5d0f15cdc9c430b055fca31de58bcd6065 100644 --- "a/\345\220\264\345\223\262\346\266\224/express\345\210\206\351\241\265/url\350\256\260\345\275\225.txt" +++ "b/\345\220\264\345\223\262\346\266\224/express\345\210\206\351\241\265/url\350\256\260\345\275\225.txt" @@ -1 +1 @@ -/api?page=1//api?page=1/favicon.ico/api?page=2/api?page=1 \ No newline at end of file +/api?page=1//api?page=1/favicon.ico/api?page=2/api?page=1//favicon.ico/api?page=1/favicon.ico/api?page=2/api?page=1/api?page=2/api?page=1/api?page=2/api?page=1/api?page=2/api?page=1/api?page=1/api?page=1/api?page=1/api?page=1/api?page=2/api?page=1 \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/config/conn.js" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/config/conn.js" index 31971c93e68c5644105bcfcc37a22d465e1e1a18..bb4470993f2f387cdb213ab842d5a92f3554c9e7 100644 --- "a/\345\220\264\345\223\262\346\266\224/snake 2.0/config/conn.js" +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/config/conn.js" @@ -1,7 +1,7 @@ module.exports = { host: 'localhost', user: 'root', - password: "root", + password: "123456", port: 3306, database: "snake_db" }; \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/controller/user/user.js" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/controller/user/user.js" index 49615b8e174378af3c36fd8490fd9e0f18236f07..01c5f7c2f83f4ae8af3635ba23fe49fb169f4b9e 100644 --- "a/\345\220\264\345\223\262\346\266\224/snake 2.0/controller/user/user.js" +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/controller/user/user.js" @@ -12,7 +12,7 @@ router.post("/login", (req, res) => {// 登陆接口 }) router.get("/register", (req, res) => {// 注册接口 - + }) module.exports = router; \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/css/login.css" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/css/index.css" similarity index 33% rename from "\345\220\264\345\223\262\346\266\224/snake 2.0/public/css/login.css" rename to "\345\220\264\345\223\262\346\266\224/snake 2.0/public/css/index.css" index 36e1b4901e78a3d1cd44f4b51db5380643cb6f84..8ba1849768086edb7029e4d5364a0c875aa0d939 100644 --- "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/css/login.css" +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/css/index.css" @@ -4,30 +4,48 @@ } body { - background-image: url("../images/login.png"); + background-image: url("../images/login.jpg"); + background-size: cover; + background-repeat: no-repeat; } .main { width: 400px; - height: 200px; + height: 250px; position: absolute; margin: auto; left: 0; right: 0; bottom: 0; top: 0; - background: linear-gradient(#ffffff,#757070, black); - border-radius: 50px; + perspective: 500px; } -.login { +.login, +.register { + width: 400px; + height: 250px; display: flex; flex-direction: column; justify-content: space-around; align-items: center; + border-radius: 20px; + box-shadow: inset 5px 5px 50px rgba(0, 0, 0, 0.096), + 5px 5px 20px rgba(0, 0, 0, 0.155), + 5px 15px 30px rgba(0, 0, 0, 0.3), + inset -5px -5px 15px rgba(255, 255, 255, 0.6); + position: absolute; + backface-visibility: hidden; + transition: 2s; + transform-style: preserve-3d; +} + +.register { + transform: rotateY(180deg); } -.login div { +.login div, +.register div { height: 50px; width: auto; } \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/login.html" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/login.html" index f9568d4cb88ebd3fabeab53b74920059988b65a7..1bf6775b7a6ddedb194f87108c914a811bdb7b7b 100644 --- "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/login.html" +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/login.html" @@ -1,25 +1,41 @@ + 登录页面 - + - + + -
+ +
+ +
+
+

用户注册

+
+
- \ No newline at end of file + + + + \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/register.html" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/register.html" deleted file mode 100644 index 31692bcc7c6d2474b2e5c8ed4655984b0284cd1b..0000000000000000000000000000000000000000 --- "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/html/register.html" +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - 用户注册 - - -

注册页

- - \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/images/login.jpg" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/images/login.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..647519e97d3c464885b1d85ad5e990b12d763945 Binary files /dev/null and "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/images/login.jpg" differ diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/images/mt.jpg" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/images/mt.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..853ce2a06bca82c70cd32dd7171206d54b13bd3a Binary files /dev/null and "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/images/mt.jpg" differ diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/login.js" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/index.js" similarity index 67% rename from "\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/login.js" rename to "\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/index.js" index c0b4b9545981088c240252c8f2970166734789a4..3eddf1e8da8adb4264e15a7a421320485e8d3f98 100644 --- "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/login.js" +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/index.js" @@ -1,5 +1,4 @@ $(document).ready(function () { - $("#login").click(function (even) { even.preventDefault(); $.ajax({ @@ -17,8 +16,12 @@ $(document).ready(function () { } }) }) - - $("#register").click(function () { - $(location).attr("href", "/register") - }) -}) \ No newline at end of file + let deg1 = -180, + deg2 = 0; + $(body).click(function () { + $(".login").css("transform", "rotateY(" + deg1 + "deg)"); + $(".register").css("transform", "rotateY(" + deg2 + "deg)"); + deg1 += -180; + deg2 -= 180; + }); +}) diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/snow.js" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/snow.js" new file mode 100644 index 0000000000000000000000000000000000000000..bc020c73d20d317ef5d29038e88b1ca4d04f9ef8 --- /dev/null +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/snow.js" @@ -0,0 +1,44 @@ + +let canvas = document.querySelector("canvas"); +let context = canvas.getContext("2d"); +let w = window.innerWidth; +let h = window.innerHeight; +canvas.width = w; +canvas.height = h; + +let num = 200; +let snows = []; +for (let i = 0; i < num; i++) { + snows.push({ + x: Math.random() * w, + y: Math.random() * h, + r: Math.random() * 3 + 1 + }) +} +function move() { + for (let i = 0; i < num; i++) { + let snow = snows[i]; + snow.x += Math.random() * 2 + 1; + snow.y += Math.random() * 2 + 1; + snow.x > w ? snow.x = 0 : ""; + snow.y > h ? snow.y = 0 : ""; + } +} +function draw() { + context.clearRect(0, 0, w, h); + context.beginPath(); + context.fillStyle = "rgb(255,255,255)"; + context.shadowColor = "rgb(255,255,255)"; + context.shadowBlur = 10; + + for (let i = 0; i < num; i++) { + let snow = snows[i]; + context.moveTo(snow.x, snow.y); + context.arc(snow.x, snow.y, snow.r, 0, Math.PI * 2); + } + context.fill(); + context.closePath(); + move(); +} +draw(); +setInterval(draw, 25); \ No newline at end of file diff --git "a/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/textUp.js" "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/textUp.js" new file mode 100644 index 0000000000000000000000000000000000000000..9e4b55f1e0648c865c53ad96971975c99928929a --- /dev/null +++ "b/\345\220\264\345\223\262\346\266\224/snake 2.0/public/js/textUp.js" @@ -0,0 +1,22 @@ +var body = document.getElementsByTagName('body')[0]; +var textArr = ["❤", "暴富", "变帅", "有钱", "健康", "平安", "顺风", "加油", "拼搏", "自律", "红红火火"]; +document.addEventListener('click', (e) => { + var ev = e || window.event; + var baseX = ev.pageX; + var baseY = ev.pageY; + var new_span = document.createElement('span'); + new_span.innerText = textArr[parseInt(Math.random() * textArr.length)] + new_span.style.position = 'fixed'; + new_span.style.left = baseX - 10 + 'px'; + new_span.style.top = baseY + 'px'; + new_span.style.color = 'RGB(' + parseInt(Math.random() * 255) + ',' + parseInt(Math.random() * 255) + ',' + parseInt(Math.random() * 255) + ')'; + body.appendChild(new_span); + var timer = window.setInterval(() => { + new_span.style.top = parseInt(window.getComputedStyle(new_span, null)['top']) - 2 + 'px'; + new_span.style.opacity = window.getComputedStyle(new_span, null)['opacity'] - 0.02; + }, 20); + window.setTimeout(() => { + window.clearInterval(timer); + body.removeChild(new_span); + }, 1000); +}, false); \ No newline at end of file