refactor pages struct

This commit is contained in:
Timi
2026-01-28 14:11:54 +08:00
parent 8adc28ae9c
commit 965743be38
73 changed files with 234 additions and 176 deletions

View File

@ -0,0 +1,33 @@
type NavItem = {
title: string;
icon: string;
url: string;
};
interface OtherData {
navList: NavItem[];
}
Page({
data: <OtherData>{
navList: [
{
title: "备忘录",
icon: "task-checked",
url: "/pages/main/other/portfolio/index"
},
{
title: "专拍",
icon: "face-retouching",
url: "/pages/main/other/portfolio/index"
}
],
},
onNavTap(e: WechatMiniprogram.BaseEvent) {
const { url } = e.currentTarget.dataset as { url?: string };
if (!url) {
return;
}
wx.navigateTo({ url });
}
});