mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-07-06 11:36:18 +08:00
vuex引入DetailCache,避免重复获取详情页
This commit is contained in:
@@ -28,7 +28,8 @@ export default new Vuex.Store({
|
||||
},
|
||||
appState: {
|
||||
windowIsOnTop: false
|
||||
}
|
||||
},
|
||||
DetailCache: {}
|
||||
},
|
||||
getters: {
|
||||
getView: state => {
|
||||
@@ -48,6 +49,9 @@ export default new Vuex.Store({
|
||||
},
|
||||
getAppState: state => {
|
||||
return state.appState
|
||||
},
|
||||
getDetailCache: state => {
|
||||
return state.DetailCache
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
@@ -68,6 +72,9 @@ export default new Vuex.Store({
|
||||
},
|
||||
SET_APPSTATE: (state, payload) => {
|
||||
state.appState = payload
|
||||
},
|
||||
set_DetailCache: (state, payload) => {
|
||||
state.DetailCache = payload
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user