Files
xingbangtuan/App.vue
2020-07-12 11:20:28 +08:00

27 lines
517 B
Vue

<script>
import { mapMutations } from 'vuex';
export default {
methods: {
...mapMutations(['login','logout'])
},
onLaunch: function() {
console.log('App Launch')
let userInfo = uni.getStorageSync('userInfo') || '';
if (userInfo.token) {
console.log(userInfo.token)
this.login(userInfo)
}
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
console.log('App Hide')
}
}
</script>
<style>
/*每个页面公共css */
</style>