axios的配置项地址参考: https://www.npmjs.com/package/axios { // `url` is the server URL that will be used for the request url: '/user', // `method` is the request method to be used when making the request method: 'get', // default // `baseURL` will be prepen
今天骚凯问了一道变量名冲突的题目,感觉很有意思,顺便也复习一下预解析的一些知识,有不对的地方忘前辈大神指正,题目是这样的: var a=100; function a(){ console.log(a); } a(); 这个串代码执行完会报错 : a is not a function 问题来了,为什么会报这个错误呢? 这里涉及到函数和变量的预解析: 1)函数声明会置顶2)变量声明也会置顶3)函数声明比变量声明更置顶:(函数在变量上面)4)变量和赋值语句一起书写,在js引擎解析时,会将其拆成声
最近在开发中碰见一个问题,后端代码调用接口,在请求端参数没有任何问题,但是当接口接收到参数时,其中的加号全部变为了空格. 在查阅资料后发现是URLDecoder方法的问题,以下是URLDecoder的文档说明: The following rules are applied in the conversion: The alphanumeric characters "a" through "z", "A" through "Z&quo