We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
项目中有用到 wx.canvasToTempFilePath,看到框架已经有一些实现代码,尝试连起来,未果。发现一个 bug。
出错代码在 h5/src/view/components/wx-canvas.js
var dataUrl = self.$.canvas.toDataURL();
搜索Error信息,网上的结果是 [跨域问题] (https://stackoverflow.com/questions/2390232/why-does-canvas-todataurl-throw-a-security-exception?noredirect=1&lq=1), 但是我并没有修改image地址,image 只是本地图片/image/wechat.png. 好像上次 getImageInfo 修复前还没有这个bug(待确认)
/image/wechat.png
The text was updated successfully, but these errors were encountered:
Html5 Canvas with Cross-Domain content
h5 将 canvas 的位置信息发送给客户端,客户端去对应位置截图
客户端实现 canvas 组件
客户端中起一个local server,所有本地资源从 server 中拉取,这样它们都在同一个域中
将 Webview 初始化时设置的 baseurl 改为http://test.com/ ,使用NSURLProtocol拦截本地请求
图片都使用网络资源,但需要服务器对其设置CORS 请求头
微信可能用的方案二?我也不晓得客户端能不能做。。。
Sorry, something went wrong.
@IOriens 根据微信小程序官方论坛里的资料,微信使用的方案二。坑有点大~~
@liwangqiang 下一步应该是要把这几个组件 Native 化的,要辛苦客户端同学了😆
@IOriens iOS 测试了下
No branches or pull requests
项目中有用到 wx.canvasToTempFilePath,看到框架已经有一些实现代码,尝试连起来,未果。发现一个 bug。
如何重现
出错代码在 h5/src/view/components/wx-canvas.js
搜索Error信息,网上的结果是 [跨域问题]
(https://stackoverflow.com/questions/2390232/why-does-canvas-todataurl-throw-a-security-exception?noredirect=1&lq=1), 但是我并没有修改image地址,image 只是本地图片
/image/wechat.png
.好像上次 getImageInfo 修复前还没有这个bug(待确认)The text was updated successfully, but these errors were encountered: