feat: 页面分享设置

This commit is contained in:
R524809
2026-05-25 18:45:28 +08:00
parent c049d64057
commit fbdad6e02b
15 changed files with 156 additions and 138 deletions
+3
View File
@@ -1,3 +1,4 @@
import { appSharePageMethods } from '../../base/pageMixin';
import { AGE_BANDS, AgeBandKey } from '../../core/data/difficulty';
import { parseMiniProgramUrl } from '../../utils/index';
import {
@@ -161,4 +162,6 @@ Page({
(e.currentTarget.dataset.title as string | undefined);
navigateByPath(path, title);
},
...appSharePageMethods,
});
+2 -13
View File
@@ -1,3 +1,4 @@
import { appSharePageMethods } from '../../base/pageMixin';
import { CATEGORY_LIST_WITH_ALL } from '../../core/data/categories';
import { takePendingCategoryTabId } from '../../utils/index';
import { CATEGORY_DATA, type CategoryItem } from './category.data';
@@ -320,17 +321,5 @@ Page({
wx.navigateTo({ url: path });
},
onShareAppMessage() {
return {
title: '涂鸦丫 - 全部练习分类',
path: '/pages/category/category',
};
},
onShareTimeline() {
return {
title: '涂鸦丫 - 全部练习分类',
query: '',
};
},
...appSharePageMethods,
});
@@ -1,4 +1,6 @@
{
"enableShareAppMessage": false,
"enableShareTimelineMessage": false,
"navigationStyle": "custom",
"navigationBarTitleText": "我的收藏",
"navigationBarTextStyle": "black",
+2
View File
@@ -1,3 +1,4 @@
import { disablePageShareMenu } from '../../base/pageMixin';
import { NAV_INNER_PX } from '../../utils/navMetrics';
import { getFavoriteList, removeFavorite } from '../../utils/favorites';
import {
@@ -167,6 +168,7 @@ Page({
},
onLoad() {
disablePageShareMenu();
const win = wx.getWindowInfo();
this.setData({
favScrollHeight: win.windowHeight - NAV_BLOCK_HEIGHT,
+2 -15
View File
@@ -1,3 +1,4 @@
import { appSharePageMethods } from '../../base/pageMixin';
import { NAV_INNER_PX } from '../../utils/navMetrics';
import {
parseMiniProgramUrl,
@@ -285,19 +286,5 @@ Page({
navigateByPath(path, title);
},
onShareAppMessage() {
return {
title: '涂鸦丫 - 快来生成宝宝的专属学习卡',
path: '/pages/home/home',
imageUrl:
'https://cdn.joeyone.cn/doodle/share-img/index-share-v2.png',
};
},
onShareTimeline() {
return {
title: '涂鸦丫 - 快来生成宝宝的专属学习卡',
query: '',
};
},
...appSharePageMethods,
});
+2
View File
@@ -1,4 +1,6 @@
{
"enableShareAppMessage": false,
"enableShareTimelineMessage": false,
"navigationStyle": "custom",
"navigationBarTitleText": "我的",
"navigationBarTextStyle": "black",
+2
View File
@@ -1,3 +1,4 @@
import { disablePageShareMenu } from '../../base/pageMixin';
import { getDownloadLogCount } from '../../utils/downloadLogs';
import { getFavoriteCount } from '../../utils/favorites';
import {
@@ -23,6 +24,7 @@ Page({
},
onLoad() {
disablePageShareMenu();
this.syncUserInfoFromApp();
const isDevEnv =
wx.getAccountInfoSync().miniProgram.envVersion === 'develop';