2021年8月10日

ES8——对象方法扩展

摘要: 属性名与属性值 let stu = { age: 110, name: "LLC", } console.log(Object.keys(stu)); //[ 'age', 'name' ] console.log(Object.values(stu)); //[ 110, 'LLC' ] cons 阅读全文

posted @ 2021-08-10 21:59 In-6026 阅读(42) 评论(0) 推荐(0) 编辑

ES8——await 和 async

摘要: ####async 用来声明 async 函数 async function demo() {} console.log(demo()); //Promise {<fulfilled>: undefined} 一个promise对象 await 表达式 await 必须放在 async 函数内 le 阅读全文

posted @ 2021-08-10 01:11 In-6026 阅读(42) 评论(0) 推荐(0) 编辑

ES7新特新——arr.includes()判断数组中是否存在某个值

摘要: #####在之前用的是indexOf() 存在就返回下标,不存在返回-1 #####arr.includes() 存在返回true,否则false 阅读全文

posted @ 2021-08-10 01:05 In-6026 阅读(183) 评论(0) 推荐(0) 编辑

2021年8月9日

ES6

摘要: ##let与var let不可以重复申明变量,但是var可以 let有块级作用域,var没有 { let name = "LLC"; } 在{}外部是拿不到name的 let不存在变量提升 let不影响作用域链 { console.log(sex); //undifined let name = " 阅读全文

posted @ 2021-08-09 22:36 In-6026 阅读(26) 评论(0) 推荐(0) 编辑

this指向

摘要: ##在函数调用中(指向window) function demo() { console.log(this); } demo(); //window ##在对象调用函数中(指向调用这个函数的对象) let Obj = { name: "LLC", say: function() { console. 阅读全文

posted @ 2021-08-09 01:57 In-6026 阅读(31) 评论(0) 推荐(0) 编辑

2021年8月7日

用集合+扩展运算符实现数组去重

摘要: let arr = [1, 1, 2, 2, 3, 4, 5]; let res = new Set(arr); console.log(res); //{1, 2, 3, 4, 5} let arr1 = [...res]; console.log(arr1); //[1, 2, 3, 4, 5] 阅读全文

posted @ 2021-08-07 19:11 In-6026 阅读(91) 评论(0) 推荐(0) 编辑

2021年7月31日

uniapp HBuilderX无线真机调试

摘要: uniapp HBuilderX 无线连接手机调试 cd 到 HBuilderX的adb目录 HBuilderX\plugins\launcher\tools\adbs Android设备开启USB调试,并且通过USB线连接到电脑。 cmd命令执行以下命令”adb tcpip 5555“ 使手机监听 阅读全文

posted @ 2021-07-31 17:10 In-6026 阅读(1617) 评论(0) 推荐(0) 编辑

2021年7月26日

path must be absolute or specify root to res.sendF

摘要: 转载于 express版本3.0之后就将path已经分离出来了。如下改动便可正确: res.sendFile('./static/index.html'); 改成: res.sendFile(path.join(__dirname, './static', 'index.html')); 然后你可能 阅读全文

posted @ 2021-07-26 20:43 In-6026 阅读(420) 评论(0) 推荐(0) 编辑

2021年7月25日

关于uniapp开发APP安卓真机调试post请求,后端收到前端的请求数据为空的问题

摘要: 目前我知道的解决方法是: uni.request({ url: baseUrl + "register/addUser", header: { 'content-type': 'application/json' //重点一application/json }, method: "POST", da 阅读全文

posted @ 2021-07-25 01:03 In-6026 阅读(657) 评论(0) 推荐(0) 编辑

2021年7月23日

框架express路由模块化

摘要: 来源:简书用户:菜的只能打代码 https://www.jianshu.com/p/ad6c0e58d020?utm_campaign=shakespeare&utm_content=note&utm_medium=seo_notes&utm_source=recommendation 阅读全文

posted @ 2021-07-23 23:54 In-6026 阅读(29) 评论(0) 推荐(0) 编辑

导航