MyService
单击此处,获取完整的操作列表。
UserLogin
用户登录(巡探--查询APP、Android、IOS、小程序)
参数:
string CompanyName:公司名称,加密
string UserName:用户名称,加密
string Password:密码,加密
string UserType:用户类型(1、单用户登录;2、经销商多用户登录(默认);),加密
返回结构:
public class LoginResult
{
public int Result; // 返回结果,错误代码
public int UserID; // 用户ID,数据库字段ID,唯一值
public string CardNo; // 当前登录用户卡号
public string UserName; // 当前登录用户名称
public int UserType; // 用户分类【0、管理员;1、普通用户;】
public string DeviceName; // 借用,实际上的值为“公司编码”
public int RouteCount; // 借用 RouteCount 保存当前公司是否拥有“Z-9000”的机器:0、没有;1、拥有;
public string UsersCardID; // 借用 UsersCardID 保存当前公司是否拥有“隐患相关的六大权限”,表现形式为:0,1,0,1,0,1, 【0、表示没有此权限;1、表示拥有;】
// 为一个字符串,以英文逗号 , 隔开,对应权限分别为:1、隐患录入;2、隐患处理;3、隐患审核;4、隐患浏览;5、隐患驳回;6、隐患统计;
public string jSonContent; // jSon 字符串,控制APP中按钮的 显示(true)/隐藏(false)
public string Message; // 错误信息
}
返回值:
| Result | 描述 |
|---|---|
| Result=0 | 执行成功,Message为Token数据 |
| Result=-1 | 程序错误,Message为错误信息 |
| Result=-2 | 公司不存在 |
| Result=-3 | 公司未启用 |
| Result=-4 | 当前公司使用到期 |
| Result=-5 | 经销商使用到期 |
| Result=-6 | 不存在合法的加密狗或证书 |
| Result=-7 | 设备使用超额 |
| Result=-8 | 登录用户不存在 |
| Result=-9 | 密码输入错误 |
测试
若要使用 HTTP POST 协议对操作进行测试,请单击“调用”按钮。SOAP 1.1
以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。
POST /MyService.asmx HTTP/1.1
Host: www.zooytech.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/UserLogin"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UserLogin xmlns="http://tempuri.org/">
<CompanyName>string</CompanyName>
<UserName>string</UserName>
<Password>string</Password>
<UserType>string</UserType>
</UserLogin>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<UserLoginResponse xmlns="http://tempuri.org/">
<UserLoginResult>string</UserLoginResult>
</UserLoginResponse>
</soap:Body>
</soap:Envelope>
SOAP 1.2
以下是 SOAP 1.2 请求和响应示例。所显示的占位符需替换为实际值。
POST /MyService.asmx HTTP/1.1
Host: www.zooytech.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<UserLogin xmlns="http://tempuri.org/">
<CompanyName>string</CompanyName>
<UserName>string</UserName>
<Password>string</Password>
<UserType>string</UserType>
</UserLogin>
</soap12:Body>
</soap12:Envelope>
HTTP/1.1 200 OK
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<UserLoginResponse xmlns="http://tempuri.org/">
<UserLoginResult>string</UserLoginResult>
</UserLoginResponse>
</soap12:Body>
</soap12:Envelope>
HTTP GET
以下是 HTTP GET 请求和响应示例。所显示的占位符需替换为实际值。
GET /MyService.asmx/UserLogin?CompanyName=string&UserName=string&Password=string&UserType=string HTTP/1.1 Host: www.zooytech.com
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/">string</string>
HTTP POST
以下是 HTTP POST 请求和响应示例。所显示的占位符需替换为实际值。
POST /MyService.asmx/UserLogin HTTP/1.1 Host: www.zooytech.com Content-Type: application/x-www-form-urlencoded Content-Length: length CompanyName=string&UserName=string&Password=string&UserType=string
HTTP/1.1 200 OK Content-Type: text/xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <string xmlns="http://tempuri.org/">string</string>