Commit 53785225 by 冷斌

fix bug

parent 7c4d48ec
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
getCacheKeyWorlds: function () { getCacheKeyWorlds: function () {
let item = localStorage.getItem("search"); let item = localStorage.getItem("search");
//['考研课程', '事业单位考试', '公务员考试']; //['考研课程', '事业单位考试', '公务员考试'];
return item ? JSON.parse(item) : []; return item ? JSON.parse(item).reverse() : [];
}, },
onFocus: function () { onFocus: function () {
this.showHistory = true this.showHistory = true
...@@ -447,7 +447,7 @@ ...@@ -447,7 +447,7 @@
data.shift(); data.shift();
} }
localStorage.setItem("search", JSON.stringify(data)); localStorage.setItem("search", JSON.stringify(data));
this.cacheKeyWorlds = data; this.cacheKeyWorlds = this.getCacheKeyWorlds();
} }
} }
}) })
......
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