Authored by weiqingting

提交

... ... @@ -99,6 +99,7 @@ module.exports = function (apiCofig) {
/*路由控制*/
var KLH = function (obj, method, guid) {
return function (req, res) {
console.log("我找到控制器了");
obj[method].call(obj, guid, req, res);
}
};
... ...
... ... @@ -49,6 +49,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
model=callback.apply(local, args);
}
if(view){
console.log("view1");
res.render(view,local,me.client(res,view,model,clientmodel));
}
... ... @@ -78,6 +79,7 @@ Controller.prototype.__define=function(method,router,view,apis,callback,clientmo
if (model&&model.readable) {
model.pipe(res);
}else if (view && method == "get" && !req.xhr) {
console.log("view2");
res.render(view, local, me.client(res, view, model,clientmodel));
} else {
res.json(model);
... ...