-1){
return true;
}else{
return false;
}
}
$(document).ready(function(){
// 解决图片跨域 无法生成分享图的问题 图片链接 加 http 不再有跨域问题
// var img=new Image;
// var imgUrl = $('.html2canvas .pro-img-deail').attr('imgurl');
// img.onload=function(){
// var old_canvas=document.createElement("canvas");
// old_canvas.width=img.width,old_canvas.height=img.height;
// var g=old_canvas.getContext("2d");
// g.drawImage(img,0,0,img.width,img.height);
// var newUrl = old_canvas.toDataURL();
// $('.html2canvas .pro-img-deail').css("backgroundImage","url(" + newUrl + ")");
// };
// img.crossOrigin="anonymous"; //关键
// img.src=imgUrl;
// end
showqrcode();
});
function showqrcode(){
//cdn.img-sys.com
$('.shareImg-mobile-btn').unbind().on('click',function(){
var imgpreview = 'https://gcdn.meidianbang.cn/comdata/112330/product/202512161644490FF89B7121E3F87E_s.jpg'.replace('https://gcdn.meidianbang.cn','');
$(".pro-img-deail").html('

');
$("#shareContent").css("background-image","url("+window.location.protocol+'//'+window.location.host+"/images/posterbg.png?cdn=0)")
$('.bgcolor').css('background-color',$('.enquiry').css('background-color'))
var PosterIcon = '/comdata/112330/202601/20260127125342ddfccf.png'
if(PosterIcon != '' ){
$("#jq-logo").html('

');
}
$('.imgmodal').show();
if(!$('.img-show').hasClass('imghas')){
$('.imgmodal-txt').addClass('showhide');
$('.img-show').addClass('imghas');
var lang = getCookie('Lang')
$('.Productqrurl').val(window.location.pathname)
var qrurl = 'chandar.cn/'+lang+($('#qrurl').val()+'').replace('/' + lang ,'');
var params = {text:window.location.protocol+'//'+qrurl,width:80,height:80};
// if("" != ''){
// var logourl = "?cdn=0";
// var params = {text:window.location.protocol+'//'+qrurl,logo:logourl,width:74,height:74,logoborder:1,logowidth:30,logoheight:30,logopadding:2};
// }
// else{
// var params = {text:window.location.protocol+'//'+qrurl,width:74,height:74};
// }
var cc = $('.html2canvas').html();
$('.html2canvas').remove();
$('#shareContent').html(cc);
$('#jq-qrcode').qrcode(params);
//延时一下,保证图片加载正常
var sleep = setInterval(function(){
createQrcodeImg();
clearInterval(sleep)
},2000)
}
var scroll = $(document).scrollTop();
$('body,html').addClass('overflow');
$('.BodyCenter').addClass('fixed');
$('.img-closebtn').off().on('click',function(){
$('.imgmodal').hide();
$('#shareContent').hide();
$('body,html').removeClass('overflow');
$('.BodyCenter').removeClass('fixed');
$(document).scrollTop(scroll);
});
});
}
$(window).load(function(){
// if(isIOS()){
// $('.copylink').remove();
// }
});
// function
Long press to look detail
Copy product links
Long by picture save/share