feat: 祈福小助手万年历小程序第一期
This commit is contained in:
+26
@@ -0,0 +1,26 @@
|
||||
// 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: {
|
||||
// 全局共享数据
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user