App.vue 676 B

1234567891011121314151617181920212223242526272829
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. console.log('App Launch')
  5. console.log(this.$store.state)
  6. if(this.$store.state.token == '' && this.$router.history.current.path != '/pages/entry/auth'){
  7. console.log(this.$store.state)
  8. uni.navigateTo({
  9. url: '/pages/entry/auth?reback_url='+location.href
  10. })
  11. }
  12. },
  13. onShow: function() {
  14. console.log('App Show')
  15. },
  16. onHide: function() {
  17. console.log('App Hide')
  18. }
  19. }
  20. </script>
  21. <!-- <style>
  22. /*每个页面公共css */
  23. </style> -->
  24. <style lang="scss">
  25. /* 注意要写在第一行,同时给style标签加入lang="scss"属性 */
  26. @import "uview-ui/index.scss";
  27. </style>