feat:1.0.2 bug修复,引导页优化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { WATER_COLORS, PAPER_SIZE } from '../../constants/colors';
|
||||
import { WORDS } from '../../constants/words';
|
||||
import TextDrawService from '../../service/textDrawService';
|
||||
import { checkAndSaveImage } from '../../utils/saveImage';
|
||||
|
||||
Page({
|
||||
canvas: null as Canvas | null,
|
||||
@@ -196,26 +197,7 @@ Page({
|
||||
/** 下载打印 */
|
||||
exportToPrint() {
|
||||
if (this.canvas && this.data.cardList.length > 0) {
|
||||
wx.canvasToTempFilePath({
|
||||
canvas: this.canvas,
|
||||
fileType: 'png',
|
||||
quality: 1,
|
||||
success: (res) => {
|
||||
wx.getImageInfo({
|
||||
src: res.tempFilePath,
|
||||
success: (res) =>
|
||||
console.log(
|
||||
'getImageInfo image size :',
|
||||
res.width,
|
||||
res.height,
|
||||
), // 应输出2480x3508
|
||||
});
|
||||
wx.saveImageToPhotosAlbum({
|
||||
filePath: res.tempFilePath,
|
||||
success: () => wx.showToast({ title: '保存成功' }),
|
||||
});
|
||||
},
|
||||
});
|
||||
checkAndSaveImage(this.canvas);
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user