const [REDIRECT_URI] = useState(encodeURIComponent("https://www.danghe.live/index.html"));
const url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${'wx61430451e4bbefe4'}&redirect_uri=${REDIRECT_URI}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`;
window.location.href = url;
是报错10003吗?能否看下你在公众号后台【网页授权域名】的配置?