# createQRCode

原生生成二维码 返回base64

# 调用方式

createQRCode(params)
1

返回 Promise,使用 then/catch 或 await 处理结果。

# 请求参数

Prop Type Default Description
width Number 宽度
height Number 高度
content String 待转码内容

# 接口调用示例

const params2 = {
  height: 400,
  width: 400,
  content: `qrcode.midea.com/share_device?token=${this.token}`,
};
this.$bridge.createQRCode(params2)
1
2
3
4
5
6

# 返回参数

  • 返回 base64 格式的二维码图片

# 接口返回示例

this.$bridge.createQRCode(params2).then((base64Res) => {
  this.qrImgUrl = base64Res.data;
});
1
2
3