|  | @@ -76,6 +76,7 @@
 | 
	
		
			
				|  |  |  				jieId: '',
 | 
	
		
			
				|  |  |  				shipinTitle: '',
 | 
	
		
			
				|  |  |  				cacheZhangInfo: {},
 | 
	
		
			
				|  |  | +				cacheCurrentZhangIndex:'',
 | 
	
		
			
				|  |  |  				YouKeContent: '您当前是游客身份,登录后才能浏览内容,现在去登录?'
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  		},
 | 
	
	
		
			
				|  | @@ -109,21 +110,21 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  			init(options) {
 | 
	
		
			
				|  |  |  				this.jieId = options.jieId
 | 
	
		
			
				|  |  | -				this.zhangId = options.zhangId
 | 
	
		
			
				|  |  |  				if (!(cacheManager.get('zhangInfo') && options.jieId)) {
 | 
	
		
			
				|  |  |  					toast('数据错误,缓存丢失/ jieId丢失')
 | 
	
		
			
				|  |  |  					return false
 | 
	
		
			
				|  |  |  				}
 | 
	
		
			
				|  |  | +				this.cacheCurrentZhangIndex =  cacheManager.get('auth').currentZhang
 | 
	
		
			
				|  |  |  				this.cacheZhangInfo = cacheManager.get('zhangInfo')
 | 
	
		
			
				|  |  | -				let zhang = this.cacheZhangInfo.zhangList.find(zhang => zhang.zhangId == this.zhangId);
 | 
	
		
			
				|  |  | -				if (!zhang) {
 | 
	
		
			
				|  |  | -					return
 | 
	
		
			
				|  |  | -					//console.log('currentObject',currentObject);
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | +			
 | 
	
		
			
				|  |  | +				// let zhang = this.cacheZhangInfo.zhangList.find(zhang => zhang.zhangId == this.zhangId);
 | 
	
		
			
				|  |  | +				// if (!zhang) {
 | 
	
		
			
				|  |  | +				// 	return
 | 
	
		
			
				|  |  | +				// }
 | 
	
		
			
				|  |  | +				let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex]
 | 
	
		
			
				|  |  |  				let currentObject = zhang.jieList.find(item => item.jieId == options.jieId);
 | 
	
		
			
				|  |  |  				console.log(currentObject);
 | 
	
		
			
				|  |  |  				this.shipinTitle = currentObject.jieName
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  |  				this.pageData = {
 | 
	
		
			
				|  |  |  					...currentObject
 | 
	
		
			
				|  |  |  				}
 | 
	
	
		
			
				|  | @@ -136,28 +137,13 @@
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			goNextZhang() {
 | 
	
		
			
				|  |  |  				let that = this
 | 
	
		
			
				|  |  | -				let req = {
 | 
	
		
			
				|  |  | -					nianji: that.pageData.nianji,
 | 
	
		
			
				|  |  | -					zhangId: that.pageData.zhangId,
 | 
	
		
			
				|  |  | -					cardId: that.pageData.cardId,
 | 
	
		
			
				|  |  | -				}
 | 
	
		
			
				|  |  | -				userZhangNextInfo(req).then(res => {
 | 
	
		
			
				|  |  | -					cacheManager.set('zhangInfo', res.data)
 | 
	
		
			
				|  |  | -					cacheManager.updateObject('auth', {
 | 
	
		
			
				|  |  | -						zhangId: res.data.zhangId,
 | 
	
		
			
				|  |  | -						cardId: res.data.cardId,
 | 
	
		
			
				|  |  | -						nianji: res.data.nianji,
 | 
	
		
			
				|  |  | -					})
 | 
	
		
			
				|  |  | -					if (res.data.jieList.length > 0) {
 | 
	
		
			
				|  |  | -						that.jieId = res.data.jieList[0].jieId
 | 
	
		
			
				|  |  | -						uni.redirectTo({
 | 
	
		
			
				|  |  | -							url: '/pages/study/lookShipin?jieId=' + that.jieId
 | 
	
		
			
				|  |  | -						})
 | 
	
		
			
				|  |  | -					} else {
 | 
	
		
			
				|  |  | -						toast('切换下一章无jieList')
 | 
	
		
			
				|  |  | -						return false
 | 
	
		
			
				|  |  | -					}
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | +				cacheManager.updateObject('auth', {
 | 
	
		
			
				|  |  | +					currentZhang:this.cacheCurrentZhangIndex+1
 | 
	
		
			
				|  |  | +				})
 | 
	
		
			
				|  |  | +				this.cacheZhangInfo = cacheManager.get('zhangInfo')
 | 
	
		
			
				|  |  | +				let zhang = this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex+1]
 | 
	
		
			
				|  |  | +				uni.redirectTo({
 | 
	
		
			
				|  |  | +					url: '/pages/study/lookShipin?jieId=' +  zhang.jieList[0].jieId
 | 
	
		
			
				|  |  |  				})
 | 
	
		
			
				|  |  |  			},
 | 
	
		
			
				|  |  |  			playEnd(data) {
 | 
	
	
		
			
				|  | @@ -196,8 +182,7 @@
 | 
	
		
			
				|  |  |  					}
 | 
	
		
			
				|  |  |  					//	debugger
 | 
	
		
			
				|  |  |  					Number(this.jieId++)
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -					let currentObject = this.cacheZhangInfo.jieList.find(item => item.jieId == this.jieId);
 | 
	
		
			
				|  |  | +					let currentObject =this.cacheZhangInfo.zhangList[this.cacheCurrentZhangIndex].jieList.find(item => item.jieId == this.jieId);
 | 
	
		
			
				|  |  |  					this.pageData = {
 | 
	
		
			
				|  |  |  						...currentObject
 | 
	
		
			
				|  |  |  					}
 |