- 云托管中 构建时长是什么意思?
[图片] 如题,请问这个构建时长是什么意思呢?
2022-10-29 - 请问如何把画布图片生成到图片url呢?
//wxml部分 <canvas type="2d" canvas-id="ceshier" id="ceshierr"style="height:{{bili_hh}}rpx;width:600rpx;"></canvas> //js部分 canvas_pic(url,width,height){ var then=this var bili=parseInt(height/width*300) this.setData({bili_hh:parseInt(height/width*600)}) const query = wx.createSelectorQuery() query.select('#ceshierr') .fields({ node: true, size: true }) .exec((res) => { const canvas = res[0].node const ctx = canvas.getContext('2d') const dpr = wx.getSystemInfoSync().pixelRatio var img = canvas.createImage() canvas.width = res[0].width * dpr canvas.height = res[0].height * dpr img.src=url img.onload=()=>{ ctx.drawImage(img,0,0,300,bili) } ctx.scale(dpr, dpr) ctx.fillRect(0, 0, 100, 100) }) }, 以上是代码,想生成图片url,不知道加在哪里。求大神帮助 wx.canvasToTempFilePath({ x: 100, y: 200, width: 50, height: 50, destWidth: 100, destHeight: 100, canvasId: 'ceshierr', success(res) { console.log(res.tempFilePath) } }) 官方写2.90版本后,加在darw()里面,不知道哪个地方是darw,下面这个代码请问如何加到上面 把图片生成url呢?
2022-05-13 - 无法安装node.js进行本地调试,并且提示npm失败,如何解决呢?
开始下载了一个node.js,安装完还是无法本地调试,搞了几天了还是不行,新手希望能有高手帮助下,在线等~ [图片] [图片] [图片] [图片]
2021-11-30