feat: 新增控笔练习,增加首页公告

This commit is contained in:
R524809
2026-05-29 10:21:39 +08:00
parent 2f0c4ab591
commit a6e8f4df02
28 changed files with 1045 additions and 672 deletions
@@ -0,0 +1,33 @@
import { UNRELEASED_PAGE_ENTRIES } from './unreleasedDebug.config';
Page({
data: {
entries: UNRELEASED_PAGE_ENTRIES,
isDevEnv: true,
},
onLoad() {
const envVersion = wx.getAccountInfoSync().miniProgram.envVersion;
const isDevEnv = envVersion === 'develop';
this.setData({ isDevEnv });
if (!isDevEnv) {
wx.showToast({ title: '仅开发版可用', icon: 'none' });
}
},
onTapEntry(e: WechatMiniprogram.TouchEvent) {
if (!this.data.isDevEnv) return;
let path = e.currentTarget.dataset.path as string;
if (!path) return;
if (!path.startsWith('/')) {
path = `/${path}`;
}
wx.navigateTo({
url: path,
fail: () => {
wx.showToast({ title: '页面跳转失败', icon: 'none' });
},
});
},
});