thinkjs/web/App/Lib/Controller/Home/IndexController.js
2014-03-28 10:04:29 +08:00

19 lines
429 B
JavaScript

/**
* controller
* @return
*/
module.exports = Controller(function(){
return {
indexAction: function(){
this.display("index:index");
},
docAction: function(doc){
var viewFile = VIEW_PATH + "/Home/doc_" + doc + ".html";
if (isFile(viewFile)) {
this.display("doc:" + doc);
}else{
this.display("index:index");
}
}
}
});