|
@@ -31,6 +31,7 @@ export function drawLogo(text = '', len = 4) {
|
|
// 跳转到授权页面
|
|
// 跳转到授权页面
|
|
export function toAuthorization(appId, payload) {
|
|
export function toAuthorization(appId, payload) {
|
|
const type = payload.routePrefix.split('/')[2]
|
|
const type = payload.routePrefix.split('/')[2]
|
|
|
|
+ console.log(process.env.LOCALHOSE)
|
|
const url = `${process.env.LOCALHOSE}/auth?authUserId=${payload.authUserId}&type=${type}&appId=${appId}`
|
|
const url = `${process.env.LOCALHOSE}/auth?authUserId=${payload.authUserId}&type=${type}&appId=${appId}`
|
|
const redirect_uri = encodeURIComponent(url)
|
|
const redirect_uri = encodeURIComponent(url)
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|
|
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${redirect_uri}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
|