Ver Fonte

更新当前岛状态

wangxy há 2 meses atrás
pai
commit
92f2ab96cc
2 ficheiros alterados com 7 adições e 4 exclusões
  1. 2 1
      pages/newEnglish/index.vue
  2. 5 3
      utils/cacheManager.js

+ 2 - 1
pages/newEnglish/index.vue

@@ -219,9 +219,10 @@
   // 返回岛
   if (userCode !== 'Visitor') {
     let jieInfo = cacheManager.getUnitInfo('zhangInfo', data.jieId);
-
+    console.log('jieInfo',jieInfo)
     if (jieInfo.lastFlag == 1) {
       // 更新岛状态
+      console.log('jieInfo.nextZid',jieInfo.nextZid)
       cacheManager.updateObject('zhangInfo', {
         curZid: jieInfo.nextZid
       })

+ 5 - 3
utils/cacheManager.js

@@ -126,9 +126,11 @@ const cacheManager = (function() {
 		let obj = get(key) || {};
 		let result = {}
 		obj.zhangList.map(item => item.zList.forEach(jie => {
-			if (jie.jieId == currentJieId) {
-				result = jie;
-			}
+			jie.jieList.forEach(cItem => {
+				if (cItem.jieId == currentJieId) {
+					result = cItem;
+				}
+			})
 		}))
 		return result
 	}