User.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. <template>
  2. <HeaderNav headerText="我的"></HeaderNav>
  3. <div class="index-user">
  4. <div class="user-info" @click="goUserCenter">
  5. <div class="info-left">
  6. <img src="../../assets/img/index/user/default-head.png" alt="" />
  7. <div class="left-message">
  8. <div class="name pf500 fs18 fc061237">用户昵称</div>
  9. <div class="id pf400 fs14 fc6A7187">ID: 658908</div>
  10. </div>
  11. </div>
  12. <div class="info-right">
  13. <img src="../../assets/icon/index/right-arrow.svg" alt="" />
  14. </div>
  15. </div>
  16. <div class="unlock-vip">
  17. <img src="../../assets/img/index/vip.svg" alt="" />
  18. </div>
  19. <div class="asset-management">
  20. <div class="asset-title pf600 fs18 fc333333">资产管理</div>
  21. <div class="index-menu">
  22. <div
  23. class="menu-item"
  24. v-for="(item, index) in indexMenu"
  25. :key="index"
  26. @click="goIndexMenu(index)">
  27. <img :src="item.image" alt="" />
  28. <div class="item-text pf400 fs14 fc666666">{{ item.name }}</div>
  29. </div>
  30. </div>
  31. </div>
  32. <div class="transaction">
  33. <div class="transaction-title pf600 fs18 fc333333">交易</div>
  34. <div class="index-menu">
  35. <div
  36. class="menu-item"
  37. v-for="(item, index) in transactionMenu"
  38. :key="index"
  39. @click="goTransaction(index)">
  40. <img :src="item.image" alt="" />
  41. <div class="item-text pf400 fs14 fc666666">{{ item.name }}</div>
  42. </div>
  43. </div>
  44. </div>
  45. <div class="common-functions">
  46. <div class="asset-title pf600 fs18 fc333333">常用功能</div>
  47. <div class="index-menu">
  48. <div
  49. class="menu-item"
  50. v-for="(item, index) in commonFunctions"
  51. :key="index"
  52. @click="goCommonFunc(index)">
  53. <img :src="item.image" alt="" />
  54. <div class="item-text pf400 fs14 fc666666">{{ item.name }}</div>
  55. </div>
  56. </div>
  57. </div>
  58. </div>
  59. </template>
  60. <script setup>
  61. import HeaderNav from "./components/HeaderNav.vue";
  62. import { useRoute, useRouter } from "vue-router";
  63. const router = useRouter();
  64. const goUserCenter = () => {
  65. router.push("/userCenter");
  66. };
  67. const goIndexMenu = (index) => {
  68. if (index == 0) {
  69. router.push("/rechargeIndex");
  70. } else if (index == 1) {
  71. router.push("/withdrawIndex");
  72. } else if (index == 2) {
  73. router.push("/transfer");
  74. } else if (index == 3) {
  75. router.push("/loanIndex");
  76. } else if (index == 4) {
  77. router.push("/userAsset");
  78. } else if (index == 5) {
  79. router.push("/icoIndex");
  80. }
  81. };
  82. const goTransaction = (index) => {
  83. if (index == 0) {
  84. router.push("/bitcoin/seconds");
  85. } else if (index == 1) {
  86. router.push("/bitcoin/contract");
  87. } else if (index == 2) {
  88. router.push("/bitcoin/options");
  89. } else if (index == 3) {
  90. router.push("/bitcoin/CryptocurrencyTrading");
  91. } else if (index == 4) {
  92. router.push("/financialIndex");
  93. } else if (index == 5) {
  94. router.push("/loanIndex");
  95. } else if (index == 6) {
  96. router.push("/otcIndex");
  97. }
  98. };
  99. const goCommonFunc = (index) => {
  100. if (index == 0) {
  101. router.push("/invite");
  102. } else if (index == 1) {
  103. } else if (index == 2) {
  104. router.push("/kyc/step1");
  105. } else if (index == 3) {
  106. router.push("/language");
  107. } else if (index == 4) {
  108. router.push("/detail");
  109. } else if (index == 5) {
  110. router.push("/userCenter");
  111. } else if (index == 6) {
  112. router.push("/about");
  113. }
  114. };
  115. const indexMenu = [
  116. {
  117. name: "充币",
  118. image: require("@/assets/img/index/user/chongbi.svg"),
  119. },
  120. {
  121. name: "提币",
  122. image: require("@/assets/img/index/user/tibi.svg"),
  123. },
  124. {
  125. name: "划转",
  126. image: require("@/assets/img/index/user/huazhuan.svg"),
  127. },
  128. {
  129. name: "我的贷款",
  130. image: require("@/assets/icon/index/Rectangle 4.png"),
  131. },
  132. {
  133. name: "我的资产",
  134. image: require("@/assets/icon/index/zichan.png"),
  135. },
  136. {
  137. name: "ICO",
  138. image: require("@/assets/img/index/user/ico.svg"),
  139. },
  140. ];
  141. const transactionMenu = [
  142. {
  143. name: "秒合约",
  144. image: require("@/assets/img/index/user/miaoheyue.svg"),
  145. },
  146. {
  147. name: "合约",
  148. image: require("@/assets/img/index/user/heyue.svg"),
  149. },
  150. {
  151. name: "期权",
  152. image: require("@/assets/img/index/user/qiquan.svg"),
  153. },
  154. {
  155. name: "币币",
  156. image: require("@/assets/icon/index/bibi.png"),
  157. },
  158. {
  159. name: "质押理财",
  160. image: require("@/assets/img/index/user/zhiya.svg"),
  161. },
  162. {
  163. name: "贷款",
  164. image: require("@/assets/img/index/user/daikuan.svg"),
  165. },
  166. {
  167. name: "OTC交易",
  168. image: require("@/assets/img/index/user/otc.svg"),
  169. },
  170. ];
  171. const commonFunctions = [
  172. {
  173. name: "邀请推广",
  174. image: require("@/assets/img/index/user/tuiguang.svg"),
  175. },
  176. {
  177. name: "客服",
  178. image: require("@/assets/img/index/user/kefu.svg"),
  179. },
  180. {
  181. name: "KYC认证",
  182. image: require("@/assets/img/index/user/kyc.svg"),
  183. },
  184. {
  185. name: "切换语言",
  186. image: require("@/assets/icon/index/yuyan.png"),
  187. },
  188. {
  189. name: "帮助中心",
  190. image: require("@/assets/img/index/user/help.svg"),
  191. },
  192. {
  193. name: "安全设置",
  194. image: require("@/assets/icon/index/anquanshezhi.png"),
  195. },
  196. {
  197. name: "关于我们",
  198. image: require("@/assets/icon/index/aboutus.png"),
  199. },
  200. ];
  201. </script>
  202. <style lang="less" scoped>
  203. .index-user {
  204. display: flex;
  205. flex-direction: column;
  206. justify-content: flex-start;
  207. align-items: center;
  208. width: 100%;
  209. .user-info {
  210. display: flex;
  211. flex-direction: row;
  212. justify-content: space-between;
  213. align-items: center;
  214. margin-top: 48px;
  215. width: 345px;
  216. height: 56px;
  217. .info-left {
  218. display: flex;
  219. flex-direction: row;
  220. justify-content: flex-start;
  221. height: 56px;
  222. img {
  223. width: 56px;
  224. height: 56px;
  225. }
  226. .left-message {
  227. display: flex;
  228. flex-direction: column;
  229. justify-content: flex-start;
  230. margin-left: 16px;
  231. height: 56px;
  232. .name {
  233. height: 29px;
  234. line-height: 29px;
  235. }
  236. .id {
  237. margin-top: 4px;
  238. height: 23px;
  239. line-height: 23px;
  240. }
  241. }
  242. }
  243. .info-right {
  244. width: 9px;
  245. height: 16.5px;
  246. img {
  247. width: 100%;
  248. height: 100%;
  249. }
  250. }
  251. }
  252. .unlock-vip {
  253. margin-top: 21px;
  254. width: 345px;
  255. height: 100px;
  256. img {
  257. width: 100%;
  258. height: 100%;
  259. }
  260. }
  261. .asset-management {
  262. display: flex;
  263. flex-direction: column;
  264. justify-content: flex-start;
  265. align-items: center;
  266. margin-top: 23px;
  267. width: 345px;
  268. .asset-title {
  269. width: 345px;
  270. height: 24px;
  271. line-height: 24px;
  272. letter-spacing: 0.2px;
  273. }
  274. .index-menu {
  275. display: flex;
  276. flex-direction: row;
  277. justify-content: flex-start;
  278. flex-wrap: wrap;
  279. margin-top: 15px;
  280. width: 317px;
  281. .menu-item {
  282. display: flex;
  283. flex-direction: column;
  284. justify-content: flex-start;
  285. align-items: center;
  286. margin-left: 29.6px;
  287. width: 57px;
  288. height: 57px;
  289. &:nth-child(1),
  290. &:nth-child(5) {
  291. margin-left: 0px;
  292. }
  293. &:nth-child(5),
  294. &:nth-child(6),
  295. &:nth-child(7),
  296. &:nth-child(8) {
  297. margin-top: 25px;
  298. }
  299. img {
  300. width: 32px;
  301. height: 32px;
  302. }
  303. .item-text {
  304. margin-top: 1px;
  305. height: 24px;
  306. line-height: 24px;
  307. letter-spacing: 0.2px;
  308. }
  309. }
  310. }
  311. }
  312. .transaction {
  313. display: flex;
  314. flex-direction: column;
  315. justify-content: flex-start;
  316. align-items: center;
  317. margin-top: 23px;
  318. width: 345px;
  319. .transaction-title {
  320. width: 345px;
  321. height: 24px;
  322. line-height: 24px;
  323. letter-spacing: 0.2px;
  324. }
  325. .index-menu {
  326. display: flex;
  327. flex-direction: row;
  328. justify-content: flex-start;
  329. flex-wrap: wrap;
  330. margin-top: 15px;
  331. width: 317px;
  332. .menu-item {
  333. display: flex;
  334. flex-direction: column;
  335. justify-content: flex-start;
  336. align-items: center;
  337. margin-left: 29.6px;
  338. width: 57px;
  339. height: 57px;
  340. &:nth-child(1),
  341. &:nth-child(5) {
  342. margin-left: 0px;
  343. }
  344. &:nth-child(5),
  345. &:nth-child(6),
  346. &:nth-child(7),
  347. &:nth-child(8) {
  348. margin-top: 25px;
  349. }
  350. img {
  351. width: 32px;
  352. height: 32px;
  353. }
  354. .item-text {
  355. margin-top: 1px;
  356. height: 24px;
  357. line-height: 24px;
  358. letter-spacing: 0.2px;
  359. }
  360. }
  361. }
  362. }
  363. .common-functions {
  364. display: flex;
  365. flex-direction: column;
  366. justify-content: flex-start;
  367. align-items: center;
  368. margin-top: 23px;
  369. margin-bottom: 40px;
  370. width: 345px;
  371. .asset-title {
  372. width: 345px;
  373. height: 24px;
  374. line-height: 24px;
  375. letter-spacing: 0.2px;
  376. }
  377. .index-menu {
  378. display: flex;
  379. flex-direction: row;
  380. justify-content: flex-start;
  381. flex-wrap: wrap;
  382. margin-top: 15px;
  383. width: 317px;
  384. .menu-item {
  385. display: flex;
  386. flex-direction: column;
  387. justify-content: flex-start;
  388. align-items: center;
  389. margin-left: 29.6px;
  390. width: 57px;
  391. height: 57px;
  392. &:nth-child(1),
  393. &:nth-child(5) {
  394. margin-left: 0px;
  395. }
  396. &:nth-child(5),
  397. &:nth-child(6),
  398. &:nth-child(7),
  399. &:nth-child(8) {
  400. margin-top: 25px;
  401. }
  402. img {
  403. width: 32px;
  404. height: 32px;
  405. }
  406. .item-text {
  407. margin-top: 1px;
  408. height: 24px;
  409. line-height: 24px;
  410. letter-spacing: 0.2px;
  411. }
  412. }
  413. }
  414. }
  415. }
  416. </style>