// app.js
App({
  onLaunch() {
    // 初始化本地存储
    const settings = wx.getStorageSync('lunar-settings');
    if (!settings) {
      wx.setStorageSync('lunar-settings', {
        theme: 'light',
        weekStartDay: 0,
        ziHourSect: 'lateZiNextDay',
        solarTime: true,
      });
    }
    const profiles = wx.getStorageSync('lunar-user-profiles');
    if (!profiles) {
      wx.setStorageSync('lunar-user-profiles', { profiles: [], activeIndex: 0 });
    }
    const bookmarks = wx.getStorageSync('lunar-bookmarks');
    if (!bookmarks) {
      wx.setStorageSync('lunar-bookmarks', []);
    }
  },
  globalData: {
    // 全局共享数据
  },
});
