import settings from "../../settings" export const getAuthen = () =>{ console.log(this) const path = window.location.pathname === "/authen" ? "/" : window.location.pathname const search = window.location.search.replace("?",".").replace(/&/g,"-").replace(/=/g,"_") window.location.href = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=" + settings.appId + "&redirect_uri=" + settings.url + "%2fauthen&response_type=code&scope=snsapi_userinfo&state="+ path + search +"#wechat_redirect" }