账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    请问$http.jsonp和$jsonp有何区别?
    35
    0
    使用$http.jsonp可以正常通,但是使用$jsonp就报错,this.$jsonp('http://suggestion.baidu.com/su', { params:{ wd:'王菲' }, jsonp:'cb' }).then(res => { console.log("res:",res) }).catch(err => { console.log(err) })使用$jsonp竟然使得不是jsonp格式的数据竟然也能跨域成功,好懵逼 //跨域成功 this.$jsonp('https://view.inews.qq.com/g2/getOnsInfo', { name:'disease_h5' }).then(res => { console.log("res:",res.data) }).catch(err => { console.log(err) })有时候又不行 //跨域失败 this.$jsonp('https://c.m.163.com/ug/api/wuhan/app/data/list-total', { // name:'disease_h5' }).then(res => { console.log("res:",res.data) }).catch(err => { console.log(err) })到底是什么神奇的事情?请赐教,不胜感激。
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 莫晓渡 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部