1 2 3 4 5 ··· 20 下一页
摘要: 问题描述 遇到了个诡异的事情。客户反馈他们想在线上 https 域名下,就是要访问 http 的链接,但是失败了。发出去的一直是 https 的 xhr 请求。 直接在控制台输入例子代码,就能看到 network 里发出去的链接的确是 https 的 var xhr = new XMLHttpReq 阅读全文
posted @ 2022-11-10 19:06 Ever-Lose 阅读(602) 评论(0) 推荐(0) 编辑
摘要: 工作中常常用 API 的入参是非必填的,而实例的属性因为有默认值而一定存在的情况,举个例子: type TestOptions = { num?: number str?: string hookFn?: () => string } const defaultOptions = { num: 1, 阅读全文
posted @ 2022-10-18 17:48 Ever-Lose 阅读(630) 评论(0) 推荐(0) 编辑
摘要: any 任意类型。即不作任何约束,编译时会跳过对其的类型检查。 表现: 可以被任意值所赋值 可以赋值给任意定义 访问一切这个变量下的属性或者方法都不会做检查而报错。 如下列的代码,均不对 test 变量做类型检查。 // 1. 可以被任意值所赋值 let test: any test = {} te 阅读全文
posted @ 2022-09-28 15:46 Ever-Lose 阅读(1079) 评论(0) 推荐(0) 编辑
摘要: nginx 转发的问题导致 vue ssr 出错 [Vue warn]: The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside , or missing . Bailing hydration and performing full client-side render. 阅读全文
posted @ 2021-03-10 11:30 Ever-Lose 阅读(2729) 评论(1) 推荐(0) 编辑
摘要: Could not find iPhone X simulator 本地装的 RN 0.57.8,node 8.11.0,xcode 11.5 找到 node-modules/react-native/local-cli/runIOS/findMatchSimulator.js 的这行 if (!v 阅读全文
posted @ 2020-07-22 11:17 Ever-Lose 阅读(572) 评论(0) 推荐(0) 编辑
摘要: 介绍 浏览器指纹简单来说就是获取浏览器一些具有辨识度的信息,计算得到的值,以此指纹信息可以对应此用户。辨识度的信息可以是 UA、时区、地理位置或者是你使用的语言等其他的参数,信息越多并且信息的区别度越大,越能决定浏览器指纹的准确性。 直接使用 fingerprint2 库 <script src=" 阅读全文
posted @ 2020-07-17 12:46 Ever-Lose 阅读(5280) 评论(0) 推荐(0) 编辑
摘要: 描述 浏览器控制台警告 A cookie associated with a cross-site resource at was set without the SameSite attribute 参见Chrome Platform Status 与 stackoverflow - SameSi 阅读全文
posted @ 2020-07-07 16:09 Ever-Lose 阅读(7453) 评论(3) 推荐(1) 编辑
摘要: 直接使用 api const urlencode = require('urlencode'); const text = '你好'; urlencode.encode(text, 'gbk').toLocaleLowerCase(); // '%c4%e3%ba%c3' urlencode.dec 阅读全文
posted @ 2020-06-24 18:20 Ever-Lose 阅读(3128) 评论(0) 推荐(0) 编辑
摘要: 设我们有这么一个数据希望能导出成为 csv 文件 const title = { name: '名字', age: '年龄', sex: '性别', city: '所在城市', weight: '体重', height: '身高', }; const body = [ { "name": "张三", 阅读全文
posted @ 2020-06-24 15:42 Ever-Lose 阅读(995) 评论(8) 推荐(0) 编辑
摘要: 报文 常见 GET 的报文如下 GET /index.html?name=everlose&age=28 HTTP/1.1 Host: localhost ...省略其他 request header 常见 POST 报文如下 POST /index.html HTTP/1.1 Host: loca 阅读全文
posted @ 2020-06-17 11:38 Ever-Lose 阅读(339) 评论(0) 推荐(0) 编辑
1 2 3 4 5 ··· 20 下一页