UNPKG

@shencom/api

Version:
23 lines (17 loc) 651 B
import { getInitializedApiConfig } from '../config'; /** 获取公众号JSSDK配置 */ export const ApiWechatGetConfig = (scid: string) => { const { url, http } = getInitializedApiConfig(); const api = `${url}/service-uaa/wechat/jsconfig`; return http.get<jWeixin.ConfigOptions>(api, { scid }); }; interface ReqWechatGetQrcode { /** 重定向链接 */ redirect: string; } /** 获取微信登录二维码 */ export const ApiWechatGetQrcode = (body: ReqWechatGetQrcode) => { const { url, http } = getInitializedApiConfig(); const api = `${url}/service-uaa/sys/user/qr/code`; return http.get<string>(api, { url: body.redirect }); };