| 1234567891011 |
- let webAuth = {}
- let appId = 'wxdad9b7d8e7750457';
- // let appId = 'wx8c652a58fa587178'; //测试号
- let scope = 'snsapi_userinfo'
- webAuth.getUserOpenid = (url) => {
- console.log("url",decodeURIComponent(url))
- window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${url}&response_type=code&scope=${scope}&state=STATE#wechat_redirect`
- }
- export default webAuth;
|