location.href跳转拼接到当前链接后面
2023-05-09 本文已影响0人
AAA前端
接口给返回的链接 有https:// 但是 在跳转的时候 ,不是跳转接口给的链接,而是拼接到了当前页面链接的后面。
最后发现是 后端那个链接当初 从飞书复制的时候,有隐藏字符。。。。
比如:我复制的链接是: https://medicaluat.mobile.taikang.com/active/
在vscode中会出现一个看不见空格, 在chrome中会看到有红点

改一下就好了