index.vue 599 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <template>
  2. <view>
  3. <!-- 首页 -->
  4. <view class="u-page">
  5. <index></index>
  6. </view>
  7. <!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
  8. <tabbars :currentIndex="1"></tabbars>
  9. </view>
  10. </template>
  11. <script>
  12. import tabbars from "@/components/tabbar.vue"
  13. import index from "@/components/index.vue"
  14. export default {
  15. components: {
  16. tabbars,
  17. index
  18. },
  19. data() {
  20. return {}
  21. },
  22. onLoad() {
  23. if (!this.checkLogin()) {
  24. uni.reLaunch({
  25. url: '/pages/login/login'
  26. });
  27. }
  28. },
  29. onShow() {},
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. </style>