index.vue 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  1. <template>
  2. <view class="index-container">
  3. <view class="project-box">
  4. <view class="project-name">
  5. <text class="label">项目名称</text>
  6. <uni-icons class="project-icon" type="right" size="16"></uni-icons>
  7. </view>
  8. <view class="change-role">
  9. <uni-icons type="contact" size="14" class="role-icon"></uni-icons>切换角色
  10. </view>
  11. </view>
  12. <view class="banner-box">
  13. <swiper class="swiper-box">
  14. <swiper-item class="swiper-item-box" v-for="(item, index) in info" :key="index">
  15. <view class="swiper-item" :style="'background-image:url(' + item.url + ')'"></view>
  16. </swiper-item>
  17. </swiper>
  18. </view>
  19. <view class="grid">
  20. <view class="grid-item red">
  21. <view>
  22. <view class="label">房源列表</view>
  23. <view class="sub-label">
  24. 查看房源
  25. <uni-icons class="sub-label-icon" type="right" size="14"></uni-icons>
  26. </view>
  27. </view>
  28. <uni-icons class="home-filled" type="home-filled" size="40"></uni-icons>
  29. </view>
  30. <view class="grid-item blue">
  31. <view>
  32. <view class="label">客户管理</view>
  33. <view class="sub-label">
  34. 查看客户
  35. <uni-icons class="sub-label-icon" type="right" size="14"></uni-icons>
  36. </view>
  37. </view>
  38. <uni-icons class="home-filled" type="person-filled" size="40"></uni-icons>
  39. </view>
  40. </view>
  41. <view class="house-box">
  42. <view class="good-box">
  43. <text>推荐房源</text>
  44. </view>
  45. <house-list></house-list>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import houseList from '@/components/house/houseList.vue'
  51. export default {
  52. data() {
  53. return {
  54. info: [{
  55. url: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/3556e2b4f9c844758c3af76407b3a5d5'
  56. },
  57. {
  58. url: 'https://file-node.oss-cn-shanghai.aliyuncs.com/youji/f488a1cc0e904ed089d52d88e3c1b33d'
  59. }
  60. ]
  61. }
  62. },
  63. onShow() {},
  64. methods: {},
  65. components: {
  66. houseList
  67. }
  68. }
  69. </script>
  70. <style lang="scss">
  71. .index-container {
  72. box-sizing: border-box;
  73. position: relative;
  74. .project-box {
  75. padding: 20rpx 30rpx;
  76. display: flex;
  77. justify-content: space-between;
  78. background-color: $uni-white;
  79. border-top: 1px solid $uni-border-2;
  80. position: fixed;
  81. /* #ifdef MP-WEIXIN */
  82. top: 0;
  83. /* #endif */
  84. /* #ifdef H5 */
  85. top: calc(44px + env(safe-area-inset-top));
  86. /* #endif */
  87. left: 0;
  88. right: 0;
  89. z-index: 99;
  90. .project-name {
  91. display: flex;
  92. align-items: center;
  93. font-weight: 400;
  94. align-items: center;
  95. flex: 1;
  96. width: 0;
  97. overflow: hidden;
  98. }
  99. .project-icon {
  100. margin-left: 8rpx;
  101. }
  102. .change-role {
  103. font-size: 24rpx;
  104. color: $uni-secondary-color;
  105. border: 1px solid $uni-border-3;
  106. width: 160rpx;
  107. height: 40rpx;
  108. border-radius: 40rpx;
  109. display: flex;
  110. align-items: center;
  111. justify-content: center;
  112. }
  113. .role-icon {
  114. text {
  115. color: $uni-secondary-color !important;
  116. }
  117. margin-right: 8rpx;
  118. }
  119. }
  120. .banner-box {
  121. padding: 30rpx;
  122. box-sizing: border-box;
  123. margin-top: 86rpx;
  124. .swiper-box {
  125. height: 400rpx;
  126. border-radius: 20rpx;
  127. overflow: hidden;
  128. }
  129. .swiper-item {
  130. width: 100%;
  131. height: 100%;
  132. background-size: cover;
  133. background-position: bottom;
  134. }
  135. .swiper-item-box:first-child {
  136. border-radius: 20rpx 0 0 20rpx;
  137. }
  138. .swiper-item-box:last-child {
  139. border-radius: 0 20rpx 20rpx 0;
  140. }
  141. }
  142. .grid {
  143. display: flex;
  144. flex-wrap: wrap;
  145. padding: 0 30rpx;
  146. box-sizing: border-box;
  147. .grid-item {
  148. flex: 1;
  149. height: 180rpx;
  150. border-radius: 16rpx;
  151. color: $uni-white;
  152. display: flex;
  153. align-items: center;
  154. padding: 0 20rpx;
  155. justify-content: space-between;
  156. &.red {
  157. background: linear-gradient(to right, rgb(242, 79, 104), rgb(237, 133, 152));
  158. }
  159. &.blue {
  160. background: linear-gradient(to right, rgb(69, 159, 230), rgb(108, 201, 228));
  161. }
  162. }
  163. .label {
  164. font-size: 32rpx;
  165. margin-bottom: 5px;
  166. }
  167. .sub-label {
  168. color: $uni-extras-color;
  169. font-size: 24rpx;
  170. display: flex;
  171. align-items: center;
  172. height: 40rpx;
  173. opacity: 0.5;
  174. }
  175. .sub-label-icon {
  176. /* #ifdef H5 */
  177. color: $uni-extras-color !important;
  178. /* #endif */
  179. /* #ifdef MP-WEIXIN */
  180. text {
  181. color: $uni-extras-color !important;
  182. }
  183. /* #endif */
  184. }
  185. .grid-item:nth-child(2n) {
  186. margin-left: 30rpx;
  187. }
  188. .home-filled {
  189. opacity: 0.3;
  190. /* #ifdef H5 */
  191. color: $uni-extras-color !important;
  192. /* #endif */
  193. /* #ifdef MP-WEIXIN */
  194. text {
  195. color: $uni-extras-color !important;
  196. }
  197. /* #endif */
  198. }
  199. }
  200. .house-box {
  201. padding: 0 30rpx;
  202. box-sizing: border-box;
  203. .good-box {
  204. margin-top: 30rpx;
  205. position: relative;
  206. text-align: center;
  207. text {
  208. background: $uni-background-color;
  209. z-index: 9;
  210. position: relative;
  211. padding: 5px 10px;
  212. color: $uni-secondary-color;
  213. }
  214. &:before {
  215. content: '';
  216. bottom: 20rpx;
  217. position: absolute;
  218. left: 0;
  219. height: 1px;
  220. right: 0;
  221. background: $uni-border-2;
  222. z-index: 8;
  223. }
  224. }
  225. }
  226. }
  227. </style>