<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
二维码在这里
<div id="weixin"></div>
</body>
<script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"/>
<script>
var obj = new WxLogin({
self_redirect:true,
id:"weixin",
appid: "这里的ID是没有问题的",
scope: "snsapi_login",
redirect_uri: encodeURIComponent("https://这里的接口也是没有问题的"),
state: "authWebDemo",
style: "black",
href: ""
});
</script>
</html>
先按照文档排查下
https://developers.weixin.qq.com/doc/oplatform/Website_App/WeChat_Login/Wechat_Login.html
F12看看控制台具体报什么错没有