From 3678cfe35fb9bae556f4bedad6b0a5aca4cfd928 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=9D=E5=BF=83?= <13773726377@163.com>
Date: Tue, 10 Mar 2026 09:55:50 +0800
Subject: [PATCH] 1
---
src/pageHome/welfare/certificate-list.vue | 19 ++++---
src/pages/client/home/index.vue | 67 +++++++++++------------
2 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/src/pageHome/welfare/certificate-list.vue b/src/pageHome/welfare/certificate-list.vue
index 764fd00..9212925 100644
--- a/src/pageHome/welfare/certificate-list.vue
+++ b/src/pageHome/welfare/certificate-list.vue
@@ -209,8 +209,7 @@ async saveCurrentImage() {
title: '生成图片中...',
mask: true
});
-
- try {
+ try {
// 获取 Canvas 节点
const query = tt.createSelectorQuery();
const canvasNode = await new Promise((resolve, reject) => {
@@ -252,29 +251,32 @@ async saveCurrentImage() {
ctx.fillStyle = '#FF19A0';
ctx.textAlign = 'center';
- // 绘制证书标题
+ // 绘制证书标题 - 增加顶部间距
const title = currentItem.title || '为爱续航证书';
- ctx.fillText(title, this.canvasWidth / 2, 50);
+ ctx.fillText(title, this.canvasWidth / 2, 65); // 从50改为65,增加间距
// 绘制英文标题
ctx.font = '12px sans-serif';
const titleEn = currentItem.title_en || 'Certificate of Love Endurance';
- ctx.fillText(titleEn, this.canvasWidth / 2, 70);
+ ctx.fillText(titleEn, this.canvasWidth / 2, 85); // 从70改为85,增加间距
// 绘制用户名
ctx.font = '16px sans-serif';
const userName = this.userName || '周佳佳';
- ctx.fillText(userName, this.canvasWidth / 2, 100);
+ ctx.fillText(userName, this.canvasWidth / 2, 110); // 从100改为110,增加间距
// 绘制描述文本
ctx.font = '12px sans-serif';
ctx.fillStyle = '#333333';
ctx.textAlign = 'left';
const description = `您累计捐赠${currentItem.source_value || 0}克粮,为毛孩子奉献爱心,点燃希望,感谢您的捐赠让世界变得更温暖。`;
- this.wrapText(ctx, description, 20, 130, this.canvasWidth - 40, 16);
+ this.wrapText(ctx, description, 20, 140, this.canvasWidth - 40, 16); // 从130改为140,增加间距
// 绘制结尾文字
- ctx.fillText('特发此证,以表谢忱!', 20, 200);
+ ctx.font = '12px sans-serif';
+ ctx.fillStyle = '#333333';
+ ctx.textAlign = 'left';
+ ctx.fillText('特发此证,以表谢忱!', 20, 180); // 从200改为180,向上移动
// 绘制证书编号
ctx.font = '10px sans-serif';
@@ -334,6 +336,7 @@ async saveCurrentImage() {
});
console.error('生成证书图片失败:', error);
}
+
},
generateCertificateTemplate() {
// 使用存储的证书信息
diff --git a/src/pages/client/home/index.vue b/src/pages/client/home/index.vue
index 6d0ed24..4719905 100644
--- a/src/pages/client/home/index.vue
+++ b/src/pages/client/home/index.vue
@@ -62,21 +62,21 @@
-
- 关爱宠物,传递温情
- 公益助力
- 帮我找个家
+
+ 狗狗训练
+ 上门服务
+ 上门训犬、寄养、喂猫、遛狗
-
+