//二维码
var QRCode = require('qrcode')
//width height 代表精度
QRCode.toDataURL('I am a pony!', {width:512,height:512,margin:0.5, errorCorrectionLevel: 'L' }, (err, url)=> {
console.log(url)
const img=document.createElement("img")
img.src=url;
const base = new PIXI.BaseTexture(img);
const texture = new PIXI.Texture(base);
const sprite = new PIXI.Sprite(texture);
this.addChild(sprite);
sprite.width=280
sprite.height=280
sprite.x=240
sprite.y=405