POST User/LogonByUnionId
微信登录(根据openid获取token)
Request Information
URI Parameters
None.
Body Parameters
登录参数(只填openid)
LogonPars| Name | Description | Type | Additional information |
|---|---|---|---|
| phone |
手机号 |
string |
None. |
| pwd |
密码 |
string |
None. |
| unionid |
微信openid |
string |
None. |
Request Formats
application/json, text/json
Sample:
{
"code": "200",
"data": {
"phone": "sample string 1",
"pwd": "sample string 2",
"unionid": "sample string 3"
},
"msg": null
}
application/xml, text/xml
Sample:
<LogonPars xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HL.Basis.Web.Models.Parameter"> <phone>sample string 1</phone> <pwd>sample string 2</pwd> <unionid>sample string 3</unionid> </LogonPars>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
微信登录(根据openid获取token)
WXLoginResult| Name | Description | Type | Additional information |
|---|---|---|---|
| token |
token |
string |
None. |
| status |
状态(-1:没有账号需要完整登录,0:没有成员去添加成员,1:有成员之间用token登录) |
integer |
None. |
| phone |
手机 |
string |
None. |
Response Formats
application/json, text/json
Sample:
{
"code": "200",
"data": {
"token": "sample string 1",
"status": 2,
"phone": "sample string 3"
},
"msg": null
}
application/xml, text/xml
Sample:
<WXLoginResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/HL.Basis.Web.Models.Result"> <phone>sample string 3</phone> <status>2</status> <token>sample string 1</token> </WXLoginResult>