- ios wxss 引入var变量无效,如何解决?
需求:实现文字框无限循环滚动,文字长度不定 开发:在安卓及pc端实现有效,ios无效,初步判定ios端 wxss引入var变量无效 代码:[图片] [图片] [图片] [图片] 救救孩子,ios用不了
2021-10-20 - 用canvas画布背景图画出来是黑色的,这是为什么?
[图片] createNewImg(){ var that = this; const query = wx.createSelectorQuery() var canvas = query.select('#mycanvas') query.select('#mycanvas') .fields({ node: true, size: true }) .exec((res) => { const canvas = res[0].node const context = canvas.getContext('2d') const imaUpload = canvas.createImage() console.log() imaUpload.src ='https://www.linkedsign.cn/Photo/Beauty/ChamberOfCommerce/20210907/yqh.png' // console.log(1) imaUpload.onload = function (){ context.drawImage(imaUpload, 0, 0, 345, 550) console.log(context) const dpr = wx.getSystemInfoSync().pixelRatio canvas.width = res[0].width * dpr canvas.height = res[0].height * dpr // console.log(res[0].width) context.scale(dpr, dpr) context.fillRect(0, 0, 100, 100) context.save(); var titl = that.data.Title; context.fillStyle='#191919'; context.textAlign='left'; context.font = 'normal bold 18px sans-serif'; context.fillText('嘻嘻哈哈', 60, 270); context.stroke(); context.save(); // context.draw(true) wx.canvasToTempFilePath({ canvasId:'mycanvas', // quality:'jpg', canvas:canvas, success:res=>{ console.log(res) that.setData({ imageUrl:res.tempFilePath }) } }) } }) }
2021-09-07 - 如何实现短息跳转小程序携带动态参数?
[图片][图片] 在h5页面获取不到任何想要携带的参数 如何获取到小程序里面的参数带过去 如何实现
2021-03-30