Index.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292
  1. <template>
  2. <!-- 理财首页 -->
  3. <HeaderNav headerText="理财"></HeaderNav>
  4. <div class="financial-index">
  5. <div class="asset-total">
  6. <div class="my-asset">
  7. <div class="total-left">
  8. <div class="asset-title pf400 fs16 fc1F2937">理财总资产(USDT)</div>
  9. <div class="asset-number pf600 fs32 fc1F2937">1,125,158.00</div>
  10. <div class="asset-approximately pf400 fs16 fcDF384C">≈35,458.00</div>
  11. </div>
  12. <div class="total-right pf500 fs12 fcFFFFFF" @click="goMyFinancial">我的理财</div>
  13. </div>
  14. <div class="asset-revenue">
  15. <div class="asset-left">
  16. <div class="text pf400 fs12 fc6A7187">昨日收益(USDT)</div>
  17. <div class="number pf400 fs16 fc061237">5,678.00</div>
  18. </div>
  19. <div class="asset-right">
  20. <div class="text pf400 fs12 fc6A7187">累计收益(USDT)</div>
  21. <div class="number pf400 fs16 fc061237">5,678.00</div>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="advertisement">
  26. <img src="@/assets/img/index/Rectangle 1.svg" alt="" />
  27. </div>
  28. <div class="index-menu">
  29. <div
  30. class="menu-item"
  31. v-for="(item, index) in indexMenu"
  32. :key="index"
  33. @click="goMenu(index)">
  34. <img :src="item.image" alt="" />
  35. <div class="item-text pf400 fs14 fc666666">{{ item.name }}</div>
  36. </div>
  37. </div>
  38. <div class="recommend">
  39. <div class="title pf600 fs18 fc121212">理财推荐</div>
  40. <div class="recomment-body">
  41. <div
  42. class="recomment-item"
  43. v-for="(item, index) in 5"
  44. :key="index"
  45. @click="goFinancialBuy">
  46. <div class="item-left">
  47. <img src="@/assets/icon/coin/bnb.svg" alt="" />
  48. <div class="item-time">
  49. <div class="time-top pf500 fs14 fc2C3131">Bitcoin定期</div>
  50. <div class="time-bottom pf400 fs10 fcA9A9A9">定期</div>
  51. </div>
  52. </div>
  53. <div class="item-right">
  54. <div class="time-top pf500 fs14 fc2C3131">0.35%</div>
  55. <div class="time-bottom pf400 fs10 fcA9A9A9">15天</div>
  56. </div>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </template>
  62. <script setup>
  63. import HeaderNav from "../components/HeaderNav.vue";
  64. import { useRoute, useRouter } from "vue-router";
  65. const router = useRouter();
  66. const goMyFinancial = () => {
  67. router.push("/myFinancial");
  68. };
  69. const goFinancialBuy = () => {
  70. router.push("/financialBuy");
  71. };
  72. const goMenu = (index) => {
  73. if (index == 0) {
  74. router.push("/cloudComPowerIndex");
  75. } else if (index == 1) {
  76. router.push("/loanIndex");
  77. } else if (index == 2) {
  78. router.push("/stakingIndex");
  79. }
  80. };
  81. const indexMenu = [
  82. {
  83. name: "云算力",
  84. image: require("@/assets/icon/index/yunsuanli.svg"),
  85. },
  86. {
  87. name: "贷款",
  88. image: require("@/assets/icon/index/daikuan.svg"),
  89. },
  90. {
  91. name: "质押",
  92. image: require("@/assets/icon/index/zhiya.svg"),
  93. },
  94. ];
  95. </script>
  96. <style lang="less" scoped>
  97. .financial-index {
  98. display: flex;
  99. flex-direction: column;
  100. justify-content: flex-start;
  101. align-items: center;
  102. margin-top: 48px;
  103. width: 100%;
  104. .asset-total {
  105. display: flex;
  106. flex-direction: column;
  107. justify-content: flex-start;
  108. margin-top: 17px;
  109. width: 343px;
  110. .my-asset {
  111. display: flex;
  112. flex-direction: row;
  113. justify-content: space-between;
  114. width: 343px;
  115. align-items: center;
  116. .total-left {
  117. .asset-title {
  118. display: flex;
  119. flex-direction: row;
  120. justify-content: flex-start;
  121. align-items: center;
  122. height: 22px;
  123. .eye-close {
  124. margin-left: 5px;
  125. width: 16px;
  126. height: 16px;
  127. }
  128. }
  129. .asset-number {
  130. margin-top: 3px;
  131. height: 44px;
  132. line-height: 44px;
  133. }
  134. .asset-approximately {
  135. margin-top: 1px;
  136. height: 22px;
  137. line-height: 22px;
  138. }
  139. }
  140. .total-right {
  141. width: 76px;
  142. height: 24px;
  143. line-height: 24px;
  144. text-align: center;
  145. border-radius: 5px;
  146. background: #df384c;
  147. }
  148. }
  149. .asset-revenue {
  150. display: flex;
  151. flex-direction: row;
  152. justify-content: space-between;
  153. margin-top: 6px;
  154. height: 44px;
  155. .asset-left,
  156. .asset-right {
  157. height: 100%;
  158. .text {
  159. height: 20px;
  160. line-height: 20px;
  161. letter-spacing: 0.3px;
  162. }
  163. .number {
  164. margin-top: 3px;
  165. height: 24px;
  166. line-height: 24px;
  167. }
  168. }
  169. }
  170. }
  171. .advertisement {
  172. margin-top: 10px;
  173. width: 345px;
  174. height: 85px;
  175. }
  176. .index-menu {
  177. display: flex;
  178. flex-direction: row;
  179. justify-content: space-between;
  180. margin-top: 15px;
  181. width: 269px;
  182. height: 57px;
  183. .menu-item {
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: flex-start;
  187. align-items: center;
  188. width: 57px;
  189. height: 57px;
  190. img {
  191. width: 32px;
  192. height: 32px;
  193. }
  194. .item-text {
  195. margin-top: 1px;
  196. height: 24px;
  197. line-height: 24px;
  198. letter-spacing: 0.2px;
  199. }
  200. }
  201. }
  202. .recommend {
  203. width: 345px;
  204. .title {
  205. margin-top: 15px;
  206. height: 24px;
  207. line-height: 24px;
  208. letter-spacing: 0.2px;
  209. }
  210. .recomment-body {
  211. margin-top: 13px;
  212. width: 100%;
  213. .recomment-item {
  214. display: flex;
  215. flex-direction: row;
  216. justify-content: space-between;
  217. margin-top: 25px;
  218. height: 34px;
  219. &:first-child {
  220. margin-top: 0;
  221. }
  222. .item-left {
  223. display: flex;
  224. flex-direction: row;
  225. justify-content: flex-start;
  226. img {
  227. width: 32px;
  228. height: 32px;
  229. }
  230. .item-time {
  231. margin-left: 10px;
  232. height: 34px;
  233. .time-top {
  234. height: 20px;
  235. line-height: 20px;
  236. }
  237. .time-bottom {
  238. height: 14px;
  239. line-height: 14px;
  240. }
  241. }
  242. }
  243. .item-right {
  244. height: 34px;
  245. .time-top {
  246. height: 20px;
  247. line-height: 20px;
  248. }
  249. .time-bottom {
  250. height: 14px;
  251. line-height: 14px;
  252. }
  253. }
  254. }
  255. }
  256. }
  257. }
  258. </style>