静默授权方式可登录微信官方平台,切换到开放平台,点击顶部菜单开发者平台,选择左侧菜单栏开发指南-微信授权登录-微信网页应用授权登录查看
通过https://open.weixin.qq.com/connect/oauth2/authorize方法静默获取授权时,如果通过接口请求的方式会出现跨域情况,

微信图片_2025-11-26_133129_511.png
解决办法是前端直接通过window.location.href进行该链接跳转,即window.location.href = https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx520c15f417810387&redirect_uri=https%3A%2F%2Fchong.qq.com%2Fphp%2Findex.php%3Fd%3D%26c%3DwxAdapter%26m%3DmobileDeal%26showwxpaytitle%3D1%26vb2ctag%3D4_2030_5_1194_60&response_type=code&scope=snsapi_base&state=123#wechat_redirect