//保存到手机相册save:function () {        wx.canvasToTempFilePath({            x: 0,            y: 0,            width: 375, //导出图片的宽            height: 680, //导出图片的高            destWidth: 375 * 750 / wx.getSystemInfoSync().windowWidth, //绘制canvas的时候用的是px, 这里换算成rpx ,导出后非常清晰            destHeight: 680 * 750 / wx.getSystemInfoSync().windowWidth, //同上 px 换算成 rpx            canvasId: 'poster',            success: function (res) {                wx.saveImageToPhotosAlbum({                    filePath: res.tempFilePath,                })                wx.showToast({                    title: '保存成功',                    icon: 'success',                    duration: 2000                })            },            fail:function (res) {                wx.showToast({                    title: '系统繁忙,请重试',                    icon: 'success',                    duration: 2000                })            }        })    },

 

小程序

TAG标签: 微信小程序680

http://www.xiaochengxub.com/read-100504.html