index.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <template>
  2. <div class="ry">
  3. <div class="top">
  4. <div class="card">
  5. <div class="child zs" @click="curModel=1">
  6. <image src="../../static/images/rongyu/icon_1.png" mode="" class="icon"></image>
  7. <div class="text">我的证书</div>
  8. </div>
  9. <div class="child pm" @click="curModel=2">
  10. <image src="../../static/images/rongyu/icon_2.png" mode="" class="icon"></image>
  11. <div class="text">榜单排名</div>
  12. </div>
  13. </div>
  14. <div class="card">
  15. <div class="child cj" @click="curModel=3">
  16. <image src="../../static/images/rongyu/icon_3.png" mode="" class="icon"></image>
  17. <div class="text">我的成就</div>
  18. </div>
  19. <div class="child bd" @click="curModel=4">
  20. <image src="../../static/images/rongyu/icon_4.png" mode="" class="icon"></image>
  21. <div class="text">学霸榜单</div>
  22. </div>
  23. </div>
  24. </div>
  25. <u-gap height="22" bg-color="#F5F5F5"></u-gap>
  26. <ZhengShuVue v-if="curModel==1" />
  27. <BangDan v-if="curModel==2" />
  28. <JiangZhuang v-if="curModel==3" />
  29. <BangDanXb v-if="curModel==4" />
  30. </div>
  31. </div>
  32. </template>
  33. <script>
  34. import ZhengShuVue from './components/ZhengShu.vue'
  35. import JiangZhuang from './components/JiangZhuang.vue'
  36. import BangDan from './components/BangDan.vue'
  37. import BangDanXb from './components/BangDanXb.vue'
  38. export default {
  39. components: {
  40. ZhengShuVue,
  41. BangDan,
  42. BangDanXb,
  43. JiangZhuang,
  44. },
  45. data() {
  46. return {
  47. curTab: 0,
  48. curModel: 1
  49. }
  50. },
  51. methods: {
  52. zsDetail() {
  53. uni.navigateTo({
  54. url: '/pages/rongyu/detail'
  55. })
  56. }
  57. }
  58. }
  59. </script>
  60. <style lang="scss">
  61. .top {
  62. padding: 15px;
  63. }
  64. .card {
  65. display: flex;
  66. align-items: center;
  67. justify-content: space-around;
  68. .child {
  69. display: flex;
  70. align-items: center;
  71. padding: 6px 20px;
  72. border-radius: 5px;
  73. margin-bottom: 6px;
  74. .icon {
  75. width: 39px;
  76. height: 39px;
  77. margin-right: 10px;
  78. }
  79. .text {
  80. font-size: 19px;
  81. color: #fff;
  82. }
  83. }
  84. .zs {
  85. background: linear-gradient(90deg, #1170FF 0%, #65A5FF 100%);
  86. }
  87. .pm {
  88. background: linear-gradient(90deg, #FF9C00 0%, #FEC034 100%);
  89. }
  90. .cj {
  91. background: linear-gradient(90deg, #FF3131 0%, #FF893A 100%);
  92. }
  93. .bd {
  94. background: linear-gradient(90deg, #9214FF 0%, #FF00B2 100%);
  95. }
  96. }
  97. </style>