index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <template>
  2. <view>
  3. <view class="personal">
  4. <view class="personal-main">
  5. <u-avatar :src="avatar" mode="square" size="60" class="u-avatar"></u-avatar>
  6. <view class="personal-info">
  7. <view class="">name</view>
  8. <view class="">id:12333333333</view>
  9. </view>
  10. </view>
  11. </view>
  12. <view class="n-p" v-for="(item,index) in list" :key="index" hover-class="hover-class" @click="onClick(item)">
  13. <view style="position: relative">
  14. <view class="p-left">
  15. <u-icon :name="item.icon" size="30" color="#757575"></u-icon>
  16. </view>
  17. </view>
  18. <view class="p-right">
  19. <view class="p-right-main">
  20. <view class="p-right-main-name">{{item.name}}</view>
  21. </view>
  22. <view class="lfet-a">
  23. <view style="position: relative">
  24. </view>
  25. <u-icon name="arrow-right" size="20" class="p-right-icon"></u-icon>
  26. </view>
  27. </view>
  28. </view>
  29. <button type="default">退出登录</button>
  30. </view>
  31. </template>
  32. <script>
  33. export default {
  34. data() {
  35. return {
  36. avatar: 'https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1730713693,2130926401&fm=26&gp=0.jpg',
  37. list: [
  38. // {
  39. // name: '收藏',
  40. // id: 'favorites',
  41. // icon: 'star-fill',
  42. // iconBackground: '#398c0c',
  43. // },
  44. // {
  45. // name: '相册',
  46. // id: 'photoAlbum',
  47. // icon: 'photo-fill',
  48. // iconBackground: '#5e2d88',
  49. // }, {
  50. // name: '卡包',
  51. // id: 'cardPackage',
  52. // icon: 'grid-fill',
  53. // iconBackground: '#33696c',
  54. // }, {
  55. // name: '表情',
  56. // id: 'expression',
  57. // icon: 'gift-fill',
  58. // iconBackground: '#833456',
  59. // },
  60. {
  61. name: '修改密码',
  62. id: 'setUp',
  63. icon: 'setting-fill',
  64. iconBackground: '#3b2021',
  65. },
  66. ],
  67. }
  68. },
  69. methods: {
  70. onClick(item) {
  71. uni.navigateTo({
  72. url: "/pages/login/forget"
  73. })
  74. },
  75. }
  76. }
  77. </script>
  78. <style>
  79. page {
  80. background-color: #f7f7f7;
  81. }
  82. .personal {
  83. display: flex;
  84. align-items: center;
  85. justify-content: space-between;
  86. padding: 30rpx 0 40rpx 30rpx;
  87. }
  88. .personal-main {
  89. display: flex;
  90. align-items: center;
  91. }
  92. .personal-info {
  93. display: flex;
  94. flex-direction: column;
  95. }
  96. .u-avatar {
  97. margin-right: 30rpx;
  98. }
  99. .navbar-right {
  100. padding: 0 40rpx;
  101. }
  102. .navbar-right-icon {
  103. margin-left: 50rpx;
  104. }
  105. .hover-class {
  106. background-color: #efefef;
  107. }
  108. .n-p {
  109. display: flex;
  110. align-items: center;
  111. background-color: #ffffff;
  112. margin-bottom: 20rpx;
  113. }
  114. .p-right-icon {
  115. padding: 0 40rpx;
  116. }
  117. .p-left {
  118. display: flex;
  119. align-items: center;
  120. justify-content: center;
  121. width: 60rpx;
  122. height: 60rpx;
  123. padding: 10rpx;
  124. margin: 20rpx;
  125. color: #FFFFFF;
  126. border-radius: 10rpx;
  127. }
  128. .p-right {
  129. height: 90rpx;
  130. flex: 1;
  131. display: flex;
  132. align-items: center;
  133. justify-content: space-between;
  134. }
  135. .p-right-main {
  136. display: flex;
  137. align-items: center;
  138. justify-content: space-between;
  139. }
  140. .p-right-main-name {
  141. font-size: 36rpx;
  142. font-weight: 500;
  143. }
  144. .p-right-main-time {
  145. margin-right: 20rpx;
  146. font-size: 24rpx;
  147. color: #9d9d9d;
  148. }
  149. </style>