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

[BGF]修复二维码中间的图片跨域导致canvas.toDataURL报错 #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NJZY8856
Copy link

image
如上图,设置二维码中间的图片是第三方网络资源图时,会报如下canvas里的图片跨域的错
image
修复:在loadImage方法里面设置crossOrigin 属性,允许跨域,虽然这只对静态资源服务器设置了access-control-allow-origin: *的图片有效,但还是可以满足大部分场景的需求

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

Successfully merging this pull request may close these issues.

None yet

1 participant