# createQRCode
原生生成二维码,返回base64图片
# 请求参数
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
width | Number | Y | - | 二维码宽度 |
height | Number | Y | - | 二维码高度 |
content | String | Y | - | 二维码内容 |
# 参数代码示例
// 生成二维码
const params = {
height: 400,
width: 400,
content: 'qrscan.aiiciot.com/home/invitation?token=xxx&homegroupId=xxx'
}
this.$bridge.createQRCode(params).then(base64Res => {
// base64Res.data 为二维码图片的 base64 数据
this.qrImgUrl = base64Res.data
})
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
# 返回参数
- 返回 base64 格式的二维码图片