unable to decode value

1.假如我們在列表頁搜索一個關鍵詞,這時發現報錯了,如下圖所示: 我們一看發現給後臺傳的關鍵詞是 unable to decode value 解決方案: (1)在form上加 accept-charset ='UTF-8' (2)在得到搜索的關鍵詞時進行轉碼,let value = encodeURIComponent(e.target.value); encodeURIComponent ()
相關文章
相關標籤/搜索