1
0

index.vue 647 B

1234567891011121314151617181920212223242526272829303132333435
  1. <template>
  2. <view class="app-page"></view>
  3. </template>
  4. <script>
  5. export default {
  6. onLoad() {
  7. this.fnCheckShowStarted();
  8. },
  9. methods: {
  10. // 检查是否需要跳转到启动页
  11. fnCheckShowStarted() {
  12. if (!getApp().globalData.start.use) {
  13. uni.switchTab({
  14. url: '/pages/tabbar/home/home'
  15. });
  16. return;
  17. }
  18. if (uni.getStorageSync('APP_HAS_STARTED')) {
  19. uni.switchTab({
  20. url: '/pages/tabbar/home/home'
  21. });
  22. // uni.navigateTo({
  23. // url:'/pagesA/test-page/test-page'
  24. // })
  25. } else {
  26. uni.redirectTo({
  27. url: '/pagesA/start/start'
  28. });
  29. }
  30. }
  31. }
  32. };
  33. </script>