Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Bosn committed Mar 27, 2014
1 parent 7872321 commit e3d7615
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,3 +154,7 @@ http://www.taobao.com/getREST?{path}=delete

`{path}` 表示参数`path`会在RAP文档和开发环境进行接口对接时,需要考虑path参数,一般REST API会使用比较多。因为REST不同请求是通过参数区分的,比如getRest?path=delete, getRest?path=update, 而{path}表示两者为不同的接口。

### 最外层为数组的接口

需要在接口描述的开头增加一条指令:@type=array_map;@length=1
表示返回的最外层结构是数组,长度是1。
1 change: 1 addition & 0 deletions UPDATELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### rap v0.8.1 ###
* [BUG] 修复@行列 提出的KISSY complete的问题。 2014-03-27
* [功能] 请求链接添加新语法url?[callback]=foo,用以支持自定义的JSONP callback key。 2014-03-24
* [功能] 请求链接添加新语法url?{action}=update,用以支持REST_API的带参数查询接口的功能。 2014-03-20
* [BUG] 修复pageTester控制台请求链接带参数时的请求路径错误。 2014-03-20
Expand Down
12 changes: 10 additions & 2 deletions WebContent/stat/js/util/mock.plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,20 @@
if (route(url) && projectId) {
rapUrlConverterJQuery(oOptions);
var oldSuccess = oOptions.success;
oOptions.success = function(data) {
oldSuccess && (oOptions.success = function(data) {
if (PREFIX == '/mockjs/') {
data = Mock.mock(data);
}
oldSuccess.apply(this, arguments);
};
});

var oldComplete = oOptions.complete;
oldComplete && (oOptions.complete = function(data) {
if (PREFIX == '/mockjs/') {
data = Mock.mock(data);
}
oldComplete.apply(this, arguments);
});
} else if(isInWhiteList(url) && !oOptions.RAP_NOT_TRACK) {
var checkerOptions = {url : oOptions.url};
rapUrlConverterJQuery(checkerOptions);
Expand Down
16 changes: 16 additions & 0 deletions src/database/scripts.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- recent projects

SELECT p.name projectName, u.name userName, p.create_date projectCreateTime, p.introduction
FROM tb_project p
JOIN tb_user u ON p.user_id = u.id
ORDER BY p.id DESC

-- recent users

SELECT *
FROM tb_user
ORDER BY id DESC

-- counters
SELECT COUNT(*) userNum FROM tb_user;
SELECT COUNT(*) projectNum FROM tb_project;

0 comments on commit e3d7615

Please sign in to comment.