copyToClipboard: function() {
var $temp = document.createElement("input");
var val = window.location.href || "";
document.body.appendChild($temp);
$temp.value = val;
$temp.select();
$temp.setSelectionRange(0, val.length); //兼容iphone safari
try{
document.execCommand("copy")
}
catch(err){}
$temp.remove();
}
var $temp = document.createElement("input");
var val = window.location.href || "";
document.body.appendChild($temp);
$temp.value = val;
$temp.select();
$temp.setSelectionRange(0, val.length); //兼容iphone safari
try{
document.execCommand("copy")
}
catch(err){}
$temp.remove();
}