1.安装

npm install fetch-jsonp --save

2.导入

import fetchJsonp  from 'fetch-jsonp'

3.使用

fetchJsonp('http://',{
      method:'get'
    }).then(res=>{
      return res.json()
    }).then(data=>{			//请求成功
      console.log(data);  	//返回数据
    }).catch(error=>{		//请求失败

    })