小程序 分享之后,从分享点进去 input里面中文值被转化成字符,需再转化成中文方法

 var searchValue=decodeURI(this.data.searchValue)
    this.setData({
      searchValue
    })
 
 
 

decodeURI() 函数可对 encodeURI() 函数编码过的 URI 进行解码。
decodeURI(URIstring) //URIstring 一个字符串,含有要解码的 URI 或其他要解码的文本。

decodeURIComponent() 函数可对 encodeURIComponent() 函数编码的 URI 进行解码。
decodeURIComponent(URIstring) //URIstring 一个字符串,含有编码 URI 组件或其他要解码的文本。

原文链接:https://blog.csdn.net/qq469234155/article/details/104014510

原文地址:https://www.cnblogs.com/xushan03/p/15119642.html