var uFans = { startSupportRead: function () { var uname = jQuery.cookie("waplogname"); if (uname != undefined && uname != "") { if (spmymoney == 0) { } else { uFans.startSupport(); } } else { layer.open({ content: '请先登录', style: BookDetail.msgStyle, time: 2 }); } }, startSupport: function () { var rStr = ''; rStr += '
'; rStr += '

我要捧场作品

'; rStr += '
'; rStr += '
'; rStr += ' '; rStr += '
'; rStr += '

当前剩余' + spmymoney + '屋币  本次捧场500屋币[充值]

'; rStr += '

'; rStr += '

立即捧场

'; $("#showPC").html(rStr); $("#showPC").show(); $(".maskBox").show(); $(".pcBox .propsList li").click(function () { $(".pcBox .propsList li").removeClass("on"); $(this).addClass("on"); $("#pcTotal").html($(this).attr("vals")); }) }, closeBox: function () { $(".pcBox,.flowerBox,.newsTipBox,.maskBox").hide(); }, SendSupport: function () { var uname = jQuery.cookie("waplogname"); if (uname != undefined && uname != "") { var moneyTotal = spmymoney; var moneySupport = parseInt($("#pcTotal").html()); var sendNote = $("#sendSupportNote").val(); var clearSendNote = sendNote.replace(/[\ |\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?]/g, ""); if (sendNote == "") { layer.open({ content: '感谢您的捧场,留句话鼓励作者吧!', style: BookDetail.msgStyle, time: 2 }); return; } if (clearSendNote.length<5) { layer.open({ content: '评论最少5个字符!', style: BookDetail.msgStyle, time: 2 }); return; } if (moneyTotal >= moneySupport) { var BId = currentBId; } else { layer.open({ content: '屋币余额不足', style: BookDetail.msgStyle, time: 2 }); } } else { layer.open({ content: '请先登录', style: BookDetail.msgStyle, time: 2 }); } }, GetSupport: function (BId) { }, GetFlower: function (BId) { }, showNote: function (noteClass) { uFans.closeBox(); $(".maskBox").show(); var rStr = ''; rStr += '
'; rStr += '

消息提示

'; rStr += '
'; if (noteClass == 'pc') { rStr += '
捧场作品成功!
'; } else { rStr += '
点赞作品成功!
'; } rStr += '
'; rStr += ' 确定'; rStr += '
'; $("#showNote").html(rStr); $("#showNote").show(); }, formatDateTime: function (now) { if (now != null && now != "") { var dateN = new Date(+/\d+/.exec(now)[0]); var year = dateN.getFullYear(); var month = dateN.getMonth() + 1; var date = dateN.getDate(); var hour = dateN.getHours(); var minute = dateN.getMinutes(); var second = dateN.getSeconds(); minute = parseInt(minute) < 10 ? "0" + minute : minute; if (hour == 0 && minute == 0 && second == 0) { return year + "-" + month + "-" + date; } else { return month + "-" + date + " " + hour + ":" + minute; } } else { return ""; } } }