haiying-zheng

原本的qrcodejs在小程序上运行不了,因此对其进行了修改,并且删去了不适用的代码。

下载地址

使用方法如下:

wxml

<canvas canvas-id="canvas" style="width: 300px; height: 300px"></canvas>

js

 1 var qrcode = new QRCode(\'canvas\', {
 2     text: \'http://jindo.dev.naver.com/collie\',
 3     width: 300,
 4     height: 300,
 5     colorDark : \'#000000\',
 6     colorLight : \'#ffffff\',
 7     correctLevel : QRCode.correctLevel.H
 8 });
 9 
10 qrcode.clear(); // clear the code.
11 qrcode.makeCode(\'http://naver.com\'); // make another code.

 

分类:

技术点:

相关文章:

  • 2021-12-19
  • 2022-01-02
  • 2021-12-24
  • 2021-08-16
  • 2021-08-09
  • 2022-01-17
  • 2021-11-27
猜你喜欢
  • 2021-12-13
  • 2021-12-23
  • 2021-12-26
  • 2021-10-15
相关资源
相似解决方案