index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. <template>
  2. <view class="navigation-page">
  3. <headContent :showleftRight="false">
  4. <template #content>
  5. <view class="navigation-box">
  6. <view :class="['navigation-item hide_1' , navigationIndex === index ? 'active-navigation-item' : '']"
  7. v-for="(item , index) in navigationArr" :key="`navigation_${index}`"
  8. @click.stop="navigationIndex = index">
  9. {{ item }}
  10. </view>
  11. </view>
  12. </template>
  13. </headContent>
  14. <view class="content">
  15. <card :cardIndex="navigationIndex"></card>
  16. <!-- 合约账户 -->
  17. <template v-if="navigationIndex === 0">
  18. <contractModules />
  19. </template>
  20. <!-- 币币账户 -->
  21. <template v-if="navigationIndex === 1">
  22. <BibiModules />
  23. </template>
  24. <!-- 合约账户 -->
  25. <template v-if="navigationIndex === 2">
  26. <legalTenderModules />
  27. </template>
  28. <template v-else-if="navigationIndex === 3">
  29. <GiftMoneyModules />
  30. </template>
  31. </view>
  32. <!-- <uni-load-more /> -->
  33. </view>
  34. </template>
  35. <script>
  36. import card from "./modules/card.vue"
  37. import contractModules from "./modules/contract/index.vue"
  38. import GiftMoneyModules from "./modules/GiftMoney/index.vue"
  39. import legalTenderModules from "./modules/legalTender/index.vue"
  40. import BibiModules from "./modules/Bibi/index.vue"
  41. export default {
  42. name: 'property',
  43. components: {
  44. card,
  45. contractModules,
  46. GiftMoneyModules,
  47. legalTenderModules,
  48. BibiModules
  49. },
  50. data() {
  51. return {
  52. navigationIndex: 1,
  53. navigationArr: [
  54. '合约账户',
  55. '币币账户',
  56. '法币账户',
  57. '赠金账户'
  58. ]
  59. };
  60. },
  61. onReachBottom(){
  62. console.log('页面触底')
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .navigation-page {
  68. background-color: #fff;
  69. min-height: 100vh;
  70. .content {
  71. }
  72. }
  73. .navigation-box {
  74. width: 100%;
  75. height: 100%;
  76. padding-bottom: 11rpx;
  77. display: flex;
  78. align-items: flex-end;
  79. .navigation-item {
  80. width: 25%;
  81. text-align: center;
  82. height: 60rpx;
  83. border: 2rpx solid #27ae83;
  84. line-height: 60rpx;
  85. font-size: 28rpx;
  86. font-family: PingFang SC, PingFang SC-Regular;
  87. font-weight: 400;
  88. color: #05c175;
  89. &:nth-child(n + 2) {
  90. border-left: none;
  91. }
  92. &:last-child {
  93. border-radius: 0 6rpx 6rpx 0;
  94. }
  95. &:first-child {
  96. border-radius: 6rpx 0 0 6rpx;
  97. }
  98. }
  99. .active-navigation-item {
  100. background-color: #05C175;
  101. color: #FFFFFF;
  102. }
  103. }
  104. </style>