react中使用jsonp跨域
参考:https://blog.csdn.net/chunchun1230/article/details/104365700
页面中直接使用
import JsonP from 'jsonp' // JsonP的跨域请求 JsonP(res.data, { param: 'call_back' }, function (err, result) { console.log(err) console.log(result) })
参考: https://blog.csdn.net/houyanhua1/article/details/79702337?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
- 上一篇 »在JavaScript中使用AOP
- 下一篇 »javascript 跨域 的几种方法?