Commit ed899039 by 冷斌

fix bug

parent 60cffef0
......@@ -307,6 +307,7 @@
this.searchCourse()
this.searchQuestion()
this.searchGoods()
this.searchSave()
},
onTab: function(idx) {
this.tab = idx
......@@ -417,6 +418,18 @@
})
}
})
},
searchSave: function () {
let item = localStorage.getItem("search");
//['考研课程', '事业单位考试', '公务员考试'];
let data = item ? item : [];
if (data.indexOf(this.keyword) < 0) {
data.push(this.keyword);
}
if (data.length > 8) {
data.shift();
}
localStorage.setItem("search", data);
}
}
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment