微信授权逻辑修改
This commit is contained in:
@@ -14,6 +14,13 @@ export type WechatOAuthSession = {
|
||||
refreshToken?: string;
|
||||
};
|
||||
|
||||
export type WechatOAuthUserInfo = {
|
||||
openId: string;
|
||||
nickname?: string;
|
||||
headImgUrl?: string;
|
||||
unionId?: string;
|
||||
};
|
||||
|
||||
export type WechatPayNotifyResult = {
|
||||
transactionId: string;
|
||||
outTradeNo: string;
|
||||
@@ -36,6 +43,13 @@ export interface IWechatProvider {
|
||||
/** 公众号 H5 OAuth code 换 openId */
|
||||
oauth2AccessToken(code: string, actorRef?: { refType: string; refId: bigint }): Promise<WechatOAuthSession>;
|
||||
|
||||
/** 公众号 OAuth access_token 拉取用户昵称头像(snsapi_userinfo) */
|
||||
fetchOAuthUserInfo(
|
||||
accessToken: string,
|
||||
openId: string,
|
||||
actorRef?: { refType: string; refId: bigint },
|
||||
): Promise<WechatOAuthUserInfo>;
|
||||
|
||||
/** JSSDK 签名配置 */
|
||||
createJssdkConfig(url: string, actorRef?: { refType: string; refId: bigint }): Promise<WechatJssdkConfig>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user