随笔 - 45,  文章 - 0,  评论 - 2,  阅读 - 30144

随笔分类 -  JavaScript

socket.io-client 连接失败
摘要:原因: socket.io-client 版本和服务器 socket.io 版本不匹配 socket.on('connect_error', e => { console.log('connect_error', e); }); 可输出看连接错误日志。 阅读全文
posted @ 2022-01-01 15:39 W1N9s 阅读(1684) 评论(0) 推荐(0) 编辑
XMLHttpRequest POST 传数组参数
摘要:传数组参数:xhr.send(JSON.stringify(Array)) const xhr = new XMLHttpRequest(); xhr.open('POST', '/test', true); // 设置请求头要放在 open 和 send 之间 xhr.setRequestHead 阅读全文
posted @ 2021-08-10 16:04 W1N9s 阅读(3186) 评论(0) 推荐(0) 编辑
axios下载文件,文件损坏,无法打开
摘要:下载 excel 文件,无法打开 原因:responseType: 'blob' 配置不正确 axios({ url: '/test', method: 'post', responseType: 'blob', data: {}, haeders: {}, }) .then((res) => { 阅读全文
posted @ 2021-08-10 15:58 W1N9s 阅读(1105) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示