index.js 384 B

12345
  1. import settings from "../../settings"
  2. export const getAuthen = () =>{
  3. const path = window.location.pathname === "/authen" ? "/" : window.location.pathname
  4. 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 +"#wechat_redirect"
  5. }