Authored by weiqingting

提交

... ... @@ -4,6 +4,7 @@ module.exports=function(app) {
app.get("/login","common.Login");
app.get("/logout","common.Login",function (req) {
console.log("delete session");
delete req.session.user;
});
... ...
... ... @@ -139,6 +139,7 @@ module.exports = {
},
gray: function (req, callback,common) {
var result = { code: 201, message: "没有权限" };
console.log("session gray");
if (req.session && req.session.user) {
var user = req.session.user;
var path = req.route?req.route.path[0]:req.originalUrl.replace(/\?.+/, '');
... ...
... ... @@ -40,7 +40,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
var req = args[0], res = args[1];
console.log("session Controller");
var local = { __session__: req.session, $extend: {} };
/*如果接口不存在 就实现express 原来的方法*/
if(!apis.length){
... ...