Index.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300
  1. <template>
  2. <div class="index">
  3. <div class="index-func">
  4. <div class="func-head">
  5. <img src="../../assets/img/index/default-img.svg" alt="" @click="goUser" />
  6. </div>
  7. <div class="search-currency pf400 fs14 fcA9A9A9" @click="goSearch">
  8. <img src="../../assets/icon/index/search-gray.svg" class="search-img" alt="" />
  9. 搜索您关心的币种
  10. </div>
  11. <div class="qr-code">
  12. <img src="../../assets/icon/index/ic_qrcode_bk.svg" alt="" />
  13. </div>
  14. <div class="notification" @click="goNotifi">
  15. <img src="../../assets/icon/index/Notification.svg" alt="" />
  16. </div>
  17. </div>
  18. <div class="asset-total">
  19. <div class="asset-title pf400 fs16 fc1F2937">
  20. 理财总资产(USDT)
  21. <img src="../../assets/icon/index/EyeClosed.svg" class="eye-close" alt="" />
  22. </div>
  23. <div class="asset-number pf600 fs32 fc1F2937">1,125,158.00</div>
  24. <div class="asset-approximately pf400 fs16 fcDF384C">≈35,458.00</div>
  25. <div class="asset-revenue">
  26. <div class="asset-left">
  27. <div class="text pf400 fs12 fc6A7187">昨日收益(USDT)</div>
  28. <div class="number pf400 fs16 fc061237">5,678.00</div>
  29. </div>
  30. <div class="asset-right">
  31. <div class="text pf400 fs12 fc6A7187">累计收益(USDT)</div>
  32. <div class="number pf400 fs16 fc061237">5,678.00</div>
  33. </div>
  34. </div>
  35. </div>
  36. <div class="advertisement">
  37. <img src="../../assets/img/index/Rectangle 1.png" alt="" />
  38. </div>
  39. <div class="index-menu">
  40. <div
  41. class="menu-item"
  42. v-for="(item, index) in indexMenu"
  43. :key="index"
  44. @click="goMenu(index)">
  45. <img :src="item.image" alt="" />
  46. <div class="item-text pf400 fs14 fc666666">{{ item.name }}</div>
  47. </div>
  48. </div>
  49. <HotCoin></HotCoin>
  50. </div>
  51. </template>
  52. <script setup>
  53. import { useRoute, useRouter } from "vue-router";
  54. import HotCoin from "./components/HotCoin.vue";
  55. const router = useRouter();
  56. const indexMenu = [
  57. {
  58. name: "ICO功能",
  59. image: require("@/assets/img/index/Rectangle 2.svg"),
  60. },
  61. {
  62. name: "质押理财",
  63. image: require("@/assets/img/index/Rectangle 3.svg"),
  64. },
  65. {
  66. name: "贷款",
  67. image: require("@/assets/img/index/Rectangle 4.svg"),
  68. },
  69. {
  70. name: "邀请推广",
  71. image: require("@/assets/img/index/Rectangle 5.svg"),
  72. },
  73. {
  74. name: "秒合约",
  75. image: require("@/assets/img/index/Rectangle 6.svg"),
  76. },
  77. {
  78. name: "客服",
  79. image: require("@/assets/img/index/Rectangle 7.svg"),
  80. },
  81. {
  82. name: "充币",
  83. image: require("@/assets/img/index/Rectangle 8.svg"),
  84. },
  85. {
  86. name: "提币",
  87. image: require("@/assets/img/index/Rectangle 9.svg"),
  88. },
  89. ];
  90. const goMenu = (index) => {
  91. if (index == 0) {
  92. router.push("/icoIndex");
  93. } else if (index == 2) {
  94. router.push("/loanIndex");
  95. }
  96. };
  97. const goSearch = () => {
  98. router.push("/searchIcon");
  99. };
  100. const goNotifi = () => {
  101. router.push("/notification");
  102. };
  103. const goUser = () => {
  104. router.push("/indexUser");
  105. };
  106. </script>
  107. <style lang="less" scoped>
  108. .index {
  109. display: flex;
  110. flex-direction: column;
  111. justify-content: flex-start;
  112. align-items: center;
  113. margin-bottom: 100px;
  114. width: 100%;
  115. .index-func {
  116. display: flex;
  117. flex-direction: row;
  118. justify-content: space-between;
  119. align-items: center;
  120. margin-top: 21px;
  121. width: 345px;
  122. height: 38px;
  123. .func-head {
  124. width: 38px;
  125. height: 38px;
  126. img {
  127. width: 38px;
  128. height: 38px;
  129. }
  130. }
  131. .search-currency {
  132. display: flex;
  133. flex-direction: row;
  134. justify-content: flex-start;
  135. align-items: center;
  136. margin-left: -6px;
  137. width: 210px;
  138. height: 38px;
  139. border-radius: 50px;
  140. border: 1px solid #dddddd;
  141. box-sizing: border-box;
  142. .search-img {
  143. margin-left: 12.5px;
  144. margin-right: 9.5px;
  145. width: 17px;
  146. height: 17px;
  147. }
  148. }
  149. .qr-code {
  150. display: flex;
  151. flex-direction: row;
  152. justify-content: center;
  153. align-items: center;
  154. margin-right: -10px;
  155. width: 21px;
  156. height: 18px;
  157. img {
  158. width: 21px;
  159. height: 18px;
  160. }
  161. }
  162. .notification {
  163. display: flex;
  164. flex-direction: row;
  165. justify-content: center;
  166. align-items: center;
  167. width: 16px;
  168. height: 18px;
  169. img {
  170. width: 16px;
  171. height: 18px;
  172. }
  173. }
  174. }
  175. .asset-total {
  176. display: flex;
  177. flex-direction: column;
  178. justify-content: flex-start;
  179. margin-top: 17px;
  180. width: 343px;
  181. .asset-title {
  182. display: flex;
  183. flex-direction: row;
  184. justify-content: flex-start;
  185. align-items: center;
  186. height: 22px;
  187. .eye-close {
  188. margin-left: 5px;
  189. width: 16px;
  190. height: 16px;
  191. }
  192. }
  193. .asset-number {
  194. margin-top: 3px;
  195. height: 44px;
  196. line-height: 44px;
  197. }
  198. .asset-approximately {
  199. margin-top: 1px;
  200. height: 22px;
  201. line-height: 22px;
  202. }
  203. .asset-revenue {
  204. display: flex;
  205. flex-direction: row;
  206. justify-content: space-between;
  207. margin-top: 6px;
  208. height: 44px;
  209. .asset-left,
  210. .asset-right {
  211. height: 100%;
  212. .text {
  213. height: 20px;
  214. line-height: 20px;
  215. letter-spacing: 0.3px;
  216. }
  217. .number {
  218. margin-top: 3px;
  219. height: 24px;
  220. line-height: 24px;
  221. }
  222. }
  223. }
  224. }
  225. .advertisement {
  226. margin-top: 10px;
  227. width: 345px;
  228. height: 85px;
  229. }
  230. .index-menu {
  231. display: flex;
  232. flex-direction: row;
  233. justify-content: flex-start;
  234. flex-wrap: wrap;
  235. margin-top: 29px;
  236. width: 318px;
  237. height: 139px;
  238. .menu-item {
  239. display: flex;
  240. flex-direction: column;
  241. justify-content: flex-start;
  242. align-items: center;
  243. margin-left: 30px;
  244. width: 57px;
  245. height: 57px;
  246. &:nth-child(1),
  247. &:nth-child(5) {
  248. margin-left: 0px;
  249. }
  250. &:nth-child(5),
  251. &:nth-child(6),
  252. &:nth-child(7),
  253. &:nth-child(8) {
  254. margin-top: 25px;
  255. }
  256. img {
  257. width: 32px;
  258. height: 32px;
  259. }
  260. .item-text {
  261. margin-top: 1px;
  262. height: 24px;
  263. line-height: 24px;
  264. letter-spacing: 0.2px;
  265. }
  266. }
  267. }
  268. }
  269. </style>