App.vue 677 B

123456789101112131415161718192021222324252627
  1. <script>
  2. export default {
  3. onLaunch: function() {
  4. // console.log('App Launch')
  5. // const path = this.$route.path;
  6. // console.log(path)
  7. // if (path === '/') {
  8. // uni.redirectTo({ url: '/pages/index/index' });
  9. // } else if (path === '/pages/canteenBackend') {
  10. // console.log("满足这个路径")
  11. // uni.redirectTo({ url: '/pages/backend/backend' });
  12. // } else {
  13. // uni.redirectTo({ url: '/pages/index/index' }); // 默认入口
  14. // }
  15. },
  16. onShow: function() {
  17. console.log('App Show')
  18. },
  19. onHide: function() {
  20. console.log('App Hide')
  21. }
  22. }
  23. </script>
  24. <style>
  25. /*每个页面公共css */
  26. </style>