Update WeChat MiniProgram share config and improve Download Web page logic for HarmonyOS detection

This commit is contained in:
2026-02-09 22:03:24 +08:00
parent 58774dd397
commit a4b3fcdb05
22 changed files with 2556 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
import { config } from '../../config';
// pages/calculator/calculator.ts
Page({
data: {
@@ -14,16 +16,11 @@ Page({
},
onShareAppMessage() {
return {
title: '便捷好用的科学计算器',
path: '/pages/calculator/calculator'
}
return config.share;
},
onShareTimeline() {
return {
title: '便捷好用的科学计算器'
}
return config.share;
},
toggleHelp() {
@@ -45,6 +42,12 @@ Page({
},
onLoad() {
// 开启分享菜单
wx.showShareMenu({
withShareTicket: false,
menus: ['shareAppMessage', 'shareTimeline']
});
// 从本地存储恢复历史记录
const saved = wx.getStorageSync('CALC_HISTORY');
if (saved && Array.isArray(saved)) {