index.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view>
  3. <!-- 首页 -->
  4. <HomePage v-if="showpage==0"></HomePage>
  5. <!-- 衣柜 -->
  6. <MardPage v-if="showpage==1"></MardPage>
  7. <!-- 搭配 -->
  8. <DapeiPage v-if="showpage==2"></DapeiPage>
  9. <!-- 商城 -->
  10. <ShopPage v-if="showpage==3"></ShopPage>
  11. <!-- 我的 -->
  12. <UserPage v-if="showpage==4"></UserPage>
  13. <!-- 底部 -->
  14. <view class="grey text" >
  15. <tm-bottomnavigation @change="changepage" style="height:50px" icon-color="red" :list="list_1"></tm-bottomnavigation>
  16. </view>
  17. </view>
  18. </template>
  19. <script>
  20. import HomePage from "@/pages/shouye/index"
  21. import MardPage from "@/pages/wardrobe/index"
  22. import DapeiPage from "@/pages/dapei/index"
  23. import ShopPage from "@/pages/shop/index"
  24. import UserPage from "@/pages/user/index"
  25. export default {
  26. components:{
  27. HomePage,
  28. MardPage,
  29. DapeiPage,
  30. ShopPage,
  31. UserPage
  32. },
  33. data() {
  34. return {
  35. list_1: [
  36. {iconSize: 48,showDot:false,icon: '/static/aa.png',noIcon:'/static/logo.png', value: '' },
  37. {iconSize: 48,showDot:false,icon: '/static/aa.png',noIcon:'/static/logo.png', value: '' },
  38. {iconSize: 48,showDot:true, icon: '/static/aa.png',noIcon:'/static/logo.png', value: '' },
  39. {iconSize: 48,showDot:true, icon: '/static/aa.png',noIcon:'/static/logo.png', value: '' },
  40. {iconSize: 48,showDot:true, icon: '/static/aa.png',noIcon:'/static/logo.png', value: '' }
  41. ],
  42. showpage:0
  43. };
  44. },
  45. onLoad() {
  46. // uni.redirectTo({
  47. // url:"/pages/login/index"
  48. // })
  49. },
  50. methods: {
  51. changepage(info){
  52. this.showpage=info.index
  53. }
  54. }
  55. };
  56. </script>