if(weixin_name=="c1"){weixin_name="rcgushi";weixin_name3="rcgushi";weixin_name4="若初故事";}else if(weixin_name=="c2"){weixin_name="rcgushi";weixin_name3="rcgushi";weixin_name4="若初故事";}else if(weixin_name=="c3"){weixin_name="rcgushi";weixin_name3="rcgushi";weixin_name4="若初故事";}else if(weixin_name=="c4"){weixin_name="rcgushi";weixin_name3="rcgushi";weixin_name4="若初故事";}else{weixin_name="rcgushi";weixin_name3="rcgushi";weixin_name4="若初故事";}
var clipboard = new Clipboard('#btn-copy-wechat',{
text: function() {
return weixin_name3;
}
});
clipboard.on('success',
function(e) {
$("#msgcnt").html("公众号"+weixin_name4+"已复制成功,是否立即跳转到微信搜索该公众号?");
$(".popup-close").html("确定");
$("#pop-main").show();
});
clipboard.on('error',
function(e) {
$("#msgcnt").html("公众号"+weixin_name4+"已复制成功,是否立即跳转到微信搜索该公众号?");
$(".popup-close").html("确定");
$("#pop-main").show();
});
var clipboard2 = new Clipboard('#copy-name',{
text: function() {
return weixin_name3;
}
});
clipboard2.on('success',
function(e) {
$("#msgcnt").html("微信搜索关注"+ weixin_name4 +",马上回复书名《"+ book_name +"》。");
$(".popup-close").html("确定");
$("#pop-main").show();
});
clipboard2.on('error',
function(e) {
$("#msgcnt").html("微信搜索关注"+ weixin_name4 +",马上回复书名《"+ book_name +"》。");
$(".popup-close").html("确定");
$("#pop-main").show();
});
var clipboard3 = new Clipboard('#copy-bn',{
text: function() {
return book_number.replace(/^\s+|\s+$/g,"");;
}
});
clipboard3.on('success',
function(e) {
$("#msgcnt").html("微信搜索关注"+ weixin_name4 +",马上回复:"+ book_number +"。");
$(".popup-close").html("确定");
$("#pop-main").show();
});
clipboard3.on('error',
function(e) {
$("#msgcnt").html("微信搜索关注"+ weixin_name4 +",马上回复:"+ book_number +"。");
$(".popup-close").html("确定");
$("#pop-main").show();
});
var cImg="/cover/"+weixin_name+".jpg";
$("img").attr("src",cImg);
$("#cname").text(weixin_name4);
function gowechat() {
var ua = navigator.userAgent.toLowerCase();
if (ua.indexOf("baidu") > -1) {
$("#pop-main").hide();
} else {
window.location.href = 'weixin://';
}
}
function gocancel() {
$("#pop-main").hide();
}
function getClientHeight()
{
var clientHeight=0;
if(document.body.clientHeight&&document.documentElement.clientHeight){
var clientHeight = (document.body.clientHeightdocument.documentElement.clientHeight)?document.body.clientHeight:document.documentElement.clientHeight;
}
return clientHeight;
}
document.getElementsByClassName("warp")[0].style.height= (getClientHeight() - 120) + "px";
window.onresize=function(){
document.getElementsByClassName("warp")[0].style.height= (getClientHeight() - 120) + "px";
}