|
@@ -23,7 +23,7 @@ public class LoginApi {
|
|
|
/**
|
|
|
* 登录(用户名,密码)
|
|
|
*
|
|
|
- * spi旧接口:user/login
|
|
|
+ * spi旧接口:/user/login
|
|
|
*
|
|
|
* @param mobileOrEmail 手机号或邮箱
|
|
|
* @param password 密码
|
|
@@ -37,6 +37,8 @@ public class LoginApi {
|
|
|
/**
|
|
|
* 微信授权登录(小程序)
|
|
|
*
|
|
|
+ * spi旧接口:/club/authorization
|
|
|
+ *
|
|
|
* @param code 微信授权code
|
|
|
* @param encryptedData 微信加密数据
|
|
|
* @param iv 加密算法的初始向量
|
|
@@ -49,7 +51,7 @@ public class LoginApi {
|
|
|
/**
|
|
|
* 微信公众号授权链接(www)
|
|
|
*
|
|
|
- * spi旧接口:user/authorizationLink
|
|
|
+ * spi旧接口:/user/authorizationLink
|
|
|
*
|
|
|
* @param redirectUri 用于微信授权的中间页面
|
|
|
* @param mode 授权方式:1静默授权,其他手动同意授权
|
|
@@ -62,7 +64,7 @@ public class LoginApi {
|
|
|
/**
|
|
|
* 微信公众号授权登录(www)
|
|
|
*
|
|
|
- * spi旧接口:user/authorizationLogin
|
|
|
+ * spi旧接口:/user/authorizationLogin
|
|
|
*
|
|
|
* @param code 微信code
|
|
|
* @param state 安全认证
|
|
@@ -76,12 +78,18 @@ public class LoginApi {
|
|
|
/**
|
|
|
* 微信扫码登录
|
|
|
*
|
|
|
- * spi旧接口:user/wechatLogin
|
|
|
+ * 流程:1.前端页面中先引入JS文件(支持https):http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js
|
|
|
+ * 2.前端实例化JS对象(用于生成二维码): new WxLogin({self_redirect:true, id:"login_container", appid:"", scope:"", redirect_uri:"", state:"", style:"", href: ""});
|
|
|
+ * 3.后端提供接口返回参数appid,scope,redirect_uri,其余参数由前端自定义,详细参考微信文档:https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
|
|
|
+ * 4.用户扫码:
|
|
|
+ *
|
|
|
+ *
|
|
|
+ * spi旧接口:/user/wechatLogin
|
|
|
*
|
|
|
* @param code 微信code
|
|
|
* @param state 安全认证
|
|
|
*/
|
|
|
- @GetMapping("/auth/qrCode")
|
|
|
+ @GetMapping("/auth/scan")
|
|
|
public void qrCodeAuthorization(String code, String state) {
|
|
|
loginService.qrCodeAuthorization(code, state);
|
|
|
}
|