Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 views
in Technique[技术] by (71.8m points)

网页可打开但vue链接该网页报400

网页可以打开,但是vue a标签和button的window.location.href都会出现下面的问题(就只是个很普通的a标签链接)
image.png
image.png
之后新建了一个html文件,里面的a标签可以直接打开,所以是因为node的问题嘛?
请问各位兄弟姐妹们,这可以怎么解决呢??


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

鉴于你没有贴出完整代码和完整Url,我没法复现和测试。
我用https://www.baidu.com/ 测了是没有这个bug的
做出以下几种猜测:
1.url转码,是否需要encode
2.域名,使用a标签和window.location.href时是否使用绝对路径,相对路径的话是不是在同一域名下。
3.协议错误,使用https或者http

你试一下用Postman测试一下你的目标网址


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...