forked from iod/ControlProxy
feat: change seach arg
This commit is contained in:
parent
635dcb0d48
commit
b0b3274a53
@ -68,15 +68,15 @@ module ShanxiRegistry{
|
||||
return executeContract("ShanxiRegistry","getRelationInfo",arg).result;
|
||||
}
|
||||
@ArgSchema({
|
||||
"!params" : [{
|
||||
"!type" : "string", "!keyword" : "integer"
|
||||
"!searchCondition" : [{
|
||||
"!type" : "string", "!value" : "integer"
|
||||
}], "count" : "integer", "offset" : "integer"
|
||||
})
|
||||
export function search(arg) {
|
||||
arg = convertArgToJson(arg);
|
||||
var req = {"id":"","attributes":{},"body":""};
|
||||
for (var i=0;i<arg.params.length;i++){
|
||||
req.attributes[arg.params[i].type] = arg.params[i].keyword;
|
||||
for (var i=0;i<arg.searchCondition.length;i++){
|
||||
req.attributes[arg.searchCondition[i].type] = arg.searchCondition[i].value;
|
||||
}
|
||||
req.attributes["offset"] = arg.offset;
|
||||
req.attributes["count"] = arg.count;
|
||||
|
Loading…
Reference in New Issue
Block a user