user.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. <template>
  2. <view class="user">
  3. <view class="user-info">
  4. <view class="user-img">
  5. <image src="../../static/images/people@2x.png" mode=""></image>
  6. </view>
  7. <view class="user-text">
  8. <view class="name">
  9. admin
  10. </view>
  11. <view class="address">
  12. 福建宏星电子科技有限公司
  13. </view>
  14. </view>
  15. <view class="">
  16. <uni-icons color="#fff" type="right" size="30"></uni-icons>
  17. </view>
  18. </view>
  19. <ul class="user-list">
  20. <li>
  21. <view class="list-left">
  22. <image src="../../static/images/icon_sbxx@2x.png" mode=""></image>
  23. <view class="text">
  24. 设备信息
  25. </view>
  26. <uni-icons style="color:#fff" type="right" size="30"></uni-icons>
  27. </view>
  28. <view class="">
  29. <uni-icons color="#999" type="right" size="30"></uni-icons>
  30. </view>
  31. </li>
  32. <li>
  33. <view class="list-left">
  34. <image src="../../static/images/icon_qhyy@2x.png" mode=""></image>
  35. <view class="text">
  36. 切换语言
  37. </view>
  38. <uni-icons style="color:#fff" type="right" size="30"></uni-icons>
  39. </view>
  40. <view class="">
  41. <uni-icons color="#999" type="right" size="30"></uni-icons>
  42. </view>
  43. </li>
  44. </ul>
  45. <view class="login-out" @click="logout">
  46. 退出登录
  47. </view>
  48. </view>
  49. </template>
  50. <script>
  51. export default{
  52. data(){
  53. return {
  54. }
  55. },
  56. methods:{
  57. logout(){
  58. uni.navigateTo({
  59. url: '/pages/user/login'
  60. })
  61. },
  62. },
  63. created(){
  64. },
  65. }
  66. </script>
  67. <style lang="less">
  68. .user{
  69. .user-list{
  70. background-color: #fff;
  71. border-radius: 20rpx;
  72. position: relative;
  73. top: -100rpx;
  74. li{
  75. height: 120rpx;
  76. line-height: 120rpx;
  77. display: flex;
  78. justify-content: space-between;
  79. padding: 0 24rpx;
  80. .list-left{
  81. display: flex;
  82. image{
  83. width: 48rpx;
  84. height: 48rpx;
  85. margin: 36rpx 16rpx 36rpx 0;
  86. }
  87. }
  88. }
  89. }
  90. .user-info{
  91. background: linear-gradient(180deg,#3370ff, #f1f1f1);
  92. height: 500rpx;
  93. display: flex;
  94. align-items: center;
  95. justify-content: space-between;
  96. padding: 0 24rpx;
  97. color: #fff;
  98. .user-text{
  99. position: relative;
  100. left: -10%;
  101. }
  102. .name{
  103. font-size: 40rpx;
  104. }
  105. .address{
  106. font-size: 28rpx;
  107. margin-top: 10rpx;
  108. }
  109. .user-img{
  110. width: 120rpx;
  111. height: 120rpx;
  112. border-radius: 50%;
  113. background-color: #fff;
  114. image{
  115. width: 100rpx;
  116. height: 100rpx;
  117. margin: 10rpx;
  118. }
  119. }
  120. }
  121. .user-info>view{
  122. position: relative;
  123. top: -50rpx;
  124. }
  125. text{
  126. color: #fff;
  127. }
  128. .login-out{
  129. height: 90rpx;
  130. line-height: 90rpx;
  131. text-align: center;
  132. margin: 0 auto;
  133. position: fixed;
  134. left: 45rpx;
  135. right: 45rpx;
  136. bottom: 180rpx;
  137. background-color: #EAF0FF;
  138. color: #3370FF;
  139. border-radius: 45rpx;
  140. }
  141. }
  142. </style>