018章 北雪雁,南妙依,马尾辫 (1/2)
")},goToAnchor:function(){return-1!
==this.chapters.indexOf(this.curChapter)?
(_scrollTo($("#c"+this.curChapter).offset().top),!
0):!1},getLastChapter:function(e){returnstore.get("read_"+e)},setLastChapter:function(e){store.set("read_"+e,this.curChapter),e!
=resourseId&&store.set("read_"+resourseId,this.curChapter)},juToLastChapter:function(){vare=this.getLastChapter(bookId);e&&(this.curChapter=e,this.chapters=[],this.chapterNas={},this.$read.ht(""),this.nextPage(!
0))},setBookHistory:function(){this.bookHistory.curChapter=this.curChapter,store.set("history_"+bookId,JSON.stringify(this.bookHistory))},nextPage:function(e){if(disabledClick||this.isDisableAsync)return--read.curChapter,read.setBookHistory(),!
1;disabledClick=!0,e||this.isNetError||_scrollTo($("#c"+(this.curChapter-1)).offset().top),this.$read.pause=!
0;vart=this;$.ajax({url:t.getApiUrl(),dataType:"json",success:function(e){disabledClick=!
1,t.$read.pause=!1;vara=$("[data-js=loading]");if(0==e.code){t.chapters.push(t.curChapter),t.$read.attr("rel",t.getApiUrl(t.curChapter+1)),isEpub||(t.chapterNas[t.curChapter]=e.body.chapterNa||"");varo="";if(a.length?
a.before(t.getAnchor()+e.ht+e.body.pageButton+o):t.$read.append(t.getAnchor()+e.ht+e.body.pageButton+o),(1==e.body.pageType||3==e.body.pageType)&&(t.isDisableAsync=!
0),5==e.body.pageType)returngoUrl(e.body.goUrl),!
0;t.isNetError&&(t.isNetError=!
1,t.perloadNu2,_scrollTo($("#c"+t.curChapter).offset().top)),t.isDisableAsync&&!
_isEty(e.body.pageButton)&&read.disableAsync(),isEpub&&jsClear(),t.perloadNu0&&--t.perloadNut.isNeedFill()&&t.autoFill&&t.autoFill()}else1==e.code?
(--read.curChapter,window.scrollTo(0,0),window.location.href=e.body.goUrl):111999==e.code?
(--read.curChapter,window.location.href=e.body.url):(--read.curChapter,zy.alert(e.g));read.setBookHistory()},error:function(){--read.curChapter,t.isNetError=!
0,zy.alert("网络繁忙,请稍后重试"),disabledClick=!
1,t.$read.
本章未完,点击下一页继续阅读