|
@@ -79,17 +79,19 @@ Component({
|
|
|
y: 0,
|
|
|
width: 370,
|
|
|
height: 507,
|
|
|
- destWidth: 370,
|
|
|
- destHeight: 507,
|
|
|
+ // destWidth: 370,
|
|
|
+ destWidth: 1110,
|
|
|
+ // destHeight: 507,
|
|
|
+ destHeight: 1521,
|
|
|
canvasId: 'myCanvas',
|
|
|
success: (res) => {
|
|
|
console.log(res.tempFilePath)
|
|
|
- wx.saveImageToPhotosAlbum({
|
|
|
- filePath: res.path,
|
|
|
- success(res) {
|
|
|
- console.log(res);
|
|
|
- }
|
|
|
- })
|
|
|
+ // wx.saveImageToPhotosAlbum({
|
|
|
+ // filePath: res.path,
|
|
|
+ // success(res) {
|
|
|
+ // console.log(res);
|
|
|
+ // }
|
|
|
+ // })
|
|
|
that.setData({
|
|
|
imgUrls: res.tempFilePath
|
|
|
}, () => {
|
|
@@ -158,6 +160,17 @@ Component({
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ //关闭弹框
|
|
|
+ close: function(e){
|
|
|
+ console.log(e)
|
|
|
+ this.setData({
|
|
|
+ shareFlag: !this.data.shareFlag,
|
|
|
+ imgUrls: ''
|
|
|
+ })
|
|
|
+ },
|
|
|
+ nothing: function(e){
|
|
|
+ return
|
|
|
+ },
|
|
|
// 保存图片到本地
|
|
|
saveImg: function () {
|
|
|
console.log('yibuububu')
|
|
@@ -269,7 +282,7 @@ Component({
|
|
|
ctx.fillText('已使出洪荒之力,声情并茂的为', (370 - ctx.measureText('已使出洪荒之力,声情并茂的为').width) / 2, 138)
|
|
|
ctx.fillText(`《${this.data.title}》`, (370 - ctx.measureText(`《${this.data.title}》`).width) / 2, 160)
|
|
|
ctx.fillText(`配了一段惊世之作`, (370 - ctx.measureText(`配了一段惊世之作`).width) / 2, 182)
|
|
|
- ctx.drawImage(this.data.iconImg, 9, 205, 352, 145);
|
|
|
+ ctx.drawImage(this.data.iconImg, 9, 205, 704, 145);
|
|
|
ctx.setFontSize(18)
|
|
|
ctx.setFillStyle('#000')
|
|
|
ctx.drawImage('../../../static/groupImg/share_bottom.png', 3, 419, 370, 192);
|
|
@@ -327,7 +340,8 @@ Component({
|
|
|
PreservationImg: function () {
|
|
|
wx.saveImageToPhotosAlbum({
|
|
|
filePath: this.data.imgUrls,
|
|
|
- success(res) {
|
|
|
+ success: (res)=> {
|
|
|
+ console.log(res)
|
|
|
this.setData({
|
|
|
imgUrls: false
|
|
|
})
|