py-uni
Version:
py-uni
17 lines (12 loc) • 474 B
text/typescript
export class WeixinCommonService {
_openId: string = '';
get openId(): string {
return this._openId;
}
set openId(openId) {
this._openId = openId;
}
public getWXAuthorizeUrl(appid: string, url: string): string {
return `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(url)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`;
}
}