App.vue 724 B

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