<html>
<body>
你好,我是public
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/0.20.0-0/axios.min.js"></script>
<script>
axios.get('http://localhost/jsapi')
.then((res)=>{
console.log(res)
})
</script>
</html>
请求如上页面,直接返回了如上代码,并没有console.log(res)
postman 不是浏览器,不会执行你的 script 的。