摘要: //返回jsonp格式$callback = $_GET['callback'];$arr = array('error_code'=>'1');printf("%s(%s);", $callback, json_encode($arr)); //$arr为返回数据 阅读全文
posted @ 2021-08-02 16:01 qcjdp 阅读(188) 评论(0) 推荐(0) 编辑
摘要: get请求axios.get('/user', { params: { ID: 12345 } }) .then(function (response) { console.log(response); }) .catch(function (error) { console.log(error); 阅读全文
posted @ 2021-08-02 10:47 qcjdp 阅读(106) 评论(0) 推荐(0) 编辑
摘要: async 总是返回一个promise async function f() { return 1 } f().then(alert) // 1 我们也可以显式的返回一个promise,这个将会是同样的结果: async function f() { return Promise.resolve(1 阅读全文
posted @ 2021-08-02 10:22 qcjdp 阅读(60) 评论(0) 推荐(0) 编辑

Bill

Jerry

Evil