diff --git a/denglu/denglu.js b/denglu/denglu.js index 7352baf..80e094a 100644 --- a/denglu/denglu.js +++ b/denglu/denglu.js @@ -1,52 +1,52 @@ -Page({ - formSubmit: function (e) { - wx.request({ - url: 'http://localhost:9527/zxlogin/login', - data: { - 'userid': e.detail.value.userid, - 'userpassword': e.detail.value.userpassword, - }, - header: { - "Content-Type": "application/x-www-form-urlencoded" - }, - - methods: { - method: "POST", - }, - success: function (res) { - console.log(res.data); - if (res.data == "111") { - wx.showModal({ - title: '登录消息', - content: '密码正确', - confirmColor: "rgba(253, 153, 65, 1)", - success: function (res) { - if (res.confirm) { - wx.switchTab({ - url: '../shouye/shouye', - }) - } - } - }) - } - else if (res.data == "100") { - wx.showModal({ - title: '登录消息', - content: '密码错误', - confirmColor: "rgba(253, 153, 65, 1)" - }) - } - else if (res.data == "001") { - wx.showModal({ - title: '登录消息', - content: '用户名不存在', - confirmColor: "rgba(253, 153, 65, 1)" - }) - } - }, - fail: function (res) { - console.log("失败"); - } - }) - } +Page({ + formSubmit: function (e) { + wx.request({ + url: 'http://localhost:9527/zxlogin/login', + data: { + 'userid': e.detail.value.userid, + 'userpassword': e.detail.value.userpassword, + }, + header: { + "Content-Type": "application/x-www-form-urlencoded" + }, + + methods: { + method: "POST", + }, + success: function (res) { + console.log(res.data); + if (res.data == "111") { + wx.showModal({ + title: '登录消息', + content: '登录成功', + confirmColor: "rgba(253, 153, 65, 1)", + success: function (res) { + if (res.confirm) { + wx.switchTab({ + url: '../shouye/shouye', + }) + } + } + }) + } + else if (res.data == "100") { + wx.showModal({ + title: '登录消息', + content: '密码错误', + confirmColor: "rgba(253, 153, 65, 1)" + }) + } + else if (res.data == "001") { + wx.showModal({ + title: '登录消息', + content: '用户名不存在', + confirmColor: "rgba(253, 153, 65, 1)" + }) + } + }, + fail: function (res) { + console.log("失败"); + } + }) + } }) \ No newline at end of file diff --git a/denglu/denglu.json b/denglu/denglu.json index af33de1..8835af0 100644 --- a/denglu/denglu.json +++ b/denglu/denglu.json @@ -1,6 +1,3 @@ { - - "component": true, - "usingComponents": {} } \ No newline at end of file diff --git a/denglu/denglu.wxml b/denglu/denglu.wxml index 91cf3b8..9e18f1c 100644 --- a/denglu/denglu.wxml +++ b/denglu/denglu.wxml @@ -1,15 +1,29 @@ -
- -学号 - - - -密码 - - - - + + + +
+ diff --git a/denglu/denglu.wxss b/denglu/denglu.wxss index 70e0127..cd76cca 100644 --- a/denglu/denglu.wxss +++ b/denglu/denglu.wxss @@ -1,59 +1,75 @@ -/* denglu/denglu.wxss */ -page { - background-image: url("http://qty83k.creatby.com/materials/143410/origin/21bbf9caec3fddab4b8304359e2b41bb_origin.jpg"); background-size: 375px 678px; - background-repeat: no-repeat; -} -.button1{ - width: 60%; - margin-top: 0rpx; - background-color:rgba(253, 153, 65, 0.67); - color: white; - border-radius: 98rpx; +page{ + height: 100%; +} + +.container { + height: 100%; display: flex; - flex-direction: row; - align-items: center; - justify-content: center; - margin-top: 140px; -} -.inputnumber{ - width:50%; - background-color: transparent; - height:1.6rem; - font-size: 18px; - margin-left: 15px; - margin-top: 100px; - display: inline; -border-width: 2px; -border-color: rgb(255, 255, 255); -border-style: solid; - color: #ffffff; -} -.inputpassword{ - width:50%; - background-color: transparent; - height:1.6rem; - font-size: 18px; - margin-left: 108px; - margin-top: -30px; - border-width: 2px; -border-color: rgb(255, 255, 255); -border-style: solid; - color: #ffffff; -} -.text1{ - width: 50px; - font-size: 23px; - color: #ffffff; - margin-left: 43px; - margin-top:100px; -} -.password{width: 50px; - font-size: 23px; - color: #ffffff; - margin-left: 43px; - margin-top:50px; + flex-direction: column; + padding: 0; + box-sizing: border-box; + background-color: #f2f2f2 +} + +/*登录图片*/ +.login-icon{ + flex: none; +} +.login-img{ + width: 750rpx; +} - } - - - +/*表单内容*/ +.login-from { + margin-top: 20px; + flex: auto; + height:100%; +} + +.inputView { + background-color: #fff; + line-height: 44px; +} +/*输入框*/ +.nameImage, .keyImage { + margin-left: 42px; + width: 14px; + height: 14px +} + +.loginLab { + margin: 15px 15px 15px 10px; + color: #545454; + font-size: 14px +} +.inputText { + flex: block; + float: right; + text-align: right; + margin-right: 22px; + margin-top: 11px; + color: #000; + font-size: 14px +} + +.line { + width: 100%; + height: 1px; + background-color: #cccccc; + margin-top: 1px; +} +/*按钮*/ +.loginBtnView { + width: 100%; + height: auto; + + margin-top: 0px; + margin-bottom: 0px; + padding-bottom: 0px; +} + +.loginBtn { + width: 80%; + margin-top: 35px; + background-color:rgb(253, 153, 65); +} diff --git a/image/123.jpg b/image/123.jpg new file mode 100644 index 0000000..7d605d9 Binary files /dev/null and b/image/123.jpg differ