React中使用ajax的方法 1.安装 npm install axios --save 2.导入 import axios from ‘axios’ 3.react中使用 let res = await axios.get(‘路径’)