feat: 添加小程序码,增加分享功能

This commit is contained in:
2025-06-20 17:20:28 +08:00
parent 56e8e15620
commit 4c94fa28f9
11 changed files with 48 additions and 32 deletions
+1 -5
View File
@@ -1,9 +1,5 @@
{
"pages": [
"pages/index/index",
"demoPages/textPaint/textPaint",
"demoPages/textPaint2/textPaint"
],
"pages": ["pages/index/index"],
"window": {},
"style": "v2",
"rendererOptions": {
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

+1 -1
View File
@@ -17,7 +17,7 @@ export function setCanvasSize(canvas: Canvas, paperSize: PaperSize) {
}
export async function getMiniCodeImage(canvas: Canvas) {
return getImage(canvas, '/assets/imgs/mini-code.jpg');
return getImage(canvas, '/assets/imgs/doodle-mini-code.jpg');
}
export async function getImage(canvas: Canvas, path: string) {
+13
View File
@@ -182,4 +182,17 @@ Page({
this.setData({ showIntroductionPopup: false });
wx.setStorageSync('hasShowIntroduction', true);
},
onShareAppMessage() {
return {
title: '涂鸦丫 - 涂色|识字|画画|打印',
path: '/pages/index/index',
};
},
onShareTimeline() {
return {
title: '涂鸦丫 - 涂色|识字|画画|打印',
query: '/pages/index/index',
};
},
});
+1 -1
View File
@@ -1,6 +1,6 @@
<view class="page-container">
<view class="wrapper">
<text class="wrapper-title">设置文字和颜色12</text>
<text class="wrapper-title">自定义涂鸦卡</text>
<word-input bind:onConfirm="onConfirmInput" />
<view class="word-card-box">
<block
+2 -2
View File
@@ -61,8 +61,8 @@ class TextDrawService {
this.ctx = ctx;
this.paperSize = 'A4';
this.options = {
appName: '涂鸦',
appHint: '涂色|识字|画画|认知',
appName: '涂鸦',
appHint: '涂色|识字|画画|打印',
title: '找一找 涂 色',
subTitle: '把相同的文字涂上相同的颜色',
...options,
+1 -1
View File
@@ -41,7 +41,7 @@ wx-button:not([size=mini]) {
}
&--green {
background: rgba(147, 211, 51, 1);
background: rgb(147, 211, 51);
box-shadow: 0px 10rpx 4rpx rgba(121, 185, 21, 1);
&.disabled {
+1 -1
View File
@@ -1,5 +1,5 @@
export async function getMiniCodeImage(canvas: Canvas) {
return getImage(canvas, '/assets/imgs/mini-code.jpg');
return getImage(canvas, '/assets/imgs/doodle-mini-code.jpg');
}
export async function getImage(canvas: Canvas, path: string) {