40 lines
831 B
Vue
40 lines
831 B
Vue
<script>
|
|
const brandStore = require('./store/brand')
|
|
|
|
export default {
|
|
onLaunch: function() {
|
|
console.log('App Launch')
|
|
// 冷启动时拉取品牌配置(以缓存为准立即显示,后台拉取最新)
|
|
brandStore.fetchConfig().then(changed => {
|
|
if (changed) {
|
|
brandStore.applyTabBar()
|
|
}
|
|
})
|
|
},
|
|
onShow: function() {
|
|
console.log('App Show')
|
|
// 每次回到前台拉取最新配置
|
|
brandStore.fetchConfig().then(changed => {
|
|
if (changed) {
|
|
brandStore.applyTabBar()
|
|
}
|
|
})
|
|
},
|
|
onHide: function() {
|
|
console.log('App Hide')
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
page {
|
|
background: #F5F7FA;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
color: #1E1E1E;
|
|
font-size: 14px;
|
|
}
|
|
view, text, button, input {
|
|
box-sizing: border-box;
|
|
}
|
|
</style>
|