feat: 完成 4 个TabBar 页面初版样式修改

This commit is contained in:
R524809
2026-04-02 17:05:55 +08:00
parent b18dbcb0d1
commit 206c44cf6d
61 changed files with 4670 additions and 996 deletions
+35 -10
View File
@@ -1,13 +1,38 @@
import { getTodayDownloadCount } from '../../utils/downloadPrint';
import { NAV_INNER_PX } from '../../utils/navMetrics';
Page({
data: {
generateCount: 0,
statusBarHeight: 0,
/** 状态栏 + 导航条高度,用于固定顶栏占位 */
navBlockHeight: 0,
userName: '微信用户',
avatarUrl: '',
printCount: 0,
favoriteCount: 0,
version: '',
},
onLoad() {
const win = wx.getWindowInfo();
const info = wx.getAccountInfoSync();
const version = info.miniProgram.version || '开发版';
this.setData({ version });
this.setData({
statusBarHeight: win.statusBarHeight,
navBlockHeight: win.statusBarHeight + NAV_INNER_PX,
version,
});
},
onShow() {
this.refreshStats();
},
refreshStats() {
const printCount = getTodayDownloadCount();
// 收藏数待与收藏页数据源打通后接入
const favoriteCount = 0;
this.setData({ printCount, favoriteCount });
},
onGoToDownloads() {
@@ -20,14 +45,6 @@ Page({
wx.switchTab({ url: '/pages/favorites/favorites' });
},
onGoToPrintPlan() {
wx.showToast({ title: '功能开发中', icon: 'none' });
},
onGoToStats() {
wx.showToast({ title: '功能开发中', icon: 'none' });
},
onGoToGuide() {
wx.navigateTo({ url: '/pages/guide/guide' });
},
@@ -36,6 +53,10 @@ Page({
wx.showToast({ title: '功能开发中', icon: 'none' });
},
onGoToSettings() {
wx.showToast({ title: '功能开发中', icon: 'none' });
},
onGoToFeedback() {
wx.showToast({ title: '功能开发中', icon: 'none' });
},
@@ -43,4 +64,8 @@ Page({
onGoToAbout() {
wx.showToast({ title: '涂鸦丫练习纸', icon: 'none' });
},
onGoToPremium() {
wx.showToast({ title: '功能开发中', icon: 'none' });
},
});