Index.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308
  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. <HotFinancial></HotFinancial>
  51. </div>
  52. </template>
  53. <script setup>
  54. import { useRoute, useRouter } from "vue-router";
  55. import HotCoin from "./components/HotCoin.vue";
  56. import HotFinancial from "./components/HotFinancial.vue";
  57. const router = useRouter();
  58. const indexMenu = [
  59. {
  60. name: "ICO功能",
  61. image: require("@/assets/img/index/Rectangle 2.svg"),
  62. },
  63. {
  64. name: "质押理财",
  65. image: require("@/assets/img/index/Rectangle 3.svg"),
  66. },
  67. {
  68. name: "贷款",
  69. image: require("@/assets/img/index/Rectangle 4.svg"),
  70. },
  71. {
  72. name: "邀请推广",
  73. image: require("@/assets/img/index/Rectangle 5.svg"),
  74. },
  75. {
  76. name: "秒合约",
  77. image: require("@/assets/img/index/Rectangle 6.svg"),
  78. },
  79. {
  80. name: "客服",
  81. image: require("@/assets/img/index/Rectangle 7.svg"),
  82. },
  83. {
  84. name: "充币",
  85. image: require("@/assets/img/index/Rectangle 8.svg"),
  86. },
  87. {
  88. name: "OTC交易",
  89. image: require("@/assets/img/index/user/otc.svg"),
  90. },
  91. ];
  92. const goMenu = (index) => {
  93. if (index == 0) {
  94. router.push("/icoIndex");
  95. } else if (index == 1) {
  96. router.push("/financialIndex");
  97. } else if (index == 2) {
  98. router.push("/loanIndex");
  99. } else if (index == 6) {
  100. router.push("/rechargeIndex");
  101. } else if (index == 7) {
  102. router.push("/otcIndex");
  103. }
  104. };
  105. const goSearch = () => {
  106. router.push("/searchIcon");
  107. };
  108. const goNotifi = () => {
  109. router.push("/notification");
  110. };
  111. const goUser = () => {
  112. router.push("/indexUser");
  113. };
  114. </script>
  115. <style lang="less" scoped>
  116. .index {
  117. display: flex;
  118. flex-direction: column;
  119. justify-content: flex-start;
  120. align-items: center;
  121. margin-bottom: 80px;
  122. width: 100%;
  123. .index-func {
  124. display: flex;
  125. flex-direction: row;
  126. justify-content: space-between;
  127. align-items: center;
  128. margin-top: 21px;
  129. width: 345px;
  130. height: 38px;
  131. .func-head {
  132. width: 38px;
  133. height: 38px;
  134. img {
  135. width: 38px;
  136. height: 38px;
  137. }
  138. }
  139. .search-currency {
  140. display: flex;
  141. flex-direction: row;
  142. justify-content: flex-start;
  143. align-items: center;
  144. margin-left: -6px;
  145. width: 210px;
  146. height: 38px;
  147. border-radius: 50px;
  148. border: 1px solid #dddddd;
  149. box-sizing: border-box;
  150. .search-img {
  151. margin-left: 12.5px;
  152. margin-right: 9.5px;
  153. width: 17px;
  154. height: 17px;
  155. }
  156. }
  157. .qr-code {
  158. display: flex;
  159. flex-direction: row;
  160. justify-content: center;
  161. align-items: center;
  162. margin-right: -10px;
  163. width: 21px;
  164. height: 18px;
  165. img {
  166. width: 21px;
  167. height: 18px;
  168. }
  169. }
  170. .notification {
  171. display: flex;
  172. flex-direction: row;
  173. justify-content: center;
  174. align-items: center;
  175. width: 16px;
  176. height: 18px;
  177. img {
  178. width: 16px;
  179. height: 18px;
  180. }
  181. }
  182. }
  183. .asset-total {
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: flex-start;
  187. margin-top: 17px;
  188. width: 343px;
  189. .asset-title {
  190. display: flex;
  191. flex-direction: row;
  192. justify-content: flex-start;
  193. align-items: center;
  194. height: 22px;
  195. .eye-close {
  196. margin-left: 5px;
  197. width: 16px;
  198. height: 16px;
  199. }
  200. }
  201. .asset-number {
  202. margin-top: 3px;
  203. height: 44px;
  204. line-height: 44px;
  205. }
  206. .asset-approximately {
  207. margin-top: 1px;
  208. height: 22px;
  209. line-height: 22px;
  210. }
  211. .asset-revenue {
  212. display: flex;
  213. flex-direction: row;
  214. justify-content: space-between;
  215. margin-top: 6px;
  216. height: 44px;
  217. .asset-left,
  218. .asset-right {
  219. height: 100%;
  220. .text {
  221. height: 20px;
  222. line-height: 20px;
  223. letter-spacing: 0.3px;
  224. }
  225. .number {
  226. margin-top: 3px;
  227. height: 24px;
  228. line-height: 24px;
  229. }
  230. }
  231. }
  232. }
  233. .advertisement {
  234. margin-top: 10px;
  235. width: 345px;
  236. height: 85px;
  237. }
  238. .index-menu {
  239. display: flex;
  240. flex-direction: row;
  241. justify-content: flex-start;
  242. flex-wrap: wrap;
  243. margin-top: 29px;
  244. width: 318px;
  245. height: 139px;
  246. .menu-item {
  247. display: flex;
  248. flex-direction: column;
  249. justify-content: flex-start;
  250. align-items: center;
  251. margin-left: 30px;
  252. width: 57px;
  253. height: 57px;
  254. &:nth-child(1),
  255. &:nth-child(5) {
  256. margin-left: 0px;
  257. }
  258. &:nth-child(5),
  259. &:nth-child(6),
  260. &:nth-child(7),
  261. &:nth-child(8) {
  262. margin-top: 25px;
  263. }
  264. img {
  265. width: 32px;
  266. height: 32px;
  267. }
  268. .item-text {
  269. margin-top: 1px;
  270. height: 24px;
  271. line-height: 24px;
  272. letter-spacing: 0.2px;
  273. }
  274. }
  275. }
  276. }
  277. </style>