摘要: Page({ drawCanvas: function(ctx) {// 地址 ctx.setFontSize(14) ctx.setFillStyle('#9E7240') ctx.textAlign="center"; const txHash = this.data.info.txHash ? this.data.i... 阅读全文
posted @ 2019-01-18 10:50 Cynthia娆墨旧染 阅读(2768) 评论(0) 推荐(0) 编辑
摘要: drawCanvas: function(ctx) { //... // 昵称 ctx.setFontSize(16) //字体大小 ctx.setFillStyle('#fff') //字体颜色 ctx.textAlign="center"; //文字居中 ctx.fillText(this.da 阅读全文
posted @ 2019-01-18 10:47 Cynthia娆墨旧染 阅读(5183) 评论(0) 推荐(0) 编辑
摘要: page({ // 绘制canvas drawCanvas:function(){ const ctx = wx.createCanvasContext('poster') // 画圆形二维码 this.circleImg(ctx,this.data.canvasLotteryQR, 151.5, 阅读全文
posted @ 2019-01-18 10:44 Cynthia娆墨旧染 阅读(9840) 评论(0) 推荐(0) 编辑
摘要: //保存到手机相册save:function () { wx.canvasToTempFilePath({ x: 0, y: 0, width: 375, //导出图片的宽 height: 680, //导出图片的高 destWidth: 375 * 750 /... 阅读全文
posted @ 2019-01-18 10:37 Cynthia娆墨旧染 阅读(4212) 评论(0) 推荐(0) 编辑
摘要: // 选择微信自带地址 addAddr:function () { wx.chooseAddress({ success: function (res) { self.setData({ addrInfo:res //获取到地址存到data的addrInfo里 ... 阅读全文
posted @ 2019-01-18 10:34 Cynthia娆墨旧染 阅读(2152) 评论(0) 推荐(0) 编辑