node.js平台下利用cookie实现记住密码登陆(Express+Ejs+Mysql)

2020-06-17 07:03:23易采站长站整理

app.get("/",function(req,res){
if(req.cookies.user){
res.render("perCenter",{u_tel:req.cookies.user.user})
}else{
res.redirect("index.html");
}

});
app.post("/Login.do",per.doLogin);