ChangeCoin.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <div class="loan-header">
  3. <div class="header-content pf600 fs16 fc1F2937">
  4. <img
  5. class="left-arrow-image"
  6. src="../../../assets/icon/index/left-arrow.svg"
  7. @click="toPath()" />
  8. 充值
  9. <div class="save pf600 fs14 fcA8A8A8" @click="toHistory">
  10. <img src="../../../assets/icon/index/history.svg" alt="" />历史
  11. </div>
  12. </div>
  13. </div>
  14. <div class="change-coin">
  15. <div class="coin-area">
  16. <div
  17. class="coin-item pf400 fs18 fc1F2937"
  18. v-for="(item, index) in coinData"
  19. :key="index">
  20. <img :src="item.img" alt="" />{{ item.name }}
  21. </div>
  22. </div>
  23. </div>
  24. </template>
  25. <script setup>
  26. import { useRoute, useRouter } from "vue-router";
  27. const router = useRouter();
  28. const toHistory = () => {
  29. router.push("/rechargeHistory");
  30. };
  31. const coinData = [
  32. {
  33. img: require("@/assets/icon/coin/bnb.svg"),
  34. name: "Bitcoin",
  35. },
  36. {
  37. img: require("@/assets/icon/coin/EthereumClassicBadge.svg"),
  38. name: "Ethereum",
  39. },
  40. {
  41. img: require("@/assets/icon/coin/BinanceUsdBadge.svg"),
  42. name: "Binance",
  43. },
  44. {
  45. img: require("@/assets/icon/coin/SolanaBadge.svg"),
  46. name: "Solana",
  47. },
  48. {
  49. img: require("@/assets/icon/coin/xrp.svg"),
  50. name: "XRP",
  51. },
  52. {
  53. img: require("@/assets/icon/coin/CardanoBadge.svg"),
  54. name: "Cardano",
  55. },
  56. {
  57. img: require("@/assets/icon/coin/otc.svg"),
  58. name: "OTC交易",
  59. },
  60. ];
  61. const toPath = () => {
  62. router.back();
  63. };
  64. </script>
  65. <style lang="less" scoped>
  66. .loan-header {
  67. position: fixed;
  68. left: 0;
  69. top: 0;
  70. z-index: 1;
  71. width: 100%;
  72. height: 48px;
  73. background: #ffffff;
  74. overflow: hidden;
  75. .header-content {
  76. display: flex;
  77. flex-direction: row;
  78. justify-content: center;
  79. align-items: center;
  80. position: relative;
  81. width: 100%;
  82. height: 48px;
  83. .left-arrow-image {
  84. position: absolute;
  85. left: 14px;
  86. top: 16px;
  87. width: 9px;
  88. height: 16px;
  89. }
  90. .save {
  91. display: flex;
  92. flex-direction: row;
  93. justify-content: flex-start;
  94. align-items: center;
  95. position: absolute;
  96. top: 12.3px;
  97. right: 16px;
  98. height: 24px;
  99. img {
  100. margin-right: 4px;
  101. }
  102. }
  103. }
  104. }
  105. .change-coin {
  106. display: flex;
  107. flex-direction: column;
  108. justify-content: flex-start;
  109. align-items: center;
  110. margin-top: 48px;
  111. width: 100%;
  112. .coin-area {
  113. display: flex;
  114. flex-direction: row;
  115. justify-content: flex-start;
  116. flex-wrap: wrap;
  117. width: 324px;
  118. .coin-item {
  119. display: flex;
  120. flex-direction: column;
  121. justify-content: flex-start;
  122. align-items: center;
  123. margin-left: 12px;
  124. margin-top: 12px;
  125. width: 100px;
  126. height: 90px;
  127. background: #f5f5f5;
  128. border-radius: 12px;
  129. &:nth-child(3n + 1) {
  130. margin-left: 0;
  131. }
  132. img {
  133. margin-top: 12px;
  134. margin-bottom: 8px;
  135. width: 30px;
  136. height: 30px;
  137. }
  138. }
  139. }
  140. }
  141. </style>