大麦柜运营商接口文档


运营商登录

<p><strong>简要描述:</strong> </p> <ul> <li>用户登录,登录成功后缓存用户数据、Token,使用Token请求后续接口</li> </ul> <p><strong>请求URL:</strong> </p> <ul> <li><code>http://dmg.nex-i.cn/v2/user/login</code></li> </ul> <p><strong>请求方式:</strong></p> <ul> <li>POST </li> </ul> <p><strong>请求头:</strong></p> <ul> <li>Content-Type:application/json</li> </ul> <p><strong>请求参数:</strong></p> <table> <thead> <tr> <th style="text-align: left;">名称</th> <th style="text-align: left;">字段</th> <th style="text-align: left;">类型</th> <th>必填</th> <th>默认</th> <th>示例</th> <th>备注</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">用户名</td> <td style="text-align: left;">username</td> <td style="text-align: left;">varchar(11)</td> <td>是</td> <td></td> <td>18912341234</td> <td></td> </tr> <tr> <td style="text-align: left;">密码</td> <td style="text-align: left;">password</td> <td style="text-align: left;">varchar(8-32)</td> <td>是</td> <td></td> <td>abc123</td> <td></td> </tr> </tbody> </table> <p><strong>请求示例:</strong></p> <pre><code>{ "phone":"18756900007", "password":"1231231", "deviceType": 1, "imei":"123" }</code></pre> <p><strong>返回示例:</strong></p> <pre><code>{ "code": 10000, "data": { "token": "LzcIoSkIEmoTioslTV0zSS0SR8oMcbRH", "user": { "id": 71, "pid": 0, "username": "长麦运营", "nickname": "", "company": "安徽长麦运营集团", "phone": "15221481365", "app_id": "", "order_fee": 0.1, "system_fee": 0, "domain": "", "money": -137.958, "device_groups": [], "devices": [], "scope": "40", "logo": "606451c5e06d2.png", "qr_logo": "606451c5e07c7.png", "shopping_image": "60b606949db64.jpg", "config": { "title": "安徽长麦运营集团", "service_phone": "4009902302", "notify_phone": "19966539692", "notify_email": "", "notifyUserId": "12,11,237", "thirdPartyVerify": "0", "order_verify": "1", "bottom_banner": "1", "stock_warning": "40" }, "status": 1, "create_time": 1610590129, "update_time": 1631006578, "freeze_money": 0 } }, "msg": "Success" }</code></pre> <p><strong>Java请求示例</strong> </p> <pre><code>OkHttpClient client = new OkHttpClient().newBuilder() .build(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "\"username\":\"长麦运营123\",\"password\":\"abc123\"}"); Request request = new Request.Builder() .url("http://admin.nex-i.cn/api/user/login") .method("POST", body) .addHeader("Content-Type", "application/json") .addHeader("token", "d2rtEKmiJzAXU7JMvxltnFMzmkPo5l8E") .build(); Response response = client.newCall(request).execute();</code></pre> <p><strong>备注</strong> </p> <ul> <li>更多返回错误代码请看首页的错误代码描述</li> </ul>

页面列表

ITEM_HTML