摘要:
//返回jsonp格式$callback = $_GET['callback'];$arr = array('error_code'=>'1');printf("%s(%s);", $callback, json_encode($arr)); //$arr为返回数据 阅读全文
摘要:
get请求axios.get('/user', { params: { ID: 12345 } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); 阅读全文
摘要:
async 总是返回一个promise async function f() { return 1 } f().then(alert) // 1 我们也可以显式的返回一个promise,这个将会是同样的结果: async function f() { return Promise.resolve(1 阅读全文