/* ZONGHENG PC 2018 Copyright (c) 2018 (ZONGHENG FETEAM) lastUpdate: 2022-08-02 15:45:47*/ define(["donate","widget","chapterForums","chapterReport"],function(e,r,o){var i=$("body").attr("bookId"),a=($("body").attr("chapterId"),$("body").attr("lastChapterId")),n=$("body").attr("nextChapterId"),s="chapterflow"===$("body").attr("scriptSign")?1:0,t=($("body").attr("forumid"),$(window).width()),d=CookieUtil,c="rSet",l=[1,3,1,14,1];t<1200?l[1]=1:t<1400&&(l[1]=2);var p=[0,640,800,960,1100,1440,1700],h=h||{save:function(e){e=e.join("_");d.setCookie({name:c,value:e,path:"/",domain:document.domain||"book.zongheng.com",expires:31536e3})},setDef:function(){this.save(l),d.getCookie("ui_read_setting")&&d.setCookie({name:"ui_read_setting",value:null,path:"/",domain:".zongheng.com",expires:-1})},getStatData:function(){var e=this.setting;return{setting_color:["0","默认","蓝色","绿色","粉色","浅灰","羊皮","纸纹","黑色"][parseInt(e[0])],setting_font:["0","宋体","黑体","微软雅黑","楷体"][parseInt(e[2])],setting_font_size:e[3],setting_page_breadth:["0","640","800","默认","1280"][parseInt(e[1])]}},setChange:function(e,t){this.setting[e]=t},color:function(e){document.body.className="rb_"+e,$('a[data-style="'+e+'"]').addClass("active").siblings().removeClass("active"),this.setChange(0,e)},serbarPos:function(e){$("#uiGPUserAct").css({"margin-left":Math.floor(e/2+10)+"px"}),$("#uiGPReaderAct").css({"margin-left":"-"+Math.floor(e/2+70)+"px"})},setGpdOffset:function(){var e=$(document).scrollTop(),t=$("#readerFt").height(),a=$(window).height(),r=$("#uiGPUserAct").height(),o=$("body").height(),i=$("#readerFt").eq(0).offset().top;i<=e?($("#uiGPReaderAct").css({position:"fixed",top:"0px"}),$(".chapter_forum").addClass("fixed")):($("#uiGPReaderAct").css({position:"absolute",top:i}),$(".chapter_forum").removeClass("fixed")),i+t-a<=e&&200<=o||o.orderWin_wrap{padding:20px;}.orderWin_wrap .orderInfo{border-bottom: 1px dotted #ccc;height:110px;line-height: 45px;}.orderWin_wrap .orderInfo ul li{background:url(../images/dot_li.png) no-repeat left center;padding-left:12px}.orderWin_wrap .ordernum{font-size: 14px;color:#4a4a4a}.orderWin_wrap .orderpaynum{font-size: 16px;font-weight:bold;color:#4a4a4a}.orderWin_wrap .ordernum b{color:#000;font-weight:bold}.orderWin_wrap .orderwn_usermoney b,.orderWin_wrap .orderpaynum b{color:#A11313;font-weight:bold}.orderWin_wrap .ordertips{line-height: 26px;padding:10px 0;height:60px;}.orderWin_wrap .ordertips .orderError em{width:12px;height:12px;background: url(//rcode.zongheng.com/v2018/images/order_ico.png) -30px 0 no-repeat;margin-right:5px;float: left;margin-top:7px;}.orderWin_wrap .ordertips .orderopt{position: relative;}.orderWin_wrap .ordertips .orderopt em{top:7px;}.orderWin_wrap .ordertips .orderopt input{margin-right:7px;}
  • 仅订阅本章
  • 本次订阅将消耗 -- 纵横币
余额不足
',id:"OrderConfirmDialog",tit:"订阅VIP章节",height:342});return $("#order-ckx-autoorder").click(function(){!0===$(this).is(":checked")?$(this).val(1):$(this).val(0)}),$("#order-btn-charge").click(function(){window.open(Domain.payHostName),u.close(),r.Confirm({con:"在新打开的页面上完成充值操作",tip:"充值成功后可进行以下操作",beforeOpen:function(){},close:!0,confirmTxt:"继续购买",cancelTxt:"余额查询",cb:{confirm:function(){UserUtil.getUserInfo()},cancel:function(){location.href=Domain.homeHostName}}})}),$(".order_jump .reader_obtnred").live("click",function(){var e,t,a;$(this).hasClass("ordering")||($(this).attr("data-chapterId"),(e=$(this).attr("data-price"))>UserUtil.userInfo.money?($("#order-data-money").html(e),e=e-UserUtil.userInfo.money,$("#order-tip-money").html("当前余额:"+UserUtil.userInfo.money+" 纵横币,还需支付 "+e+" 纵横币"),u.open()):(t=$(this),a=t.attr("data-chapterId"),$.ajax({type:"post",url:"/api/user/consume/order",data:{bookId:i,chapterids:a,autoOrder:$("#order-ckx-autoorder").attr("checked")?1:0},beforeSend:function(){t.addClass("ordering").children("p").html("订阅中...")},cache:!1,dataType:"json",error:function(){t.removeClass("ordering").children("p").html("订阅本章"),r.Alert("出错了..")},timeout:1e4,success:function(e){e?202!==e.status&&201!==e.status?1===e.status?(r.Toast({txt:"订阅成功",time:2e3,mask:!0,onHide:function(){1==s?location.href=Domain.bookHostName+"/totaltome/"+i+"/"+a+".html":location.reload()}}),UserUtil.getUserInfo()):(r.Alert(e.msg),t.removeClass("ordering").children("p").html("订阅本章")):r.Alert(e.msg,UserUtil.login):r.Alert("出错了..")}})))}),$('[data-hook="pageStart"]').click(function(){r.Alert("没有上一章了!")}),0<$('[data-hook="pageEnd"]').length&&(m=new r.Custom({html:"",id:"endPageDialogTarget",tit:"",header:!1}),$("#endPageDialogTarget").load("/book/readmore/"+i+".html?ver="+(new Date).getTime(),function(e){$("#endPageDialogTarget").find(".ui_widget_close").bind("click",function(){m.close()}),$("#btn-endpage-donate").bind("click",function(){m.close(),$("#uiGPUserAct .gpd_btnpal .donate").click()}),$("#endPageDialogTarget").prepend('
'),$("#endPageDialogTarget").find(".r_author_head").children("img").error(function(){$(this).attr("src",UserUtil.defaultImg)})}),$('[data-hook="pageEnd"]').click(function(){m.open(),ZSAQ&&ZSAQ.push({event:"viewBookLastChapter",data:{book_id:i}})})),$.ajax({type:"get",url:Domain.hostName+"/api/recommend/game/list.htm",data:{category:12,t:(new Date).getTime()},dataType:"jsonp","async":!0,error:function(){},success:function(e){if(0==e.ret&&0').show(),$("#game0826,#game0825").click(function(){zh_spck(i)});break}}}}),h});