Files
wx_pbzc/app.js
T

27 lines
614 B
JavaScript

var themeMod = require('./utils/theme')
App({
onLaunch: function () {
var settings = wx.getStorageSync('user_settings')
if (!settings) {
wx.setStorageSync('user_settings', {
planId: 'beginner',
dailyReminder: true,
reminderTime: '08:00',
voiceGuide: true,
vibrate: true
})
}
var streak = wx.getStorageSync('current_streak')
if (!streak) {
wx.setStorageSync('current_streak', { count: 0, lastDate: '' })
}
this.globalData.theme = themeMod.getCurrentTheme()
},
globalData: {
planId: 'beginner',
theme: null
}
})