feat: 微信小程序登录改造(手机号授权 + API前缀改为/mp-api + 隐私协议检查)
This commit is contained in:
@@ -11,6 +11,9 @@ export interface WxLoginResult {
|
||||
accessToken: string
|
||||
refreshToken: string
|
||||
userId: number
|
||||
openId: string
|
||||
mobile: string
|
||||
expiresTime: string
|
||||
}
|
||||
|
||||
/** 账号密码登录参数(降级方案) */
|
||||
|
||||
+3
-3
@@ -1,9 +1,9 @@
|
||||
import { get, post } from './request'
|
||||
import type { UserInfo, WxLoginResult, LoginParams } from './types'
|
||||
|
||||
/** 微信授权登录 */
|
||||
export function wxLogin(code: string): Promise<WxLoginResult> {
|
||||
return post<WxLoginResult>('/auth/wx-login', { code }, false)
|
||||
/** 微信小程序登录(loginCode + phoneCode) */
|
||||
export function wxLogin(data: { loginCode: string; phoneCode: string }): Promise<WxLoginResult> {
|
||||
return post<WxLoginResult>('/auth/wx-login', data, false)
|
||||
}
|
||||
|
||||
/** 账号密码登录(降级方案) */
|
||||
|
||||
Reference in New Issue
Block a user