Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid array length #10

Open
flexmodule opened this issue Jul 8, 2020 · 1 comment
Open

Invalid array length #10

flexmodule opened this issue Jul 8, 2020 · 1 comment

Comments

@flexmodule
Copy link

微信小程序andriod9版本以上,报错

@rawKylin
Copy link

rawKylin commented Jan 11, 2022

源码中var _data = new Array(width * height);更改为var _data = new Array(parseInt(width) * parseInt(height)); 设置新数组时长度不支持小数,必须为正整数。
如果不更改源码 则size的值设置为正整数
QR.drawImg(?dishOrderNo=${this.requestParams.dishOrderNo}+a, {
typeNumber: 4,
errorCorrectLevel: 'M',
size: width //正整数
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants