From ab768b359d7eb252e65afc321f4d628f6547db63 Mon Sep 17 00:00:00 2001 From: welefen Date: Fri, 11 Oct 2013 23:05:12 +0800 Subject: [PATCH] by welefen --- App/Conf/route.js | 5 +++++ lib/Lib/Behavior/CheckRouteBehavior.class.js | 17 +++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 App/Conf/route.js create mode 100644 lib/Lib/Behavior/CheckRouteBehavior.class.js diff --git a/App/Conf/route.js b/App/Conf/route.js new file mode 100644 index 00000000..bbe0d806 --- /dev/null +++ b/App/Conf/route.js @@ -0,0 +1,5 @@ +module.exports = { + '/w/i': { + "get,post": "" + } +} \ No newline at end of file diff --git a/lib/Lib/Behavior/CheckRouteBehavior.class.js b/lib/Lib/Behavior/CheckRouteBehavior.class.js new file mode 100644 index 00000000..fde1e65c --- /dev/null +++ b/lib/Lib/Behavior/CheckRouteBehavior.class.js @@ -0,0 +1,17 @@ +/** + * 检测路由行为 + * 通过自定义路由识别到对应的URL上 + * @return {[type]} [description] + */ +var behavior = Behavior(function(){ + return { + options: { + 'url_route_on': false, //是否开启自定义URL路由 + 'url_route_rules': [] //自定义URL路由规则 + }, + run: function(){ + console.log(this.options); + } + } +}); +module.exports = behavior; \ No newline at end of file