【微信小程序】使用微信小程序openId登录
<h5>简要描述</h5>
<ul>
<li>使用微信小程序openId登录</li>
</ul>
<h5>请求URL</h5>
<ul>
<li><code>https://dev-app-finclip.azurewebsites.net/app/user/login/mplogin</code> </li>
</ul>
<h5>请求方式</h5>
<ul>
<li>post</li>
</ul>
<h5>请求参数示例</h5>
<pre><code>{
"openId": "oEM_X5cjRJGAVOz3z501SKtvXYxY"
}
</code></pre>
<h5>json字段说明</h5>
<table>
<thead>
<tr>
<th style="text-align: left;">字段名</th>
<th style="text-align: left;">必选</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">openId</td>
<td style="text-align: left;">是</td>
<td>string</td>
<td>微信小程序openId</td>
</tr>
</tbody>
</table>
<h5>成功返回示例</h5>
<pre><code>{
"code": 1000,
"message": "success",
"data": {
"id": 5,
"createTime": "2024-04-19 07:09:52",
"updateTime": "2024-04-19 07:09:52",
"email": "",
"openId": "oEM_X5cjRJGAVOz3z501SKtvXYxY",
"status": 1,
"userId": "LV6BYQWMTDSOIT",
"name": "",
"idCard": "",
"token": {
"expire": 86400,
"expireAt": 1714375170199,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1JlZnJlc2giOmZhbHNlLCJpZCI6NSwiY3JlYXRlVGltZSI6IjIwMjQtMDQtMTkgMDc6MDk6NTIiLCJ1cGRhdGVUaW1lIjoiMjAyNC0wNC0xOSAwNzowOTo1MiIsImVtYWlsIjoiIiwib3BlbklkIjoib0VNX1g1Y2pSSkdBVk96M3o1MDFTS3R2WFl4WSIsInN0YXR1cyI6MSwidXNlcklkIjoiTFY2QllRV01URFNPSVQiLCJuYW1lIjoiIiwiaWRDYXJkIjoiIiwiaWF0IjoxNzE0Mjg4NzcwLCJleHAiOjE3MTQzNzUxNzB9.oEWlnjWxxc-AvscKJznk-8hzdtmp1KGh96Nb6Q8_lQA",
"refreshExpire": 2592000,
"refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc1JlZnJlc2giOnRydWUsImlkIjo1LCJjcmVhdGVUaW1lIjoiMjAyNC0wNC0xOSAwNzowOTo1MiIsInVwZGF0ZVRpbWUiOiIyMDI0LTA0LTE5IDA3OjA5OjUyIiwiZW1haWwiOiIiLCJvcGVuSWQiOiJvRU1fWDVjalJKR0FWT3ozejUwMVNLdHZYWXhZIiwic3RhdHVzIjoxLCJ1c2VySWQiOiJMVjZCWVFXTVREU09JVCIsIm5hbWUiOiIiLCJpZENhcmQiOiIiLCJpYXQiOjE3MTQyODg3NzAsImV4cCI6MTcxNjg4MDc3MH0.GZT4XiRjEFhx2hbjaGDljx0Ue_fQWSVrbMH9Bk9gaAs"
}
}
}
</code></pre>
<h5>失败返回示例</h5>
<pre><code>{
"code": 1001,
"message": "登录失败"
}
</code></pre>
<h5>备注</h5>
<p>无</p>