- picker mode = time IOS选择出现上午下午,返回数据无上午下午标识
picker mode = time IOS选择出现上午下午,返回数据无上午下午标识且返回数据中detail.value为12小时制
2020-04-27 - canvasToTempFilePath开发工具正常,手机执行图片被截取,怎么回事?
wx.getImageInfo({ src: url,//服务器返回的图片地址 success: function (res) { //res.path是网络图片的本地地址 let Path = res.path; let width = res.width; let height = res.height; let w = (width > height) ? height : width; that.setData({ w: w, h: w, }) //let w = width > height ? height : width; const ctx = wx.createCanvasContext('share1'); ctx.drawImage(Path, (w - width) / 2, (w - height) / 2, width, height) ctx.save(); console.log(res) ctx.draw(false, () => { wx.canvasToTempFilePath({ canvasId: 'share1', success: function (res) { that.setData({ [key]: res.tempFilePath, t2:true }) }, fail(res) { console.log(res); } }) }) }, fail: function (res) { //失败回调 } }) 工具正常返回最短边像素X最短边像素图片, 手机返回为长方形图片,并且不完整 [图片][图片]
2020-04-08