
--- client/views/pages/AppStore.js
+++ client/views/pages/AppStore.js
... | ... | @@ -93,7 +93,7 @@ |
93 | 93 |
setToken(state, token) { |
94 | 94 |
state.token = token; |
95 | 95 |
}, |
96 |
- clearToken(state) { |
|
96 |
+ clearState(state) { |
|
97 | 97 |
state.token = null; |
98 | 98 |
state.userId = null; |
99 | 99 |
state.userNm = null; |
... | ... | @@ -102,18 +102,21 @@ |
102 | 102 |
state.schdlId = null; |
103 | 103 |
state.bookId = null; |
104 | 104 |
state.unitId = null; |
105 |
+ state.textId = null; |
|
105 | 106 |
state.learningId = null; |
106 |
- saveStateToLocalStorage(state); |
|
107 |
+ |
|
108 |
+ state.currentLearningIds = []; |
|
109 |
+ state.prblmTypeId = null; |
|
110 |
+ state.currentLabel = null; |
|
111 |
+ state.currentProblemIndex = null; |
|
112 |
+ state.allProblems = []; |
|
113 |
+ state.allAnswers = []; |
|
114 |
+ state.wdBookIdList = [], |
|
115 |
+ state.currentWdBkIndex = 0; |
|
116 |
+ seqNum = null; |
|
117 |
+ saveStateToLocalStorage(state); |
|
107 | 118 |
}, |
108 | 119 |
|
109 |
- clearState(state) { |
|
110 |
- const initialState = loadStateFromLocalStorage(); // 초기 상태 로드 |
|
111 |
- Object.keys(initialState).forEach(key => { |
|
112 |
- state[key] = initialState[key]; |
|
113 |
- }); |
|
114 |
- saveStateToLocalStorage(state); // 초기화된 상태 저장 |
|
115 |
- }, |
|
116 |
- |
|
117 | 120 |
setUser(state, userId) { |
118 | 121 |
state.userId = userId; |
119 | 122 |
saveStateToLocalStorage(state); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?