F12打开Network对比发现
IE浏览器没有对中文做转码
因此:
api.indexSearch(encodeURI(this.companyName)).then(res => {});
this.companyName:需要传的参数值
encodeURI() 函数可把字符串作为 URI 进行编码
F12打开Network对比发现
IE浏览器没有对中文做转码
因此:
api.indexSearch(encodeURI(this.companyName)).then(res => {});
this.companyName:需要传的参数值
encodeURI() 函数可把字符串作为 URI 进行编码