http://localhost:3000/isystem/comprehensiveSafetysupervision/enterpriseEvaluation?tId=341502001获取当前地址tId的值用window.location.href方法
时间: 2024-09-21 08:05:00 浏览: 46
在这个URL字符串`http://localhost:3000/isystem/comprehensiveSafetysupervision/enterpriseEvaluation?tId=341502001`中,查询参数`tId`的值是`341502001`。如果你想要获取这个值并使用JavaScript的`window.location.href`方法,你可以使用以下代码:
```javascript
var tIdValue = window.location.search.split('tId=')[1].split('&')[0];
console.log(tIdValue); // 输出:341502001
// 如果你想直接修改地址栏中的tId值
var newTId = '新的tId值';
window.history.pushState(null, null, window.location.pathname + '?tId=' + newTId);
```
这段代码首先通过`window.location.search`获取查询字符串部分,然后解析出`tId`后面的值。如果需要更新`tId`,则使用`pushState`方法替换原地址中的`tId`。
相关问题
FAILED: CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o /usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_IOSTREAMS_DYN_LINK -DGFLAGS_IS_A_DLL=0 -I../cartographer -I. -I../ -isystem /usr/include/eigen3 -isystem /usr/include/lua5.2 -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -pthread -fPIC -Wall -Wpedantic -Werror=format-security -Werror=missing-braces -Werror=reorder -Werror=return-type -Werror=switch -Werror=uninitialized -O3 -DNDEBUG -std=gnu++11 -MD -MT CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o -MF CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o.d -o CMakeFiles/cartographer.transform.timestamped_transform_test.dir/cartographer/transform/timestamped_transform_test.cc.o -c ../cartographer/transform/timestamped_transform_test.cc In file included from ../cartographer/transform/timestamped_transform_test.cc:17: ../cartographer/transform/timestamped_transform.h:21:10: fatal error: cartographer/transform/proto/timestamped_transform.pb.h: No such file or directory 21 | #include "cartographer/transform/proto/timestamped_transform.pb.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. [44/380] Building CXX object CMakeFiles/cartographer.sensor.internal.voxel_filter_test.dir/cartographer/sensor/internal/voxel_filter_test.cc.o
根据你提供的错误信息,看起来是在编译过程中发生了一个错误。错误信息显示,在 `timestamped_transform_test.cc` 文件中的第17行引入的头文件 `cartographer/transform/timestamped_transform.h` 中,包含的另一个头文件 `cartographer/transform/proto/timestamped_transform.pb.h` 找不到。这可能是由于缺少相关的依赖或者路径配置错误导致的。
解决这个问题的方法是确保你已经正确安装了所需的依赖,并且在编译过程中正确设置了头文件搜索路径。你可以检查一下你的编译环境是否配置正确,特别是与 Cartographer 相关的依赖和头文件路径。另外,还可以确认一下是否有缺少其他必需的文件或库。
如果问题仍然存在,请提供更多关于你的编译环境和相关配置的信息,以便我能够更好地帮助你解决问题。
移植curl但是zlib无法使能,如何解决该问题 Host setup: arm-unknown-linux-gnueabihf Install prefix: /opt/rootfs/curl-7.79.0/curl-7.79.0/_install Compiler: arm-linux-gnueabihf-gcc CFLAGS: -Werror-implicit-function-declaration -O2 -Wno-system-headers -pthread CPPFLAGS: -isystem /opt/rootfs/openssl-1.1.1/openssl-1.1.1/_install/include LDFLAGS: -L/opt/rootfs/openssl-1.1.1/openssl-1.1.1/_install/lib LIBS: -lssl -lcrypto -ldl -lpthread curl version: 7.79.0 SSL: enabled (OpenSSL) SSH: no (--with-{libssh,libssh2}) zlib: no (--with-zlib) brotli: no (--with-brotli) zstd: no (--with-zstd) GSS-API: no (--with-gssapi) GSASL: no (libgsasl not found) TLS-SRP: enabled resolver: POSIX threaded IPv6: enabled Unix sockets: enabled IDN: no (--with-{libidn2,winidn}) Build libcurl: Shared=yes, Static=yes Built-in manual: enabled --libcurl option: enabled (--disable-libcurl-option) Verbose errors: enabled (--disable-verbose) Code coverage: disabled SSPI: no (--enable-sspi) ca cert bundle: no ca cert path: no ca fallback: no LDAP: no (--enable-ldap / --with-ldap-lib / --with-lber-lib) LDAPS: no (--enable-ldaps) RTSP: enabled RTMP: no (--with-librtmp) PSL: no (libpsl not found) Alt-svc: enabled (--disable-alt-svc) HSTS: enabled (--disable-hsts) HTTP1: enabled (internal) HTTP2: no (--with-nghttp2, --with-hyper) HTTP3: no (--with-ngtcp2, --with-quiche) ECH: no (--enable-ech) Protocols: DICT FILE FTP FTPS GOPHER GOPHERS HTTP HTTPS IMAP IMAPS MQTT POP3 POP3S RTSP SMB SMBS SMTP SMTPS TELNET TFTP Features: AsynchDNS HSTS HTTPS-proxy IPv6 Largefile NTLM NTLM_WB SSL TLS-SRP UnixSockets alt-svc
根据你提供的信息,发现curl编译时未启用zlib支持。可以尝试用以下方式解决该问题:
1. 确认已经安装了zlib库和头文件。
2. 在编译curl时,添加 --with-zlib 选项启用zlib支持。如:
```
./configure --with-zlib=/path/to/zlib
```
其中 /path/to/zlib 是 zlib 库的安装路径。
3. 如果上述方法仍然无法解决问题,可以尝试手动设置 CPPFLAGS 和 LDFLAGS 变量,指定 zlib 头文件和库的路径。如:
```
export CPPFLAGS="-I/path/to/zlib/include"
export LDFLAGS="-L/path/to/zlib/lib"
./configure
```
如果仍然无法解决问题,可以尝试升级或重新编译 zlib 库。
阅读全文
相关推荐
















