feat:1.0.2 bug修复,引导页优化

This commit is contained in:
2025-07-03 11:04:52 +08:00
parent fdf8a31f32
commit ef39c86d5f
9 changed files with 120 additions and 39 deletions
+2 -20
View File
@@ -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;
}
},