App.vue 471 B

1234567891011121314151617181920212223
  1. <script>
  2. export default {
  3. onLaunch: function () {
  4. if (
  5. this.$method.isLogin() &&
  6. !this.$route.path.includes("/pages/bill/index")
  7. ) {
  8. !this.$store.state.userInfo && this.$store.dispatch("getUserInfo");
  9. }
  10. },
  11. onShow: function () {
  12. console.log("App Show");
  13. },
  14. onHide: function () {
  15. console.log("App Hide");
  16. },
  17. };
  18. </script>
  19. <style lang="scss">
  20. /*每个页面公共css */
  21. @import "@/uni_modules/uview-ui/index.scss";
  22. </style>