const appid = 'wxd3621xxxxxxxxx';
const redirect_uri = encodeURIComponent(`https://shop.xxxxxxxxxx.cn/test/appWeb/#/pages/research/register/login?timestamp=${Date.now()}`);
const scope = 'snsapi_userinfo'; // 授权作用域
const url =`https://open.weixin.qq.com/connect/oauth2/authorizeappid=${appid}&redirect_uri=${redirect_uri}&response_type=code&scope=${scope}&state=STATE#wechat_redirect`;
window.location.href = url;
这是代码,现在的问题是,我用uniapp运行项目,
然后打开用微信开发者工具打开返回code了,
或者用手机微信打开 http://192.168.1.111:8080/test/appWeb/,这个然后点复制链接,链接中也有code,
但是正式的授权后回调的路由中点击复制链接就没有code
