index.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="container index-container">
  3. <view class="project-box">
  4. <view class="project-name">
  5. <span class="label">项目名称</span>
  6. <uni-icons class="project-icon" type="right" size="16"></uni-icons>
  7. </view>
  8. </view>
  9. <view class="banner-box">
  10. <uni-swiper-dot :info="info" mode="round">
  11. <swiper class="swiper-box">
  12. <swiper-item class="swiper-item-box" v-for="(item, index) in info" :key="index">
  13. <view class="swiper-item" :style="'background-image:url('+item.url+')'"></view>
  14. </swiper-item>
  15. </swiper>
  16. </uni-swiper-dot>
  17. </view>
  18. <view class="grid">
  19. <view class="grid-item red">
  20. <view>
  21. <view class="label">房源列表</view>
  22. <view class="sub-label">查看房源<uni-icons class="sub-label-icon" type="right" size="14"
  23. color="#eee"></uni-icons></view>
  24. </view>
  25. <uni-icons class="home-filled" type="home-filled" size="40" color="#eee"></uni-icons>
  26. </view>
  27. <view class="grid-item blue">
  28. <view>
  29. <view class="label">客户管理</view>
  30. <view class="sub-label">查看客户<uni-icons class="sub-label-icon" type="right" size="14"
  31. color="#eee"></uni-icons></view>
  32. </view>
  33. <uni-icons class="home-filled" type="person-filled" size="40" color="#eee"></uni-icons>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. data() {
  41. return {
  42. info: [{
  43. url: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5'
  44. },
  45. {
  46. url: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/f488a1cc0e904ed089d52d88e3c1b33d'
  47. }
  48. ],
  49. modeIndex: -1,
  50. current: 0,
  51. swiperDotIndex: 0
  52. }
  53. },
  54. methods: {}
  55. }
  56. </script>
  57. <style lang="scss">
  58. .index-container {
  59. padding: 0 30rpx;
  60. box-sizing: border-box;
  61. .project-box {
  62. padding: 30rpx 0;
  63. .project-name {
  64. display: flex;
  65. font-size: 16px;
  66. align-items: center;
  67. font-weight: 400;
  68. }
  69. .project-icon {
  70. margin-left: 8rpx;
  71. }
  72. }
  73. .banner-box {
  74. border-radius: 20rpx;
  75. overflow: hidden;
  76. }
  77. .swiper-box {
  78. height: 400rpx;
  79. }
  80. .swiper-item {
  81. width: 100%;
  82. height: 100%;
  83. background-size: cover;
  84. background-position: bottom;
  85. }
  86. .swiper-item-box:first-child {
  87. border-radius: 20rpx 0 0 20rpx;
  88. }
  89. .swiper-item-box:last-child {
  90. border-radius: 0 20rpx 20rpx 0;
  91. }
  92. .grid {
  93. display: flex;
  94. flex-wrap: wrap;
  95. margin-top: 30rpx;
  96. .grid-item {
  97. flex: 1;
  98. height: 180rpx;
  99. background: #fff;
  100. border-radius: 16rpx;
  101. color: #fff;
  102. display: flex;
  103. align-items: center;
  104. padding: 0 10px;
  105. justify-content: space-between;
  106. &.red {
  107. background: linear-gradient(to right, rgb(242, 79, 104), rgb(237, 133, 152));
  108. }
  109. &.blue {
  110. background: linear-gradient(to right, rgb(69, 159, 230), rgb(108, 201, 228));
  111. }
  112. }
  113. .label {
  114. font-size: 36rpx;
  115. margin-bottom: 5px;
  116. }
  117. .sub-label {
  118. color: rgba(255, 255, 255, 0.5);
  119. font-size: 24rpx;
  120. display: flex;
  121. align-items: center;
  122. height: 40rpx;
  123. }
  124. .sub-label-icon {
  125. opacity: 0.7;
  126. }
  127. .grid-item:nth-child(2n) {
  128. margin-left: 30rpx;
  129. }
  130. .home-filled {
  131. color: #eee;
  132. opacity: 0.3;
  133. }
  134. }
  135. }
  136. </style>