javascript - 如何动态获取项目区域的uuid
问题描述
我正在使用 window.parent.location.href ,通过它我可以实现当前页面(https://stackoverflow.com/questions/ask)完整的 url,但我的目的是获取该页面的 uuid 存在于其他网址,即(https://stackoverflow.com/questions/ask/id=_abcdes123)
var parentLink = (window.parent.location.href).toString();
if (parentLink.includes("play")) {
projectAreaContextId = '_FpM0wL8DEeOhU53HggnQSg'; //uuid for play
} else if(parentLink.includes("complay")) {
projectAreaContextId = '_t44MZaySEeSZm-Ey-wkoZw'; //uuid for complay
}
如果您看到我上面的代码,我正在尝试动态获取当前页面 url,但 projectareacontextid 是硬编码的,我也想动态获取,但是正如我提到的,项目区域的 uuid 不存在于当前页面 url 中,而是在下一页url,有什么办法可以实现吗,还有其他的api来获取项目区域的uuid吗?
解决方案
推荐阅读
- javascript - REACTJs:如何更改 Material-Table 中编辑和删除图标的颜色和大小?
- nginx - nginx冲突的服务器名称在语法错误上不清楚
- asp.net-core - 如何保存 quill 图像样式 mvc 核心?
- java - 如何在 ANTLR4 中一次修改所有规则的行为?
- amazon-web-services - 将数据从 AWS IoT 发送到数据库
- java - 使用 Spring Security 持久化登录操作
- java - log4j2新objectMessageAsJsonObject问题
- swift - 重新加载 UICollectionView viewForSupplementaryElementOfKind 而不重新加载 cellForItemAt
- react-native - REACT NATIVE:如何从 Stack-Navigator 中的 Tap-navigator 访问屏幕
- git - 独立合并/ git diff --no-index 的 3 路等效项