|
|
@@ -105,26 +105,7 @@
|
|
|
},
|
|
|
onShow() {
|
|
|
console.log('学习页面显示,尝试恢复滚动位置')
|
|
|
- this.chanpinId = cacheManager.get('auth').chanpinId
|
|
|
- this.danyuanId = cacheManager.get('auth').danyuanId
|
|
|
- this.banbenId = cacheManager.get('auth').banbenId
|
|
|
- //用于返回
|
|
|
- this.dengjiId = cacheManager.get('auth').dengjiId
|
|
|
- this.cacheManagerLocal = cacheManager.get('xuexi-shuxue') || {}
|
|
|
- // 使用缓存A@
|
|
|
- this.danyuanInfo = this.cacheManagerLocal
|
|
|
- this.curProcess = this.cacheManagerLocal.curProcess
|
|
|
- this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
|
|
|
- this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
|
|
|
- this.dagangList = this.cacheManagerLocal.dagangList || []
|
|
|
- const result = this.jisuanWanchengStatus(this.dagangList);
|
|
|
- if (result.allCompleted) {
|
|
|
- console.log('全部完成');
|
|
|
- } else {
|
|
|
- this.danyuanInfo.curJieId = result.firstUncompleted.jieId
|
|
|
- console.log('未完成项目:', result.firstUncompleted);
|
|
|
- console.log('未完成项目jieId:', result.firstUncompleted.jieId);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
},
|
|
|
onHide() {
|
|
|
@@ -144,27 +125,27 @@
|
|
|
this.dengjiId = options.dengjiId
|
|
|
this.loadDataFromApi()
|
|
|
} else {
|
|
|
- console.log('使用缓存onLoad');
|
|
|
- // this.chanpinId = cacheManager.get('auth').chanpinId
|
|
|
- // this.danyuanId = cacheManager.get('auth').danyuanId
|
|
|
- // this.banbenId = cacheManager.get('auth').banbenId
|
|
|
- // //用于返回
|
|
|
- // this.dengjiId = cacheManager.get('auth').dengjiId
|
|
|
- // this.cacheManagerLocal = cacheManager.get('xuexi-shuxue') || {}
|
|
|
- // // 使用缓存A@
|
|
|
- // this.danyuanInfo = this.cacheManagerLocal
|
|
|
- // this.curProcess = this.cacheManagerLocal.curProcess
|
|
|
- // this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
|
|
|
- // this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
|
|
|
- // this.dagangList = this.cacheManagerLocal.dagangList || []
|
|
|
- // const result = this.jisuanWanchengStatus(this.dagangList);
|
|
|
- // if (result.allCompleted) {
|
|
|
- // console.log('全部完成');
|
|
|
- // } else {
|
|
|
- // this.danyuanInfo.curJieId = result.firstUncompleted.jieId
|
|
|
- // console.log('未完成项目:', result.firstUncompleted);
|
|
|
- // console.log('未完成项目jieId:', result.firstUncompleted.jieId);
|
|
|
- // }
|
|
|
+ console.log('使用缓存');
|
|
|
+ this.chanpinId = cacheManager.get('auth').chanpinId
|
|
|
+ this.danyuanId = cacheManager.get('auth').danyuanId
|
|
|
+ this.banbenId = cacheManager.get('auth').banbenId
|
|
|
+ //用于返回
|
|
|
+ this.dengjiId = cacheManager.get('auth').dengjiId
|
|
|
+ this.cacheManagerLocal = cacheManager.get('xuexi-shuxue') || {}
|
|
|
+ // 使用缓存A@
|
|
|
+ this.danyuanInfo = this.cacheManagerLocal
|
|
|
+ this.curProcess = this.cacheManagerLocal.curProcess
|
|
|
+ this.fontDanyuanId = this.cacheManagerLocal.fontDanyuanId
|
|
|
+ this.nextDanyuanId = this.cacheManagerLocal.nextDanyuanId
|
|
|
+ this.dagangList = this.cacheManagerLocal.dagangList || []
|
|
|
+ const result = this.jisuanWanchengStatus(this.dagangList);
|
|
|
+ if (result.allCompleted) {
|
|
|
+ console.log('全部完成');
|
|
|
+ } else {
|
|
|
+ this.danyuanInfo.curJieId = result.firstUncompleted.jieId
|
|
|
+ console.log('未完成项目:', result.firstUncompleted);
|
|
|
+ console.log('未完成项目jieId:', result.firstUncompleted.jieId);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|