> For the complete documentation index, see [llms.txt](https://lizh.gitbook.io/knowledge/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lizh.gitbook.io/knowledge/bugs/99-qi-ta-wen-ti-hui-zong.md).

# 其他问题汇总

### 修改hosts文件

**文件位置：**

* Windows：`C:\Windows\System32\drivers\etc\hosts`
* Mac：`/etc/hosts`

**清除DNS缓存：**

* Winodws：打开CMD，输入`ipconfig /flushdns`（刷新）、`ipconfig /displaydns`（查看）
* Linux：在终端运行， `sudo killall -HUP mDNSResponder`；
* 浏览器：Chrome 地址栏输入， `chrome://net-internals/#dns`，点击 `clear host cache`。

hosts 文件用记事本打开，一般需要管理员权限才能修改；

可以将 hosts 文件复制出来，修改完成后，再替换到 etc 文件夹中；

也可以修改 hosts 文件的权限：右键hosts –> 属性 –> 安全 -> 编辑，添加【写入】权限。

### 避免使用 null 值

前端调用服务端接口时，尽量避免传递 null 值。因为，服务端使用架包解析接口传参时，可能会忽略值为 null 的字段。最终可能导致字段本该为 null，最终读取时为 undefined（即，直接不传该字段）。
