mirror of
https://github.com/thinkjs/thinkjs.git
synced 2026-01-25 14:42:47 +00:00
19 lines
429 B
JavaScript
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");
|
|
}
|
|
}
|
|
}
|
|
}); |