wx.request请求的url中带#,#后面参数消失?

小程序 文章 2021-12-17 17:00 1334 0 全屏看文

AI助手支持GPT4.0

wx.request请求的url中带#,#后面参数消失?The url of wx.request request has # and the parameters behind # disappear?

wx.request请求的url中带#,#后面参数消失?

request请求时,url链接中有#,实际请求#后面部分被移除了

During the request, there is # in the URL link, and the part after the actual request # is removed

回答:

圣殿骑士:

感觉在url路径带#号很奇怪啊。。。如果你encode的话,需要后端接收不报错的话,要让你们后端decode下


ps:如果是我,我肯定把后端怼的人仰马翻哈

微喵网络:

为什么request的url里会带#

。:后台给的接口地址
微喵网络:只能说你们的后台太奇葩了
Mr.Zhao:

特殊字符需要encode

。:谢谢
。:我用encodeURIComponent转了之后# 会转成%23  这个时候调用接口还是报错404

-EOF-

AI助手支持GPT4.0