{"action":"created","issue":{"url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas/issues/101","repository_url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas","labels_url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas/issues/101/labels{/name}","comments_url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas/issues/101/comments","events_url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas/issues/101/events","html_url":"https://github.com/jasondu/wxa-plugin-canvas/issues/101","id":425194423,"node_id":"MDU6SXNzdWU0MjUxOTQ0MjM=","number":101,"title":"图片有时候画不出来 有时候只是显示了之前的图片","user":{"login":"w19871029","id":5523615,"node_id":"MDQ6VXNlcjU1MjM2MTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5523615?v=4","gravatar_id":"","url":"https://api.github.com/users/w19871029","html_url":"https://github.com/w19871029","followers_url":"https://api.github.com/users/w19871029/followers","following_url":"https://api.github.com/users/w19871029/following{/other_user}","gists_url":"https://api.github.com/users/w19871029/gists{/gist_id}","starred_url":"https://api.github.com/users/w19871029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w19871029/subscriptions","organizations_url":"https://api.github.com/users/w19871029/orgs","repos_url":"https://api.github.com/users/w19871029/repos","events_url":"https://api.github.com/users/w19871029/events{/privacy}","received_events_url":"https://api.github.com/users/w19871029/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-03-26T02:15:36Z","updated_at":"2019-03-26T02:25:42Z","closed_at":null,"author_association":"NONE","body":"我是一条信息 画一个海报 有时候画不出来 空白 有时候 画出来的是之前画过的图片 不是我给他的图片地址"},"comment":{"url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas/issues/comments/476449242","html_url":"https://github.com/jasondu/wxa-plugin-canvas/issues/101#issuecomment-476449242","issue_url":"https://api.github.com/repos/jasondu/wxa-plugin-canvas/issues/101","id":476449242,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3NjQ0OTI0Mg==","user":{"login":"w19871029","id":5523615,"node_id":"MDQ6VXNlcjU1MjM2MTU=","avatar_url":"https://avatars3.githubusercontent.com/u/5523615?v=4","gravatar_id":"","url":"https://api.github.com/users/w19871029","html_url":"https://github.com/w19871029","followers_url":"https://api.github.com/users/w19871029/followers","following_url":"https://api.github.com/users/w19871029/following{/other_user}","gists_url":"https://api.github.com/users/w19871029/gists{/gist_id}","starred_url":"https://api.github.com/users/w19871029/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w19871029/subscriptions","organizations_url":"https://api.github.com/users/w19871029/orgs","repos_url":"https://api.github.com/users/w19871029/repos","events_url":"https://api.github.com/users/w19871029/events{/privacy}","received_events_url":"https://api.github.com/users/w19871029/received_events","type":"User","site_admin":false},"created_at":"2019-03-26T02:25:42Z","updated_at":"2019-03-26T02:25:42Z","author_association":"NONE","body":"shareFun:function(e){\r\n                var that = this,\r\n                    dataset = e.currentTarget.dataset,\r\n                    urlArr = dataset.url.split(\"?\");\r\n                wx.showLoading({ mask: true, title: '生成中' });\r\n                wx.request({\r\n                    url:api.get_qrcode.url,\r\n                    method: \"post\",\r\n                    contentType: \"application/json\",\r\n                    responseType: 'arraybuffer',\r\n                    data:{\r\n                        scene:\"0#\"+urlArr[1].split(\"=\")[1],\r\n                        page:urlArr[0]\r\n                    },\r\n                    success: function (res) {\r\n                        const fsm = wx.getFileSystemManager();\r\n                        let name = 'qr.jpg'\r\n                        let filePath = `${wx.env.USER_DATA_PATH}/${name}`\r\n                        fsm.writeFile({\r\n                            filePath,\r\n                            data: res.data, // bs就是拿到的arraybuffer\r\n                            encoding: 'binary',\r\n                            success:()=>{\r\n                                dataset.qrUrl = filePath;\r\n                                wx.getImageInfo({\r\n                                    src: dataset.imageurl,  // 这里填写网络图片路径\r\n                                    success: (res) => {\r\n                                        dataset.width=res.width;\r\n                                        dataset.height=res.height;\r\n                                        that.onCreatePoster(dataset);\r\n                                        // 这个是我封装的裁剪图片方法（下面将会说到）\r\n                                        util.drawImage(res.path, res.width, res.height,{\r\n                                            text:(dataset.topic_name) ? '来自#'+dataset.topic_name : '来自'+dataset.account_name,\r\n                                            desc:dataset.desc\r\n                                        }, (img) => {\r\n                                            //wx.hideLoading();\r\n                                            //img为最终裁剪后生成的图片路径，我们可以用来做为转发图\r\n                                            dataset.imageurl = img;\r\n                                            that.shareData = dataset;\r\n                                            that.$apply();\r\n                                        });\r\n                                    }\r\n                                });\r\n                            },\r\n                            fail(e) {\r\n\r\n                            }\r\n                        })\r\n                    }\r\n                });\r\n            }"}}
{"actor":{"display_login":"w19871029"}}