feat:V2.5.6分享优化
This commit is contained in:
@@ -90,7 +90,7 @@
|
||||
"pagePath": "pages/focusIndex/focusIndex",
|
||||
"iconPath": "assets/tabBar/icon-shape.png",
|
||||
"selectedIconPath": "assets/tabBar/icon-shape-active.png",
|
||||
"text": "专注启蒙"
|
||||
"text": "专注力游戏"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
|
||||
@@ -3,6 +3,7 @@ import { checkAndSaveImage } from '../utils/saveImage';
|
||||
import { shouldShowShareGuide } from '../utils/shareGuide';
|
||||
import { BaseDrawService } from '../service/baseDraw';
|
||||
import tracker from '../utils/tracker';
|
||||
import { defaultShareConfig } from '../config/config';
|
||||
|
||||
/**
|
||||
* Canvas 相关的页面实例属性
|
||||
@@ -101,11 +102,6 @@ export interface PageCommonMethodsConfig {
|
||||
pageInfoLookup?: PageInfoLookup;
|
||||
}
|
||||
|
||||
const defaultShareConfig = {
|
||||
title: '涂鸦丫',
|
||||
imageUrl: 'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
|
||||
/**
|
||||
* 获取页面公共方法
|
||||
* 这些方法可以在所有Canvas绘制页面中复用
|
||||
|
||||
@@ -10,5 +10,12 @@ export const defaultPrintConfig: PrintConfig = {
|
||||
// header: 'LogoImage',
|
||||
header: 'wechat',
|
||||
appName: '涂鸦丫小程序',
|
||||
appHint: '数学|专注|练字|涂鸦',
|
||||
appHint: '数学|专注力|练字|涂鸦',
|
||||
};
|
||||
|
||||
export const defaultShareConfig = {
|
||||
// title: '涂鸦丫 - 一张会“教知识”的涂色卡',
|
||||
title: '涂鸦丫 - 快来生成宝宝的专属学习卡',
|
||||
path: '/pages/mathIndex/mathIndex',
|
||||
imageUrl: 'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { createPage, PageCommonMethodsConfig } from '../../../base/pageMixin';
|
||||
import { FOCUS_FUNCTION_TYPES } from '../../../constants/focusFunctions';
|
||||
import { defaultShareConfig } from '../../../config/config';
|
||||
/**
|
||||
* 专注力模块的函数类型定义
|
||||
*/
|
||||
@@ -14,14 +15,6 @@ export interface FocusFunctionType {
|
||||
desc: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 专注力模块的分享配置
|
||||
*/
|
||||
const focusShareConfig = {
|
||||
title: '涂鸦丫-专注力训练',
|
||||
imageUrl: 'https://cdn.joeyone.cn/doodle/share-img/focus-share.png',
|
||||
};
|
||||
|
||||
/**
|
||||
* 专注力模块的页面信息查找函数
|
||||
*/
|
||||
@@ -44,7 +37,7 @@ function focusPageInfoLookup(functionId: string) {
|
||||
* 专注力模块的配置
|
||||
*/
|
||||
const focusConfig: PageCommonMethodsConfig = {
|
||||
shareConfig: focusShareConfig,
|
||||
shareConfig: defaultShareConfig,
|
||||
pageInfoLookup: focusPageInfoLookup,
|
||||
};
|
||||
|
||||
|
||||
@@ -17,20 +17,12 @@ import {
|
||||
MATH_FUNCTION_TYPES,
|
||||
MathFunctionType,
|
||||
} from '../../../constants/mathFunctions';
|
||||
|
||||
import { defaultShareConfig } from '../../../config/config';
|
||||
/**
|
||||
* 数学模块的页面实例类型(向后兼容)
|
||||
*/
|
||||
export type MathPageCanvasInstance = PageCanvasInstance;
|
||||
|
||||
/**
|
||||
* 数学模块的分享配置
|
||||
*/
|
||||
const mathShareConfig = {
|
||||
title: '涂鸦丫-数学学习涂鸦卡',
|
||||
imageUrl: 'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
|
||||
/**
|
||||
* 数学模块的页面信息查找函数
|
||||
*/
|
||||
@@ -56,7 +48,7 @@ function mathPageInfoLookup(functionId: string) {
|
||||
*/
|
||||
export function getMathPageCommonMethods() {
|
||||
const config: PageCommonMethodsConfig = {
|
||||
shareConfig: mathShareConfig,
|
||||
shareConfig: defaultShareConfig,
|
||||
pageInfoLookup: mathPageInfoLookup,
|
||||
};
|
||||
|
||||
@@ -72,7 +64,7 @@ export function getMathPageCommonMethods() {
|
||||
*/
|
||||
export function applyMathPageMixin(pageOptions: any) {
|
||||
const config: PageCommonMethodsConfig = {
|
||||
shareConfig: mathShareConfig,
|
||||
shareConfig: defaultShareConfig,
|
||||
pageInfoLookup: mathPageInfoLookup,
|
||||
};
|
||||
|
||||
@@ -86,7 +78,7 @@ export function applyMathPageMixin(pageOptions: any) {
|
||||
*/
|
||||
export function createMathPage(pageOptions: any) {
|
||||
const config: PageCommonMethodsConfig = {
|
||||
shareConfig: mathShareConfig,
|
||||
shareConfig: defaultShareConfig,
|
||||
pageInfoLookup: mathPageInfoLookup,
|
||||
};
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import { getWordsSvgData } from '../../utils/getWordsSvgJson';
|
||||
import { WORDS } from '../../constants/words';
|
||||
import { CharacterItem } from '../../types/characterType';
|
||||
import tracker from '../../utils/tracker';
|
||||
import { defaultShareConfig } from '../../config/config';
|
||||
|
||||
Page({
|
||||
canvas: null as Canvas | null,
|
||||
@@ -379,10 +380,8 @@ Page({
|
||||
tracker.reportShare('练字贴');
|
||||
|
||||
return {
|
||||
title: '涂鸦丫-涂色|练字|识字|打印',
|
||||
...defaultShareConfig,
|
||||
path: '/pages/copyBook/copyBook',
|
||||
imageUrl:
|
||||
'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
},
|
||||
onShareTimeline() {
|
||||
@@ -390,10 +389,8 @@ Page({
|
||||
tracker.reportShare('练字贴');
|
||||
|
||||
return {
|
||||
title: '涂鸦丫-涂色|练字|识字|打印',
|
||||
...defaultShareConfig,
|
||||
query: '/pages/copyBook/copyBook',
|
||||
imageUrl:
|
||||
'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { FOCUS_FUNCTION_TYPES } from '../../constants/focusFunctions';
|
||||
import tracker from '../../utils/tracker';
|
||||
import { defaultShareConfig } from '../../config/config';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@@ -40,4 +42,23 @@ Page({
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
// 上报分享埋点
|
||||
tracker.reportShare('专注力游戏');
|
||||
|
||||
return {
|
||||
...defaultShareConfig,
|
||||
path: `/pages/focusIndex/focusIndex`,
|
||||
};
|
||||
},
|
||||
onShareTimeline() {
|
||||
// 上报分享埋点
|
||||
tracker.reportShare('专注力游戏');
|
||||
|
||||
return {
|
||||
...defaultShareConfig,
|
||||
query: `/pages/focusIndex/focusIndex`,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
import { checkAndSaveImage } from '../../utils/saveImage';
|
||||
import { shouldShowShareGuide } from '../../utils/shareGuide';
|
||||
import tracker from '../../utils/tracker';
|
||||
import { defaultShareConfig } from '../../config/config';
|
||||
|
||||
Page({
|
||||
canvas: null as Canvas | null,
|
||||
@@ -357,10 +358,8 @@ Page({
|
||||
tracker.reportShare('涂色识字');
|
||||
|
||||
return {
|
||||
title: '涂鸦丫-涂色|识字|画画|打印',
|
||||
...defaultShareConfig,
|
||||
path: `/pages/index/index?template=${this.data.selectedTemplate}`,
|
||||
imageUrl:
|
||||
'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
},
|
||||
onShareTimeline() {
|
||||
@@ -368,10 +367,8 @@ Page({
|
||||
tracker.reportShare('涂色识字');
|
||||
|
||||
return {
|
||||
title: '涂鸦丫-涂色|识字|画画|打印',
|
||||
...defaultShareConfig,
|
||||
query: `/pages/index/index?template=${this.data.selectedTemplate}`,
|
||||
imageUrl:
|
||||
'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
import { MATH_FUNCTION_TYPES } from '../../constants/mathFunctions';
|
||||
import tracker from '../../utils/tracker';
|
||||
import { defaultShareConfig } from '../../config/config';
|
||||
|
||||
Page({
|
||||
data: {
|
||||
@@ -35,4 +37,23 @@ Page({
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
onShareAppMessage() {
|
||||
// 上报分享埋点
|
||||
tracker.reportShare('数感启蒙');
|
||||
|
||||
return {
|
||||
...defaultShareConfig,
|
||||
path: `/pages/mathIndex/mathIndex`,
|
||||
};
|
||||
},
|
||||
onShareTimeline() {
|
||||
// 上报分享埋点
|
||||
tracker.reportShare('数感启蒙');
|
||||
|
||||
return {
|
||||
...defaultShareConfig,
|
||||
query: `/pages/mathIndex/mathIndex`,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user