</div>
<%}%>
<%if(sign['waitSubscribe'] == true){%>
<div class="loading-wrap">
<div class="loading">
<span></span>
<p>请稍后...</p>
</div>
</div>
<%}%>
<%if(sign['networkBlock'] == true){%>
<div class="tip-state">
<span class="error"></span>
<h4>网络异常</h4>
<div class="popup-btn">
<a class="red-btn j_retry_polling" href="javascript:">重新尝试</a>
</div>
</div>
<%}%>
<%if(sign['commonErrorAlert'] == true){%>
<div class="tip-state">
<span class="error"></span>
<h4><%= data['msg']%><cite></cite></h4>
<div class="popup-btn">
<a class="red-btn close" href="javascript:">重新订阅</a>
<!--<a class="blue-btn" href="//me.qidian.com/account/consumeLog.aspx?type=1&page=1" target="_blank">查看消费记录</a>-->
</div>
</div>
<%}%>
</div>
</div>
<%if(data.status == 0){%>
<div class="no-limit-wrap">
<h3>
剩余月票数<span><%= data.monthTicketCnt%></span>张<i>·</i>当前最多能投<span id="monthSurplus"><%= data.enableCnt%></span>张
</h3>
<div class="vote-form-wrap">
<h4>投票数量</h4>
<div class="vote-wrap mb160 cf">
<a class="subtract" id="subMonth" href="javascript:" data-eid="qd_G108"><span></span></a>
<div class="ticket-num fl">
<span class="month-ticket" id="mTicket">
<%
var maxCnt = data.enableCnt;
if(maxCnt > 5){
maxCnt = 5;
}
for(var i = 0; i < maxCnt; i++){%>
<b></b>
<%}%>
</span><i id="monthNum"><%= data.enableCnt%></i>
</div>
<a class="add disabled" id="addMonth" href="javascript:" data-eid="qd_G109"><span><em></em></span></a>
</div>
</div>
<div class="popup-btn">
<a class="green-btn" id="voteMonth" href="javascript:" data-eid="qd_G57">立即投票</a>
</div>
</div>
<%}else if(data.status == 2){%>
<div class="limit-wrap" id="noPrivilege">
<div class="null no-ticket"></div>
<h3>无投票资格</h3>
<h4><a class="blue" href="/help#q9" target="_blank">提升会员等级</a>可获得投票资格</h4>
<p class="bottom"><a href="/help#q7" target="_blank">投月票规则</a></p>
</div>
<%}else if(data.status == 3){%>
<div class="limit-wrap">
<div class="null no-ticket"></div>
<h3>暂无月票</h3>
<p class="bottom"><a href="/help#q7" target="_blank">如何获得月票</a><em>|</em><a href="/help#q7" target="_blank">投月票规则</a>
</p>
</div>
<%}else if(data.status == 4){%>
<div class="limit-wrap" id="outOfDayLimit">
<div class="null no-ticket"></div>
<h3>今日<span>2</span>张限额已用完</h3>
<p class="bottom"><a href="/help#q7" target="_blank">投月票规则</a></p>
</div>
<%}else if(data.status == 5){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip">对不起,您没有收藏该书</h3>
</div>
<%}else if(data.status == 6){%>
<div class="limit-wrap" id="outOfDayLimit">
<div class="null no-ticket"></div>
<h3>当月<span>5</span>张限额已用完</h3>
<p class="bottom"><a href="/help#q7" target="_blank">投月票规则</a></p>
</div>
<%}else if(data.status == 9){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip">对不起,无此书籍信息</h3>
</div>
<%}else if(data.status == 1000){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip">您还未登录,<a href="javascript:" class="j_login">立即登录</a></h3>
</div>
<%}else if(data.status == -1){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip"><%= msg%></h3>
</div>
<%}else{%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip"><%= data.statusMsg%></h3>
</div>
<%}%>
<%if(data.status == -2004){%>
<div class="limit-wrap" id="noMoney">
<div class="null no-money"></div>
<h3>账户余额不足</h3>
<h4>本次打赏<em class="calcReward"><%= data.amount%></em>小说币</h4>
<h5>账户余额 <span id="balance"><%= data.balance%></span> 小说币<i>·</i>还差<em class="f14" id="differ"><%=
data.amount - data.balance%></em>小说币</h5>
<p class="popup-btn"><a class="red-btn j_charge" href="javascript:" target="_blank">去充值</a></p>
</div>
<%}%>
<%if(data.status == 0){%>
<div class="no-limit-wrap">
<h3>剩余推荐票数<span><%= data.recomTicketCnt%></span>张<i>·</i>当前最多能投<span id="recSurplus"><%= data.enableCnt%></span>张
</h3>
<div class="vote-form-wrap">
<h4>投票数量</h4>
<div class="vote-wrap mb160 cf">
<a class="subtract " id="subRec" href="javascript:" data-eid="qd_G110"><span></span></a>
<div class="ticket-num fl"> <span class="rec-ticket" id="recTicket">
<%
var maxCnt = data.enableCnt;
if(maxCnt > 5){
maxCnt = 5;
}
for(var i = 0; i < maxCnt; i++){%>
<b></b>
<%}%>
</span><input id="recNum" maxlength="<%= data.enableCnt%>" value="<%= data.enableCnt%>"></div>
<a class="add" id="addRec" href="javascript:" data-eid="qd_G111"><span><em></em></span></a>
</div>
<!--<h4>留言鼓励</h4>
<div class="message-wrap">
<textarea id="recMsgText">这本书太棒了,犒劳一下,希望后续更加精彩!</textarea>
</div>-->
</div>
<div class="popup-btn">
<a class="green-btn" id="voteRec" href="javascript:" data-eid="qd_G58">立即投票</a>
</div>
</div>
<%}else if(data.status == 1){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip">书籍审核等级不够</h3>
</div>
<%}else if(data.status == 2){%>
<div class="limit-wrap">
<div class="null no-ticket"></div>
<h3>暂无推荐票</h3>
<h4><a href="/help#q8" target="_blank">如何获得推荐票?</a></h4>
<p class="bottom"><a href="/help#q8" target="_blank">投推荐票规则</a></p>
</div>
<%}else if(data.status == 9){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip">对不起,无此书籍信息</h3>
</div>
<%}else if(data.status == 1000){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip"> 您还未登录,<a href="javascript:" class="j_login">立即登录</a></h3>
</div>
<%}else if(data.status == -1){%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip"><%= msg%></h3>
</div>
<%}else{%>
<div class="limit-wrap" id="commonError">
<h3 class="error-tip"><%= data.statusMsg%></h3>
</div>
<%}%>
<%
var giftList = data.giftList;
if(data.status == 0){%>
<div class="no-limit-wrap">
<div class="vote-form-wrap">
<div class="gift-list j-giftList cf" id="j-giftPopupList">
<ul class="cf">
<% for(var i=0; i < giftList.length; i++) { %>
<li data-giftid="<%=giftList[i].giftId%>" data-price="<%=giftList[i].price%>" data-giftno="<%=i%>">
<div class="gift">
<img src="<%=giftList[i].imgUrl%>">
</div>
<h5><%=giftList[i].price%>小说币</h5>
<p><%=giftList[i].giftName%></p>
</li>
<% } %>
</ul>
</div>
<h4>账户余额<em id="balance"><%=data.balance%></em>小说币</h4>
</div>
</div>
<%}else if(data.status == 2){%>
<div class="limit-wrap">
<h3 class="error-tip">书籍审核等级不够</h3>
</div>
<%}else if(data.status == 9){%>
<div class="limit-wrap">
<h3 class="error-tip">对不起,无此书籍信息</h3>
</div>
<%}else if(data.status == 1000){%>
<div class="limit-wrap">
<h3 class="error-tip"> 您还未登录,<a href="javascript:" class="j_login">立即登录</a></h3>
</div>
<%}else if(data.status == -1){%>
<div class="limit-wrap">
<h3 class="error-tip"><%= data.statusMsg%></h3>
</div>
<%}else{%>
<div class="limit-wrap">
<h3 class="error-tip"><%= data.statusMsg%></h3>
</div>
<%}%>
<div class="vote-popup" id="votePopup" data-l1="15">
<%
var rec = 'hidden', month = 'hidden', reward = 'hidden';
var recAct = '', monthAct = '', rewardAct = '';
if(showMonth){
month = '';
monthAct = 'act';
}else if(showRec){
rec = '';
recAct = 'act';
}else{
reward = ''
rewardAct = 'act';
}
if(actSign && actSign != ''){
rec = 'hidden';
month = 'hidden';
reward = 'hidden';
recAct = '';
monthAct = '';
rewardAct = '';
}
switch(actSign){
case 'rec':
rec = '';
recAct = 'act';
break;
case 'rew':
reward = ''
rewardAct = 'act';
break;
case 'mon':
month = '';
monthAct = 'act';
break;
}
%>
<div class="popup-tab" id="popupTab">
<%if(showMonth){%>
<a class="lang j_month <%= monthAct%>" href="javascript:" id="monthTab" data-content="#monthPopup">投月票<em></em></a>
<%}%>
<%if(showRec){%>
<a class="lang j_rec <%= recAct%>" href="javascript:" id="recTab" data-content="#recPopup">投推荐票<em></em></a>
<%}%>
<%if(showReward){%>
<a class="lang j_reward <%= rewardAct%>" href="javascript:" id="rewardTab" data-content="#rewardPopup">礼物</a>
<%}%>
</div>
<div class="vote-popup-wrap" id="voteWrap">
<div class="popup-content month <%= month%>" id="monthPopup" data-l2="1">
<div class="loading">
<span></span>
<p>请稍后...</p>
</div>
</div>
<div class="popup-content rec <%= rec%>" id="recPopup" data-l2="2">
<div class="loading">
<span></span>
<p>请稍后...</p>
</div>
</div>
<div class="popup-content reward <%= reward%>" id="rewardPopup" data-l2="3">
<div class="loading">
<span></span>
<p>请稍后...</p>
</div>
</div>
</div>
</div>
<%
var data = data.data;
var roleList = data.roleList;
var giftList = data.giftList;
%>
<div class="send-gift" id="j-sendGiftPopup">
<div class="popup-title">
<h3 class="lang">我要送礼物</h3>
</div>
<%if(data.status == 0){%>
<div class="popup-content gift-num-wrap">
<%
//弹窗展示时首次显示花费总量,公式是;单价*1 (鲜花是*9);
var total = 0;
if(giftId != 100001){
total = giftPrice;
} else {
total = giftPrice * 9;
}
%>
<h3>账户余额 <span id="j-amount"><%=data.balance%></span> 小说币 | 本次花费 <b class="pink" id="j-expend"><%=total%></b> 小说币</h3>
<div class="vote-form-wrap">
<h4>礼物数量</h4>
<div class="vote-wrap cf">
<a class="subtract" id="subGift" href="javascript:" data-eid="qd_G110"><span></span></a>
<div class="gift-num-box fl">
<div class="gift-img" id="j-giftImg" data-price="<%=giftPrice%>" data-giftid="<%=giftId%>" data-giftname="<%=giftList[giftNo].giftName%>">
<img src="<%=giftList[giftNo].imgUrl%>">
</div>
<cite class="fl iconfont"></cite>
<div class="input-box">
<input id="giftNum" maxlength="3" value="<%=(giftId == 100001) ? 9 : 1%>">
<div class="present <%=(total < 10000) ? 'hidden' : '' %>" id="j-presentTip"><strong></strong>赠投<b id="j-giveMonth">1</b>月票</div>
</div>
</div>
<a class="add" id="addGift" href="javascript:" data-eid="qd_G111"><span><em></em></span></a>
</div>
</div>
<div class="send-who" id="j-roleWrap">
<p><em>送给</em>
<% for(var i=0; i < roleList.length; i++) { %>
<input id="<%=roleList[i].id%>" name="who" type="radio" <%= (i == 0) ? 'checked':''%>><label for="<%=roleList[i].id%>"><%=roleList[i].name%></label>
<% } %>
</p>
</div>
</div>
<%} else {%>
<div class="popup-content gift-num-wrap">
<div class="error-wrap">
<h3 class="error-tip"><%=msg%></h3>
</div>
</div>
<% } %>
<div class="popup-btn">
<a class="red-btn" id="j-sendGiftBtn" href="javascript:">送礼物</a>
</div>
</div>
LBF.config({"paths":{"site":"//qidian.gtimg.com/xs8/js","xs8":"//qidian.gtimg.com/xs8","common":"//qidian.gtimg.com/common/1.0.1"},"vars":{"theme":"//qidian.gtimg.com/xs8/css"},"combo":true,"debug":false}); //全局的通用数据都放g_data变量里 var g_data = {}; //环境变量,会按照环境选择性打log g_data.envType = 'pro'; //用作统计PV g_data.pageId = 'yb_P_read'; //上报用cbid g_data.cbid = '11228868604639703'; //获取用户是否登录 g_data.isLogin = 'false'; //环境域名 g_data.domainPreFix = ''; //环境域名搜索 g_data.domainSearch = 'www.xs8.cn/search'; //阅读页配置参数 g_data.readSetting = { "t" : 0, "ft" : 0, "fs" : 3, "w" : 1, "rt" : 0, "autoBuy" : 0 }; //书信息 g_data.bookInfo = { "bookId":'11228868604639703', "bookName":'隐婚甜宠:BOSS娇妻太撩人', "authorId":9646499804699701, "author": '枫芝舞' }; //页面初始化章节信息 g_data.chapter = { //页面进入加载的章节id id:'32342760573118852', //章节vip标识 vipStatus : 1, //上一章id prevId : '32303756124679533', //下一章id nextId :'32342855355770900', //本章节是否已经订阅 isBuy: 0 }; //页面进入时,下一章是否是vip章节 g_data.nextChapterVip = 1; // guid g_data.guid = ''; // 打赏需要数据 g_data.pageJson = { mePreFix:'//me.qidian.com', //讨论区连接环境变量传入EJS模板 forumPreFix:'//forum.qidian.com', //投票逻辑专用,传给js的bookId bookId: '11228868604639703' }; //是否可以展示投推荐票弹窗 g_data.canVoteRec = 'true'; //是否可以展示投月票弹窗 g_data.canVoteMonth = 'true'; //是否可以展示打赏弹窗 g_data.canReward = 'true'; LBF.use(['lib.jQuery', 'xs8/js/read/index.8fe9a.js'], function ($, Index) { // 页面逻辑入口 new Index({}); /*$(window).on('load.speedReport', function () { // speedTimer[onload] speedTimer.push(new Date().getTime()); var f1 = 7718, // china reading limited's ID f2 = 219, // site ID f3 = 39; // page ID // chrome & IE9 Performance API SpeedReport.reportPerformance({ flag1: f1, flag2: f2, flag3IE: f3, rate:0.1, flag3Chrome: f3, url: '//isdspeed.qidian.com/cgi-bin/r.cgi' }); // common speedTimer:['dom ready', 'onload'] var speedReport = SpeedReport.create({ flag1: f1, flag2: f2, flag3: f3, rate:0.1, start: speedZero, url: '//isdspeed.qidian.com/cgi-bin/r.cgi' }); // chrome & IE9 Performance API range 1~19, common speedTimer use 20+ for (var i = 0; i < speedTimer.length; i++) { speedReport.add(speedTimer[i], i + 20) } // http://isdspeed.qq.com/cgi-bin/r.cgi?flag1=7718&flag2=224&flag3=1&1=38&2=38&… //speedReport.send(); })*/ }); // speedTimer[dom ready], put it before </body> //speedTimer.push(new Date().getTime());
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
var _mtac = {"senseQuery":1};
(function() {
var mta = document.createElement("script");
mta.src = "//pingjs.qq.com/h5/stats.js?v2.0.4";
mta.setAttribute("name", "MTAH5");
mta.setAttribute("sid", "500439741");
mta.setAttribute("cid", "500455258");
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(mta, s);
})();
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
Raven.config('http://9dc2c8f7612545538b278320fb9dbc31@sentry.qidian.com/4', {
whitelistUrls: [
/https?:\/\/(local|dev|oa|pre|)qidian\.gtimg\.com|https?:\/\/(local|dev|oa|pre|)www\.hongxiu\.com/
]
}).install();