Constructor
new Service()
Properties:
| Name | Type | Description |
|---|---|---|
extend |
string | Rsd.common.Object |
xtype |
string | service |
failureHandler |
string | function | 服务请求业务处理失败时事件处理 |
successHandler |
string | function | 服务请求业务处理成功时事件处理 |
errorHandler |
string | function | 服务请求发生错误时事件处理 |
completeHandler |
string | function | 服务请求完成事件处理 |
local |
object | 格式:{ method:'get',url:''}, |
server |
object | 格式:{ method:'get',url:''} |
isDemo |
boolean | 是demo版本 |
name |
string | 英文名称 |
text |
string | 中文名称 * |
- Source:
Methods
(static) request(data, callback, msg, timeout, routeArgs)
Parameters:
| Name | Type | Description |
|---|---|---|
data |
object | 作为Ajax对象请求时的参数中data属性(即远程方法的参数) |
callback |
function | 优先执行callback,返回true时,后续方法(success,failure)继续执行,返回false时,后续方法终止。 |
msg |
string | 提示信息 |
timeout |
number | 超时时长(毫秒) |
routeArgs |
object | 路由参数 |
- Source:
(static) testLocal()
本地模拟数据测试
- Source:
(static) testServer()
远程测试,支持批量数据测试
- Source: