Loading…

Get QR code

```javascript WXAPI.commonQrcode({ content: 'Content of QR code', width: 300 }) ``` + content The content of the QR code can be a link or plain text. The content can be read after scanning the code. It is not easy to have too much text, otherwise the graphics may not be saved and an error will be reported. + width is the width of the QR code. If this parameter is not passed, the default is 300. + expireHours How many hours the picture will be saved. After the time is up, the picture will be automatically deleted, saving you storage space. ```json { "code": 0, "data": "https://7.s2m.cc/cuser/951/2022/03/23/72804fbc-9048-44f1-942d-bc57cdd6c57c.png", "msg": "success" } ``` + data is the image address of the mini program code