12345678910111213141516171819202122232425262728293031 |
- <script>
- export default {
- onLaunch: function () {
- console.log('App Launch')
-
-
- if (sessionStorage.getItem('store')) {
- this.$store.replaceState(Object.assign({}, this.$store.state, JSON.parse(sessionStorage.getItem('store'))))
- }
-
- window.addEventListener('beforeunload', () => {
- sessionStorage.setItem('store', JSON.stringify(this.$store.state))
- })
-
- },
- onShow: function () {
- console.log('App Show')
- },
- onHide: function () {
- console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- @import '@/uni_modules/uview-ui/index.scss';
- @import 'app.scss';
- </style>
|