监听页面复制的内容
document.body.oncopy = function() {
if(window.getSelection().toString() == wtpl_wx) {
var info = {};
info.dir = 'rswwt2';
info.title = $('TITLE').text();
info.code = 'CEYJ7QUMXQ';
info.app = 'resource';
info.url = window.location.href;
$.ajax({
type: "post",
url: "",
data: info,
dataType: "jsonp",
jsonp: "callback",
jsonpCallback: "success",
success: function(response) {
window.location.href = 'weixin://';
}
});
} else {
alert('你复制的不正确,不是微信号');
}
}