Packaging & Shipping
Payment |
Payment term: L/C, Alipay, Paypal, West Union, T/T and Cash |
var lang = getCookie("Lang");
var cururl = window.location.protocol + '//' + window.location.host + '/' + window.location.pathname.replace('/', '')
function copylink() {
var clipboard = new Clipboard('body', {
text: function () {
return document.title + '\n' + cururl
},
});
clipboard.on('success', function (e) {
alert('Copy success!');
e.clearSelection();
clipboard.destroy()
});
clipboard.on('error', function (e) {
prompt('复制失败,请选中后手动复制!', cururl);
});
}
function createQrcodeImg() {
var shareContent = document.querySelector("#shareContent");// 需要绘制的部分的 (原生)dom 对象 ,注意容器的宽度不要使用百分比,使用固定宽度,避免缩放问题
var scaleBy = 2.5; //获取像素密度的方法 (也可以采用自定义缩放比例)
var offsetTop = shareContent.offsetTop; //元素距离顶部的偏移量
var width = shareContent.offsetWidth; // 获取(原生)dom 宽度
var height = shareContent.offsetHeight * 2.5; // 获取(原生)dom 高
var canvas = document.createElement('canvas'); //创建canvas 对象
var context = canvas.getContext('2d');
canvas.width = width * scaleBy; //这里 由于绘制的dom 为固定宽度,居中,所以没有偏移
canvas.height = (height + offsetTop) * scaleBy; // 注意高度问题,由于顶部有个距离所以要加上顶部的距离,解决图像高度偏移问题
context.scale(scaleBy, scaleBy);
var opts = {
allowTaint: true,//允许加载跨域的图片
tainttest: true, //检测每张图片都已经加载完成
scale: scaleBy, // 添加的scale 参数
canvas: canvas, //自定义 canvas
logging: true, //日志开关
width: width, //dom 原始宽度
height: height //dom 原始高度
};
html2canvas(shareContent, opts).then(function (canvas) {
var dataUrl = canvas.toDataURL();
var newImg = document.createElement("img");
newImg.src = dataUrl;
$('.img-show').html(newImg);
$('#shareContent').remove();
$('.imgmodal-txt').removeClass('showhide');
});
}
function isIOS() {
var userAgent = navigator.userAgent; //取得浏览器的userAgent字符串
if (userAgent.indexOf('iPhone') > -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() {
$(".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 = ''
if (PosterIcon != '') {
$("#jq-logo").html('');
}
$('.shareImg-mobile-btn').unbind().on('click', function () {
$('.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 = $('#qrurl').val();
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
EC360BLR piston pump K3V180DTP hydraulic main pump with 1 stage gear pump EC360B VOE14500380 14516492 14512271
ec360blr-piston-pump-k3v180dtp-hydraulic-main-pump-with-1-stage-gear-pump-ec360b-voe14500380-14516492-14512271
Long press to look detail
Copy product links
Long by picture save/share
You have no items to
require
EC360BLR piston pump K3V180DTP hydraulic main pump with 1 stage gear pump EC360B VOE14500380 14516492 14512271
Add to inquiry
You have no items to
require