`crypto.randomUUID` 需要项目域名开启 `https`,本地使用 `localhost` 开发时会默认项目开启了 `https` 的所以可以用 `crypto.randomUUID` 这个方法。 如果测试环境的域名没有开启 `https` 的话,就会提示 `crypto.randomUUID is not a function`,可以改用其他的 `uuid` 生成方式。
阅读量:1
点赞量:0