feat: 3.5版本规划
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
shouldShowShareGuide,
|
||||
shouldUnlockWithAd,
|
||||
} from '../../utils/shareGuide';
|
||||
import tracker from '../../utils/tracker';
|
||||
|
||||
Page({
|
||||
canvas: null as Canvas | null,
|
||||
@@ -20,6 +21,8 @@ Page({
|
||||
timer: null as any,
|
||||
|
||||
data: {
|
||||
worksheetId: 'shape-recognition',
|
||||
pageTitle: '识别图形,涂一涂',
|
||||
shapeList: [] as ShapeCard[],
|
||||
showSelectShapePopup: false,
|
||||
selectedShapeIndex: -1,
|
||||
@@ -31,6 +34,10 @@ Page({
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
tracker.reportPreviewView('focusPages/shape/shape', {
|
||||
worksheet_id: 'shape-recognition',
|
||||
worksheet_title: '识别图形,涂一涂',
|
||||
});
|
||||
// 判断是否在PC端开发工具上运行
|
||||
// const systemInfo = wx.getDeviceInfo();
|
||||
// if (systemInfo.platform === 'devtools') {
|
||||
@@ -213,6 +220,10 @@ Page({
|
||||
* 随机生成6个图形
|
||||
*/
|
||||
refreshShapeCard() {
|
||||
const startedAt = Date.now();
|
||||
tracker.reportGenerateStart('focusPages/shape/shape', {
|
||||
worksheet_id: 'shape-recognition',
|
||||
});
|
||||
// 随机取6个图形
|
||||
const shapesCopy = [...SHAPES];
|
||||
for (let i = shapesCopy.length - 1; i > 0; i--) {
|
||||
@@ -244,6 +255,10 @@ Page({
|
||||
() => {
|
||||
// 绘制canvas
|
||||
this.drawCanvas();
|
||||
tracker.reportGenerateResult('focusPages/shape/shape', true, {
|
||||
worksheet_id: 'shape-recognition',
|
||||
duration_ms: Date.now() - startedAt,
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
@@ -312,6 +327,8 @@ Page({
|
||||
await downloadPrint(this.canvas, {
|
||||
errorToast: '请先生成图形',
|
||||
trackerName: '图形涂色',
|
||||
trackerPage: 'focusPages/shape/shape',
|
||||
worksheetId: 'shape-recognition',
|
||||
});
|
||||
},
|
||||
|
||||
@@ -327,6 +344,8 @@ Page({
|
||||
await downloadPrint(this.canvas, {
|
||||
errorToast: '请先生成图形',
|
||||
trackerName: '图形涂色',
|
||||
trackerPage: 'focusPages/shape/shape',
|
||||
worksheetId: 'shape-recognition',
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user