a1300399510@qq.com 提交于 2023/04/06 -17:00:02

This commit is contained in:
XiaoMo 2023-04-06 17:00:11 +08:00
parent de246b5b32
commit b5ea5a0bf0
2 changed files with 5 additions and 2 deletions

View File

@ -12,9 +12,9 @@ export default new Vuex.Store({
mutations: { mutations: {
setHistoricalSearch(state, payload) { setHistoricalSearch(state, payload) {
console.log(payload, "payload"); console.log(payload, "payload");
payload = [...new Set(payload)] // payload = [...new Set(payload)]
state.historicalSearch = payload state.historicalSearch = payload
localStorage.setItem('historicalSearch', JSON.stringify(payload)); // localStorage.setItem('historicalSearch', JSON.stringify(payload));
} }
}, },
actions: { actions: {

View File

@ -87,7 +87,10 @@ export default {
this.kw = this.$route.query.kw this.kw = this.$route.query.kw
this.getSearchResult() this.getSearchResult()
console.log(this.historicalSearch, "historicalSearch"); console.log(this.historicalSearch, "historicalSearch");
window.addEventListener("visibilitychange", () => {
console.log("fkjflkdfj");
})
}, },
watch: { watch: {