my.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <template>
  2. <view class="container my-index">
  3. <img class="user-header-image" :src="bgImage" alt="" />
  4. <!-- 用户信息 - 开始 -->
  5. <view class="user-info-box">
  6. <img class="img" :src="logoImage" alt="" />
  7. <view class="user-info-right">
  8. <view class="user-nickname" @click="goPage('/pages/login/login')">登录/注册</view>
  9. </view>
  10. </view>
  11. <!-- 用户信息 - 结束 -->
  12. <view class="user-activity-menu">
  13. <view class="menu-item">
  14. <view class="left">
  15. <uni-icons type="home" size="24" color="#535353"></uni-icons>
  16. <view class="menu-name">我的房源</view>
  17. </view>
  18. <uni-icons type="right" size="20" color="#717171"></uni-icons>
  19. </view>
  20. <view class="menu-item">
  21. <view class="left">
  22. <uni-icons type="wallet" size="24" color="#535353"></uni-icons>
  23. <view class="menu-name">缴费管理</view>
  24. </view>
  25. <uni-icons type="right" size="20" color="#717171"></uni-icons>
  26. </view>
  27. <view class="menu-item">
  28. <view class="left">
  29. <uni-icons type="calendar" size="24" color="#535353"></uni-icons>
  30. <view class="menu-name">发票管理</view>
  31. </view>
  32. <uni-icons type="right" size="20" color="#717171"></uni-icons>
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <script>
  38. export default {
  39. data() {
  40. return {
  41. bgImage: require('@/static/image/my/banner.png'),
  42. logoImage: require('@/static/image/login/logo.png'),
  43. };
  44. },
  45. created() {},
  46. onShow() {},
  47. methods: {
  48. /* 跳转页面 */
  49. goPage(page) {
  50. uni.navigateTo({
  51. url: page
  52. })
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss">
  58. .my-index {
  59. position: relative;
  60. .user-header-image {
  61. width: 100%;
  62. height: 320rpx;
  63. object-fit: cover;
  64. }
  65. .user-info-box {
  66. background: #ffffff;
  67. padding: 30rpx;
  68. position: absolute;
  69. border-radius: 20rpx;
  70. display: flex;
  71. align-items: center;
  72. top: 250rpx;
  73. left: 30rpx;
  74. right: 30rpx;
  75. .img {
  76. width: 100rpx;
  77. height: 100rpx;
  78. border-radius: 10rpx;
  79. }
  80. .user-info-right {
  81. margin-left: 20rpx;
  82. }
  83. }
  84. .user-activity-menu {
  85. margin: 30rpx;
  86. margin-top: 120rpx;
  87. border-radius: 20rpx;
  88. background: #fff;
  89. .menu-item {
  90. display: flex;
  91. align-items: center;
  92. justify-content: space-between;
  93. height: 96rpx;
  94. padding: 0 30rpx;
  95. .left {
  96. display: flex;
  97. align-items: center;
  98. .menu-icon {
  99. width: 40rpx;
  100. height: 40rpx;
  101. }
  102. .menu-name {
  103. margin-left: 20rpx;
  104. color: #333;
  105. }
  106. }
  107. }
  108. }
  109. }
  110. </style>