backup: snapshot before optimization

This commit is contained in:
2026-06-04 16:25:43 +08:00
commit ff2700c067
47 changed files with 3332 additions and 0 deletions
+37
View File
@@ -0,0 +1,37 @@
var themeMod = require('../utils/theme')
Component({
data: {
selected: 0,
themeStyle: ''
},
lifetimes: {
attached: function () {
var theme = themeMod.getCurrentTheme()
this.setData({ themeStyle: themeMod.getThemeStyle(theme) })
}
},
pageLifetimes: {
show: function () {
var theme = themeMod.getCurrentTheme()
this.setData({ themeStyle: themeMod.getThemeStyle(theme) })
}
},
methods: {
switchTab: function (e) {
var index = e.currentTarget.dataset.index
var pages = [
'/pages/index/index',
'/pages/records/records',
'/pages/settings/settings'
]
if (index === this.data.selected) return
wx.switchTab({ url: pages[index] })
}
}
})