index.vue 837 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <template>
  2. <view>
  3. <block v-if="current == 0">
  4. <index-view></index-view>
  5. </block>
  6. <block v-if="current == 3">
  7. <mine-view></mine-view>
  8. </block>
  9. <view style="height: 100upx;"></view>
  10. <view class="footer-fixed">
  11. <bottom-bar-index @onTap="change"></bottom-bar-index>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import indexView from "@/components/indexViews/home-view.vue";
  17. import bottomBarIndex from "@/components/basic/bottom-bar-index.vue";
  18. import mineView from "@/components/indexViews/mine-view.vue";
  19. export default {
  20. components: {
  21. bottomBarIndex,
  22. indexView,
  23. mineView
  24. },
  25. data() {
  26. return {
  27. current: 0,
  28. }
  29. },
  30. onLoad() {
  31. // uni.setStorageSync("userId","1413461510759485442")
  32. },
  33. methods: {
  34. change(index) {
  35. this.current = index;
  36. }
  37. }
  38. }
  39. </script>
  40. <style>
  41. </style>