Ask for help about the two-dimensional code picture generated by jquery-qrcode.js, which is in wechat.

  node.js, question
return this.each(function(){
 //Plug-in Source Code
 // var element    = options.render == "canvas" ?   createCanvas() : createTable();
 // $(element).appendTo(this);
 
 //Revised
 var _this = this, img, element,
 element   = options.render == "canvas" ?   createCanvas() : createTable();
 
 element = element.toDataURL("image/png");
 img = new Image();
 img.src = element;
 img.onload = function(){
 $(_this).append(img)
 };
 
 });

clipboard.png

The original function of the plug-in is to generate a two-dimensional code of the canvas type. I converted the source canvas into a Joint Photographic Experts Group, which can recognize the two-dimensional code, but clicking and sending it to a friend did not respond. Please help me to see what the problem is.

First use thisQRcodeYou can directly specify render: ‘image’, and resizing also specifies a size instead of width and height.

However, I built a page test locally, and the iphone did not show it to send to friends. It is probably because the address of the picture is too long. It is suggested that the server should generate a two-dimensional code.