Skip to content

Commit

Permalink
前后端成功发送、获取登录信息
Browse files Browse the repository at this point in the history
  • Loading branch information
hauk0101 committed Aug 17, 2017
1 parent bf271e3 commit c03c7ff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/public/javascripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
function elementStatus() {

setClickable(elementOBJ.encrypt_btn, false);
setClickable(elementOBJ.login_btn,false);
//暂时打开登录
// setClickable(elementOBJ.login_btn,false);
setClickable(elementOBJ.play_btn,false);

//如果数据为空,则表示未进行任何操作
Expand Down
4 changes: 4 additions & 0 deletions app/routes/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ router.get('/encrypt', function (req, res) {
router.get('/login', function (req, res) {
res.render('login');
});
//权限登录处理
router.post('/login',function(req,res){
console.log("登录信息:",req.body);
});
//视频播放页面
router.get('/player', function (req, res) {
res.render('player');
Expand Down
2 changes: 1 addition & 1 deletion app/views/login.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</head>
<body>
<h2 align="center">视频加密原型图(HLS + NodeJS + FFmpeg) Demo —— 登录</h2>
<form method="post" enctype="text/plain" action="/login">
<form method="post" action="/login">
<label>用户名:</label>
<input name="username" type="text">
<label>密码:</label>
Expand Down

0 comments on commit c03c7ff

Please sign in to comment.