Index.vue 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  1. <template>
  2. <!-- 我的 -->
  3. <div class="user-index">
  4. <div class="loan-info">
  5. <div class="info-left">
  6. <img src="../../assets/img/index/user/default-head.png" alt="" />
  7. <div class="info-name" @click="deleteAccount">
  8. <div class="name-area pf500 fs18 fc121212">
  9. 用户昵称
  10. <div class="level pf500 fs10 fcDF384C">V2</div>
  11. </div>
  12. <div class="pf400 fs14 fc6A7187">ID: 658908</div>
  13. </div>
  14. </div>
  15. <div class="info-right"></div>
  16. </div>
  17. <img src="../../assets/img/user/Invite Friends.svg" class="invite-friend" alt="" />
  18. <div class="user-func">
  19. <div
  20. class="func-item"
  21. v-for="(item, index) in userMenu"
  22. :key="index"
  23. @click="goMenuRouter(index)">
  24. <div class="item-left pf500 fs14 fc333333">
  25. <div class="left-img">
  26. <img :src="item.img" class="anquan-set" alt="" />
  27. </div>
  28. {{ item.name }}
  29. </div>
  30. <img src="../../assets/icon/user/right-arrow.svg" class="right-arrow" alt="" />
  31. </div>
  32. </div>
  33. <div class="submit pf600 fs14 fcFFFFFF">退出</div>
  34. </div>
  35. </template>
  36. <script setup>
  37. import { useRoute, useRouter } from "vue-router";
  38. const router = useRouter();
  39. const deleteAccount = () => {
  40. router.push("/deleteAccount");
  41. };
  42. const goMenuRouter = () => {
  43. router.push("/userLoanIndex");
  44. };
  45. const userMenu = [
  46. {
  47. name: "安全设置",
  48. img: require("@/assets/icon/user/anquan-set.svg"),
  49. },
  50. {
  51. name: "我的贷款",
  52. img: require("@/assets/icon/user/my-loan.svg"),
  53. },
  54. {
  55. name: "高级认证",
  56. img: require("@/assets/icon/user/certification.svg"),
  57. },
  58. {
  59. name: "KYC认证",
  60. img: require("@/assets/icon/user/key-certification.svg"),
  61. },
  62. {
  63. name: "我的资产",
  64. img: require("@/assets/icon/user/my-money.svg"),
  65. },
  66. {
  67. name: "切换语言",
  68. img: require("@/assets/icon/user/language.svg"),
  69. },
  70. {
  71. name: "联系客服",
  72. img: require("@/assets/icon/user/customer-service.svg"),
  73. },
  74. {
  75. name: "帮助中心",
  76. img: require("@/assets/icon/user/help-center.svg"),
  77. },
  78. {
  79. name: "关于我们",
  80. img: require("@/assets/icon/user/about-we.svg"),
  81. },
  82. ];
  83. </script>
  84. <style lang="less" scoped>
  85. .user-index {
  86. display: flex;
  87. flex-direction: column;
  88. justify-content: flex-start;
  89. align-items: center;
  90. margin-bottom: 100px;
  91. width: 100%;
  92. .margin-top16 {
  93. margin-top: 16px;
  94. }
  95. .margin-top28 {
  96. margin-top: 28px;
  97. }
  98. .loan-info {
  99. display: flex;
  100. flex-direction: row;
  101. justify-content: space-between;
  102. align-items: center;
  103. margin-top: 20px;
  104. width: calc(349px - 22px);
  105. height: 90px;
  106. .info-left {
  107. display: flex;
  108. flex-direction: row;
  109. justify-content: flex-start;
  110. height: 56px;
  111. img {
  112. width: 56px;
  113. height: 56px;
  114. }
  115. .info-name {
  116. display: flex;
  117. flex-direction: column;
  118. justify-content: space-evenly;
  119. margin-left: 16px;
  120. height: 56px;
  121. .name-area {
  122. display: flex;
  123. flex-direction: row;
  124. justify-content: flex-start;
  125. align-items: center;
  126. .level {
  127. margin-left: 5px;
  128. width: 18px;
  129. height: 15px;
  130. line-height: 15px;
  131. text-align: center;
  132. border-radius: 3px;
  133. background: #df384c1a;
  134. }
  135. }
  136. }
  137. }
  138. .info-right {
  139. width: 90px;
  140. height: 90px;
  141. background: pink;
  142. }
  143. }
  144. .invite-friend {
  145. margin-top: 20px;
  146. width: 327px;
  147. height: 68px;
  148. }
  149. .user-func {
  150. width: 340px;
  151. .func-item {
  152. display: flex;
  153. flex-direction: row;
  154. justify-content: space-between;
  155. align-items: center;
  156. margin-top: 26.5px;
  157. width: 340px;
  158. height: 24px;
  159. &:first-child {
  160. margin-top: 18px;
  161. }
  162. .item-left {
  163. display: flex;
  164. flex-direction: row;
  165. justify-content: flex-start;
  166. align-items: center;
  167. height: 24px;
  168. .left-img {
  169. display: flex;
  170. flex-direction: row;
  171. justify-content: center;
  172. align-items: center;
  173. width: 24px;
  174. height: 24px;
  175. }
  176. .anquan-set {
  177. margin-right: 8px;
  178. }
  179. }
  180. .right-arrow {
  181. width: 7px;
  182. height: 15px;
  183. }
  184. }
  185. }
  186. .submit {
  187. margin-top: 43px;
  188. width: 311px;
  189. height: 40px;
  190. line-height: 40px;
  191. text-align: center;
  192. border-radius: 100px;
  193. background: #df384c;
  194. letter-spacing: 0.2px;
  195. }
  196. }
  197. </style>