业务场景:a页面有搜索 然后输入搜索词点击搜索跳转到新的搜索页 吧搜索词带过去 乱码
window.location.href = 'https://boss-api.scrmtech.com/wap/search?search=' + encodeURIComponent(search) + "&type=" + CONFIG.type
var param = window.location.href.split('&')
this.searchData =decodeURIComponent(param[0].split('=')[1])
this.type = param[1].split('=')[1]
this.searchFn(this.searchData)
网友评论