Kaynağa Gözat

更新当前岛状态

wangxy 2 ay önce
ebeveyn
işleme
bac44701a9
1 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 6 4
      utils/cacheManager.js

+ 6 - 4
utils/cacheManager.js

@@ -112,10 +112,12 @@ const cacheManager = (function() {
 	// 新英语单元学习完所有单词更新单元状态
 	function updateUnitStatus(key, currentJieId) {
 		let obj = get(key) || {};
-		obj.zhangList.map(item => item.jieList.forEach(jie => {
-			if (jie.jieId == currentJieId) {
-				jie.studyFlag = 1
-			}
+		obj.zhangList.map(item => item.zList.forEach(jie => {
+			jie.jieList.forEach(cItem => {
+				if (cItem.jieId == currentJieId) {
+					cItem.studyFlag = 1
+				}
+			})
 		}))
 
 		set(key, obj);