2022-38~39周(9.12-9.18) 项目问题整理

问题

1、swagger-parser 报错:cacth Circular $ref pointer found at xx

不支持嵌套引用参数,会导致栈溢出 Maximum call stack size exceeded
在这里插入图片描述

const doc = await swaggerParser.dereference(api, {
    dereference: {
      circular: false,
    },
  });

类似的还有prims:https://github.com/stoplightio/prism/issues/1456

2、对@types/har-format进行扩展声明

har结构
har在线解析网站
har.d.ts地址
generating-har-files-and-analyzing-web-requests

// shims.xx.d.ts 声明文件
import { Entry } from '@types/har-format';
declare module '@types/har-format' {
  export interface Entry {
    _resourceType: string;
  }
}

?? 4.4也不可以,但是自行添加声明;

3、err_name_not_resolved chrome

域名好像没找到解析ip,通常需要修复服务,也可以尝试清楚浏览器的数据再尝试;

4、uniapp中使用swiper时不显示不报错

flex布局会影响swiper组件,即便在外面套一层盒子也不起作用;不要把swiper写到有flex布局的盒子当中;

5、Failed to read the ‘localStorage’ property from ‘Window’: Access is denied for this document.

阻止第三方cookie,会导致无法使用本地存储系统操作;

打开浏览器 设置 -> 隐私设置和安全性(chrome://settings/cookies) -> Cookie及其他网站数据 -> 允许所有Cookie,关闭其他阻止选项(针对 Chrome 浏览器,其他浏览器 Cookie 设置的位置可能有所不同)

6、Mixed Content: The page at ‘https://xx’ was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ‘http://xxx’. This request has been blocked; the content must be served over HTTPS.

现代浏览器可能会阻止此类内容,或者显示关于此类内容的警告,提醒用户此页面包含不安全的内容。阻止混合内容的浏览器可能会首先尝试将该内容的连接从HTTP “升级”到HTTPS。https请求页面,也请求其他资源,保持一致即可;

随想

总结就是这样,错过了接下来就很难再回忆起,以后尽量避免;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值