热门地区搜索时记录添加到头部
This commit is contained in:
@@ -222,7 +222,7 @@ let setSeachVal = (item) => {
|
||||
//点击热门地区
|
||||
let setHotSeach = (item) => {
|
||||
seachAllType.keyword = item
|
||||
if (historyArr.data.indexOf(item) === -1) historyArr.data.push(item)
|
||||
if (historyArr.data.indexOf(item) === -1) historyArr.data.unshift(item)
|
||||
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
|
||||
seachList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user