例1: 'http://a.a.com/data?id=1&time=2018-06-07'
此時通過 window.location.search 能夠正常獲取到url中的查詢參數 id=1&time=2018-06-07
例2:'http://a.a.com/#/data?id=1&time=2018-06-07'
此時通過 window.location.search 獲取到的參數為空"",這是因為使用了hash導致,因為hash會將url中第一個#后的內容都作為hash內容,所以search為空了.