const appid = "wx2200e7e4afe036de"
const secret = "45328e91154e8a8b11b21112d9869f03";
$.ajax({
url: `https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${appid}&secret=${secret}`,
type: 'GET'
});
好像是跨域问题, 如何解决?
$.ajax可以配置跨域吗?
通过前端代码是解决不了的,有几种解决方法: