兼兼街租房小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

209 lines
3.6 KiB

  1. <template>
  2. <view class="container">
  3. <view :class="{'icon-active': show}" class="ant-center-icon" @click="show=true"/>
  4. <view v-show="show" class="ant-bottom-modal" @click="show=false"/>
  5. <view :class="{'active': show}" class="ant-bottom-card">
  6. <view class="me-div" @click="pushHouse">
  7. <view class="me-icon"></view>
  8. <view class="me-texts">
  9. <view class="me-title">发布房源</view>
  10. <view class="">转租 整租</view>
  11. </view>
  12. </view>
  13. <!-- <view class="me-div" @click="pushArticle">
  14. <view class="me-icon"></view>
  15. <view class="me-texts">
  16. <view class="me-title">发布帖子</view>
  17. <view class="">找合租 找室友 转租 非转租</view>
  18. </view>
  19. </view> -->
  20. <view :class="{'me-icon-active': show}" class="me-x" @click="show=false"/>
  21. </view>
  22. </view>
  23. </template>
  24. <script>
  25. export default {
  26. onLoad() {
  27. console.log('icon')
  28. }
  29. }
  30. </script>
  31. <style lang="scss">
  32. .container{
  33. background-color: #fff !important;
  34. .ant-center-icon{
  35. width: 200rpx;
  36. height: 200rpx;
  37. border-radius: 50%;
  38. background-color: #4996f5;
  39. position: absolute;
  40. left: calc(50vw - 100rpx);
  41. top: calc(45vh - 100rpx);
  42. box-shadow: 10rpx 10rpx 10rpx rgba(0, 0, 0, .2);
  43. transition: all .3s ease-in-out;
  44. }
  45. .icon-active{
  46. transform: rotate(45deg);
  47. transition: all .3s ease-in-out;
  48. }
  49. .ant-center-icon::after{
  50. content: "";
  51. width: 120rpx;
  52. height: 12rpx;
  53. border-radius: 6rpx;
  54. background: #fff;
  55. position: absolute;
  56. top: 94rpx;
  57. left: 40rpx;
  58. }
  59. .ant-center-icon::before{
  60. content: "";
  61. width: 12rpx;
  62. height: 120rpx;
  63. border-radius: 6rpx;
  64. background: #fff;
  65. position: absolute;
  66. top: 40rpx;
  67. left: 94rpx;
  68. }
  69. }
  70. .ant-bottom-modal{
  71. content: "";
  72. top: 0;
  73. left: 0;
  74. position: absolute;
  75. z-index: 1;
  76. background: rgba(0, 0, 0, .6);
  77. filter: blur(5rpx);
  78. width: 100vw;
  79. height: 100vh;
  80. }
  81. .active{
  82. bottom: 0 !important;
  83. transition: all .3s ease-in-out;
  84. }
  85. .ant-bottom-card{
  86. position: fixed;
  87. z-index: 4;
  88. background: #FFF;
  89. border-radius: 24rpx 24rpx 0rpx 0rpx;
  90. box-shadow: 5rpx -10rpx 40rpx rgba(0, 0, 0, .2);
  91. width: calc(100vw - 400rpx);
  92. height: 428rpx;
  93. bottom: -540rpx;
  94. left: 0;
  95. padding: 70rpx 200rpx;
  96. transition: all .2s ease-in-out;
  97. .me-div{
  98. display: flex;
  99. margin-bottom: 40rpx;
  100. .me-icon{
  101. width: 120rpx;
  102. height: 120rpx;
  103. border-radius: 50%;
  104. border: 1rpx dashed #333;
  105. }
  106. .me-texts{
  107. width: 190rpx;
  108. padding: 20rpx;
  109. font-size: 26rpx;
  110. font-weight: 400;
  111. color: #8c979d;
  112. line-height: 37.6rpx;
  113. .me-title{
  114. font-size: 28rpx;
  115. color: #333;
  116. font-weight: bold;
  117. }
  118. }
  119. }
  120. .me-x{
  121. width: 44rpx;
  122. height: 44rpx;
  123. position: absolute;
  124. left: calc(50vw - 22rpx);
  125. bottom: 120rpx;
  126. transition: all .2s ease-in-out;
  127. &::after{
  128. content: "";
  129. width: 44rpx;
  130. height: 4rpx;
  131. border-radius: 2rpx;
  132. background: #888;
  133. position: absolute;
  134. top: 20rpx;
  135. left: 0rpx;
  136. }
  137. &::before{
  138. content: "";
  139. width: 4rpx;
  140. height: 44rpx;
  141. border-radius: 2rpx;
  142. background: #888;
  143. position: absolute;
  144. top: 0rpx;
  145. left: 20rpx;
  146. }
  147. }
  148. .me-icon-active{
  149. transform: rotate(45deg);
  150. transition: all .1s ease-in-out;
  151. }
  152. }
  153. </style>
  154. <script>
  155. export default {
  156. data() {
  157. return {
  158. show: false,
  159. }
  160. },
  161. onReachBottom() {
  162. console.log("reach bottom")
  163. },
  164. methods: {
  165. pushHouse(){
  166. uni.navigateTo({
  167. url: '/pages/pusher/housea'
  168. })
  169. },
  170. pushArticle(){
  171. uni.navigateTo({
  172. url: '/pages/pusher/article'
  173. })
  174. }
  175. }
  176. }
  177. </script>