🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
<h2 style="text-align: center;">接口协议规则</h2> 传输方式:HTTP 数据格式:JSON 字符编码:UTF-8 <h2 style="text-align: center;">聚合登录流程</h2> <span data-v-380220c1="" class="float-right"><!----> <i data-v-380220c1="" id="full-page" class="el-icon-full-screen"></i></span></div> <div data-v-380220c1="" id="doc-body"><div data-v-380220c1="" id="page_md_content" class="page_content_main"><div data-v-380220c1="" id="editor-md" class="main-editor markdown-body editormd-html-preview"><!----><p><strong>Step1:获取跳转登录地址</strong><br>请求URL:<br><code>https://www.ss349.cn/connect.php?act=login&amp;appid={你的appid}&amp;appkey={你的appkey}&amp;type={登录方式}&amp;redirect_uri={返回地址}</code><br>其中登录方式对应值: </p> <div style="width: 100%;overflow-x: auto;"><table> <thead> <tr> <th style="width: 393px;">对应值</th> <th style="width: 393px;">登录方式名称</th> </tr> </thead> <tbody> <tr style="background-color: rgb(255, 255, 255);"> <td>qq</td> <td>QQ</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>wx</td> <td>微信</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>alipay</td> <td>支付宝</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>sina</td> <td>微博</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>baidu</td> <td>百度</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>huawei</td> <td>华为</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>xiaomi</td> <td>小米</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>google</td> <td>谷歌</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>microsoft</td> <td>微软</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>facebook</td> <td>Facebook</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>dingtalk</td> <td>钉钉</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>gitee</td> <td>Gitee</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>github</td> <td>GitHub</td> </tr> </tbody> </table></div> <p>返回格式:</p> <p>{<br> “code”: 0,<br> “msg”: “succ”,<br> “type”: “qq”,<br> “url”: “<a href="https://graph.qq.com/oauth2.0/XXXXXXXXXX">https://graph.qq.com/oauth2.0/XXXXXXXXXX</a>“<br>}</p> <p>返回参数说明:</p> <div style="width: 100%;overflow-x: auto;"><table> <thead> <tr> <th style="width: 195px;">参数名</th> <th style="width: 195px;">参数类型</th> <th style="width: 195px;">参数说明</th> <th style="width: 195px;">参数示例</th> </tr> </thead> <tbody> <tr style="background-color: rgb(255, 255, 255);"> <td>code</td> <td>int</td> <td>返回状态码</td> <td>0为成功,其它值为失败</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>msg</td> <td>string</td> <td>返回信息</td> <td>返回错误时的说明</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>type</td> <td>string</td> <td>登录方式</td> <td>qq</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>url</td> <td>string</td> <td>登录跳转地址</td> <td><a href="https://graph.qq.com/oauth2.0/XXXXXXXXXX">https://graph.qq.com/oauth2.0/XXXXXXXXXX</a></td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>qrcode</td> <td>string</td> <td>登录扫码地址</td> <td>此地址仅微信和支付宝返回</td> </tr> </tbody> </table></div> <p><strong>Step2:跳转到登录地址</strong><br>登录地址为上一步返回的url的值。 </p> <p><strong>Step3:登录成功会自动跳转到指定的redirect_uri,并跟上Authorization Code</strong><br>例如回调地址是:www.qq.com/my.php,则会跳转到:<br><code>http://www.qq.com/my.php?type=qq&amp;code=520DD95263C1CFEA0870FBB66E******</code> </p> <p><strong>Step4:通过Authorization Code获取用户信息</strong><br>请求URL: <code>https://www.ss349.cn/connect.php?act=callback&amp;appid={appid}&amp;appkey={appkey}&amp;type={登录方式}&amp;code={code}</code><br>返回格式:</p> <p>{<br> “code”: 0,<br> “msg”: “succ”,<br> “type”: “qq”,<br> “access_token”: “89DC9691E274D6B596FFCB8D43368234”,<br> “social_uid”: “AD3F5033279C8187CBCBB29235D5F827”,<br> “faceimg”: “<a href="https://thirdqq.qlogo.cn/g?b=oidb&amp;k=3WrWp3peBxlW4MFxDgDJEQ&amp;s=100&amp;t=1596856919">https://thirdqq.qlogo.cn/g?b=oidb&amp;k=3WrWp3peBxlW4MFxDgDJEQ&amp;s=100&amp;t=1596856919</a>“,<br> “nickname”: “大白”,<br> “location”: “XXXXX市”,<br> “gender”: “男”,<br> “ip”: “1.12.3.40”<br>}</p> <p>返回参数说明:</p> <div style="width: 100%;overflow-x: auto;"><table> <thead> <tr> <th style="width: 195px;">参数名</th> <th style="width: 195px;">参数类型</th> <th style="width: 195px;">参数说明</th> <th style="width: 195px;">参数示例</th> </tr> </thead> <tbody> <tr style="background-color: rgb(255, 255, 255);"> <td>code</td> <td>int</td> <td>返回状态码</td> <td>0为成功,2为未完成登录,其它值为失败</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>msg</td> <td>string</td> <td>返回信息</td> <td>返回错误时的说明</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>type</td> <td>string</td> <td>登录方式</td> <td>qq</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>social_uid</td> <td>string</td> <td>第三方登录UID</td> <td>AD3F5033279C8187CBCBB29235D5F827</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>access_token</td> <td>string</td> <td>第三方登录token</td> <td>89DC9691E274D6B596FFCB8D43368234</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>faceimg</td> <td>string</td> <td>用户头像</td> <td><a href="https://thirdqq.qlogo.cn/g?">https://thirdqq.qlogo.cn/g?</a>……</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>nickname</td> <td>string</td> <td>用户昵称</td> <td>消失的彩虹海</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>gender</td> <td>string</td> <td>用户性别</td> <td>男</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>location</td> <td>string</td> <td>用户所在地</td> <td>XXXXX市(仅限支付宝/微信返回)</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>ip</td> <td>string</td> <td>用户登录IP</td> <td>1.12.3.40</td> </tr> </tbody> </table></div> <p>获取用户信息接口</p> <p>在用户登录后的任意时间,可以请求以下接口再次查询用户的详细信息。 </p> <p>请求URL: <code>https://www.ss349.cn/connect.php?act=query&amp;appid={appid}&amp;appkey={appkey}&amp;type={登录方式}&amp;social_uid={social_uid}</code><br>social_uid就是用户的第三方登录UID,用于识别用户的唯一字段。 </p> <p>返回格式:</p> <p>{<br> “code”: 0,<br> “msg”: “succ”,<br> “type”: “qq”,<br> “social_uid”: “AD3F5033279C8187CBCBB29235D5F827”,<br> “access_token”: “89DC9691E274D6B596FFCB8D43368234”,<br> “nickname”: “大白”,<br> “faceimg”: “<a href="https://thirdqq.qlogo.cn/g?b=oidb&amp;k=ianyRGEnPZlMV2aQvvzg2uA&amp;s=100&amp;t=1599703185">https://thirdqq.qlogo.cn/g?b=oidb&amp;k=ianyRGEnPZlMV2aQvvzg2uA&amp;s=100&amp;t=1599703185</a>“,<br> “location”: “XXXXX市”,<br> “gender”: “男”,<br> “ip”: “1.12.3.40”<br>}</p> <p>返回参数说明:</p> <div style="width: 100%;overflow-x: auto;"><table> <thead> <tr> <th style="width: 195px;">参数名</th> <th style="width: 195px;">参数类型</th> <th style="width: 195px;">参数说明</th> <th style="width: 195px;">参数示例</th> </tr> </thead> <tbody> <tr style="background-color: rgb(255, 255, 255);"> <td>code</td> <td>int</td> <td>返回状态码</td> <td>0为成功,其它值为失败</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>msg</td> <td>string</td> <td>返回信息</td> <td>返回错误时的说明</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>type</td> <td>string</td> <td>登录方式</td> <td>qq</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>social_uid</td> <td>string</td> <td>第三方登录UID</td> <td>AD3F5033279C8187CBCBB29235D5F827</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>access_token</td> <td>string</td> <td>第三方登录token</td> <td>89DC9691E274D6B596FFCB8D43368234</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>faceimg</td> <td>string</td> <td>用户头像</td> <td><a href="https://thirdqq.qlogo.cn/g?">https://thirdqq.qlogo.cn/g?</a>……</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>nickname</td> <td>string</td> <td>用户昵称</td> <td>消失的彩虹海</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>gender</td> <td>string</td> <td>用户性别</td> <td>男</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>location</td> <td>string</td> <td>用户所在地</td> <td>XXXXX市(仅限支付宝/微信返回)</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>ip</td> <td>string</td> <td>用户登录IP</td> <td>1.12.3.40</td> </tr> </tbody> </table></div> </div></div> <!----></div></div> <h2 style="text-align: center;">获取用户信息</h2> <div data-v-380220c1="" id="doc-body"><div data-v-380220c1="" id="page_md_content" class="page_content_main" style="width: 95%;"><div data-v-380220c1="" id="editor-md" class="main-editor markdown-body editormd-html-preview"><!----><p>在用户登录后的任意时间,可以请求以下接口再次查询用户的详细信息。 </p> <p>请求URL: <code>https://www.ss349.cn/connect.php?act=query&amp;appid={appid}&amp;appkey={appkey}&amp;type={登录方式}&amp;social_uid={social_uid}</code><br>social_uid就是用户的第三方登录UID,用于识别用户的唯一字段。 </p> <p>返回格式:</p> <p>{<br> “code”: 0,<br> “msg”: “succ”,<br> “type”: “qq”,<br> “social_uid”: “AD3F5033279C8187CBCBB29235D5F827”,<br> “access_token”: “89DC9691E274D6B596FFCB8D43368234”,<br> “nickname”: “大白”,<br> “faceimg”: “<a href="https://thirdqq.qlogo.cn/g?b=oidb&amp;k=ianyRGEnPZlMV2aQvvzg2uA&amp;s=100&amp;t=1599703185">https://thirdqq.qlogo.cn/g?b=oidb&amp;k=ianyRGEnPZlMV2aQvvzg2uA&amp;s=100&amp;t=1599703185</a>“,<br> “location”: “XXXXX市”,<br> “gender”: “男”,<br> “ip”: “1.12.3.40”<br>}</p> <p>返回参数说明:</p> <div style="width: 100%;overflow-x: auto;"><table> <thead> <tr> <th style="width: 186px;">参数名</th> <th style="width: 186px;">参数类型</th> <th style="width: 186px;">参数说明</th> <th style="width: 186px;">参数示例</th> </tr> </thead> <tbody> <tr style="background-color: rgb(255, 255, 255);"> <td>code</td> <td>int</td> <td>返回状态码</td> <td>0为成功,其它值为失败</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>msg</td> <td>string</td> <td>返回信息</td> <td>返回错误时的说明</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>type</td> <td>string</td> <td>登录方式</td> <td>qq</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>social_uid</td> <td>string</td> <td>第三方登录UID</td> <td>AD3F5033279C8187CBCBB29235D5F827</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>access_token</td> <td>string</td> <td>第三方登录token</td> <td>89DC9691E274D6B596FFCB8D43368234</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>faceimg</td> <td>string</td> <td>用户头像</td> <td><a href="https://thirdqq.qlogo.cn/g?">https://thirdqq.qlogo.cn/g?</a>……</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>nickname</td> <td>string</td> <td>用户昵称</td> <td>消失的彩虹海</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>gender</td> <td>string</td> <td>用户性别</td> <td>男</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>location</td> <td>string</td> <td>用户所在地</td> <td>XXXXX市(仅限支付宝/微信返回)</td> </tr> <tr style="background-color: rgb(255, 255, 255);"> <td>ip</td> <td>string</td> <td>用户登录IP</td> <td>1.12.3.40</td> </tr> </tbody> </table></div> </div></div> <!----></div> <h2 style="text-align: center;">SDK下载</h2> <div data-v-380220c1="" id="editor-md" class="main-editor markdown-body editormd-html-preview"><!----><div class="card-body"><br><p>SDK版本:1.0</p><br><p><a href="https://www.ss349.cn/assets/files/SDK.zip">点击下载</a></p><br></div> </div>