my.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <view class="container">
  3. <!-- 顶部用户信息区域 -->
  4. <view class="header">
  5. <img src="../../static/my/headerImg.png" />
  6. <!-- 页面标题 -->
  7. <view class="title">我的</view>
  8. <!-- 头像区域 -->
  9. <img class="img" src="../../static/my/portrait.png" />
  10. <!-- 姓名区域 -->
  11. <view class="name">张三</view>
  12. <!-- 用户id区域 -->
  13. <view class="number">ID:1925689</view>
  14. <!-- 是否实名认证区域 -->
  15. <view class="real" v-if="real">
  16. <img src="../../static/my/true.png" />
  17. 已实名认证
  18. </view>
  19. <view class="real2" v-else @click="goPageCommon">
  20. 去认证
  21. <img src="../../static/my/right2.png" />
  22. </view>
  23. </view>
  24. <!-- 内容区域 -->
  25. <view class="body">
  26. <!-- 订单管理区域 -->
  27. <view class="body_item" @click="goPageOrder">
  28. <img class="img" src="../../static/my/order.png" />
  29. 订单管理
  30. </view>
  31. <!-- 常用旅客区域 -->
  32. <view class="body_item" @click="goPageCommon">
  33. <img class="img2" src="../../static/my/people.png" />
  34. 常用旅客
  35. </view>
  36. <!-- 设置区域 -->
  37. <view class="body_item" @click="goPageSet">
  38. <img class="img3" src="../../static/my/set.png" />
  39. 设置
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. export default {
  46. data() {
  47. return {
  48. // 是否实名认证
  49. real: false
  50. }
  51. },
  52. methods: {
  53. // 点击订单管理按钮回调
  54. goPageOrder() {
  55. uni.navigateTo({
  56. url: '/pages/orderManage/orderManage'
  57. })
  58. },
  59. // 点击常用旅客按钮回调
  60. goPageCommon() {
  61. uni.navigateTo({
  62. url: '/pages/common/common'
  63. })
  64. },
  65. // 点击设置按钮回调
  66. goPageSet() {
  67. uni.navigateTo({
  68. url: '/pages/set/set'
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .container {
  76. position: relative;
  77. min-height: 100vh;
  78. background-color: #ebeced;
  79. .header {
  80. position: relative;
  81. height: 480rpx;
  82. color: #fff;
  83. overflow: hidden;
  84. img {
  85. width: 100%;
  86. }
  87. .title {
  88. position: absolute;
  89. top: 65rpx;
  90. left: 342rpx;
  91. font-size: 28rpx;
  92. color: #fff;
  93. }
  94. .img {
  95. position: absolute;
  96. top: 190rpx;
  97. left: 32rpx;
  98. width: 140rpx;
  99. height: 140rpx;
  100. }
  101. .name {
  102. position: absolute;
  103. top: 178rpx;
  104. left: 202rpx;
  105. font-size: 40rpx;
  106. font-weight: bold;
  107. }
  108. .number {
  109. position: absolute;
  110. top: 240rpx;
  111. left: 202rpx;
  112. font-size: 24rpx;
  113. opacity: 0.5;
  114. }
  115. .real {
  116. position: absolute;
  117. top: 285rpx;
  118. left: 202rpx;
  119. display: flex;
  120. align-items: center;
  121. box-sizing: border-box;
  122. padding-left: 13rpx;
  123. width: 179rpx;
  124. height: 42rpx;
  125. font-size: 24rpx;
  126. border-radius: 113rpx;
  127. background-color: rgba(255, 255, 255, 0.2);
  128. img {
  129. margin-right: 7rpx;
  130. width: 24rpx;
  131. height: 24rpx;
  132. }
  133. }
  134. .real2 {
  135. position: absolute;
  136. top: 285rpx;
  137. left: 202rpx;
  138. display: flex;
  139. justify-content: center;
  140. align-items: center;
  141. box-sizing: border-box;
  142. padding-left: 13rpx;
  143. width: 179rpx;
  144. height: 42rpx;
  145. font-size: 24rpx;
  146. border-radius: 113rpx;
  147. background-color: rgba(255, 255, 255, 0.2);
  148. img {
  149. margin-left: 12rpx;
  150. width: 24rpx;
  151. height: 24rpx;
  152. }
  153. }
  154. }
  155. .body {
  156. position: absolute;
  157. top: 360rpx;
  158. box-sizing: border-box;
  159. padding: 0 30rpx;
  160. width: 100%;
  161. height: calc(100vh - 360rpx);
  162. border-radius: 20rpx 20rpx 0 0;
  163. background-color: #fff;
  164. .body_item {
  165. display: flex;
  166. align-items: center;
  167. height: 121rpx;
  168. font-size: 28rpx;
  169. border-bottom: 1rpx solid #e6e6e6;
  170. .img {
  171. margin-right: 17rpx;
  172. width: 53rpx;
  173. height: 53rpx;
  174. }
  175. .img2 {
  176. margin-right: 22rpx;
  177. width: 42rpx;
  178. height: 42rpx;
  179. }
  180. .img3 {
  181. margin-right: 18rpx;
  182. width: 50rpx;
  183. height: 50rpx;
  184. }
  185. }
  186. }
  187. }
  188. </style>