home.vue 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="home">
  3. <view class="search-area">
  4. <u-search
  5. placeholder="搜索设备"
  6. v-model="keyword"
  7. shape="square"
  8. :clearabled="true"
  9. :show-action="true"
  10. action-text="搜索"
  11. :animation="true"
  12. search-icon-color="#000"
  13. color="#000"
  14. placeholder-color="#5c5b5b"
  15. @search="search"
  16. @custom="search"></u-search>
  17. </view>
  18. <view class="rule-area">
  19. 借用规则
  20. </view>
  21. <view class="borrow-area">
  22. 借用设备
  23. </view>
  24. <view class="scan-area">
  25. <view class="scan-code">
  26. <i class="iconfont icon-saoyisao"></i>
  27. <text>扫码设备</text>
  28. </view>
  29. <view class="scan-mine">
  30. <i class="iconfont icon-wode"></i>
  31. </view>
  32. </view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. keyword:""
  40. }
  41. },
  42. methods: {
  43. search(){
  44. uni.navigateTo({
  45. url:'/pages/search/search?keyword='+this.keyword,
  46. })
  47. }
  48. },
  49. onShow:function(){
  50. this.keyword = ""
  51. }
  52. }
  53. </script>
  54. <style lang="scss" scoped>
  55. .home{
  56. padding: 20rpx;
  57. display: flex;
  58. flex-direction: column;
  59. height: 100vh;
  60. box-sizing: border-box;
  61. }
  62. .search-area{
  63. margin-bottom: 20rpx ;
  64. flex-shrink: 0;
  65. position: relative;
  66. input{
  67. height: 76rpx;
  68. border: 2rpx solid #000;
  69. line-height: 76rpx;
  70. padding-left:80rpx ;
  71. }
  72. .iconfont{
  73. position: absolute;
  74. font-size: 40rpx;
  75. top: 20rpx;
  76. left: 16rpx;
  77. }
  78. }
  79. .rule-area{
  80. margin-bottom: 20rpx ;
  81. flex-shrink: 0;
  82. height: 270rpx;
  83. border: 2rpx solid #000;
  84. }
  85. .borrow-area{
  86. flex-shrink: 0;
  87. margin-bottom: 20rpx ;
  88. height: 120rpx;
  89. border: 2rpx solid #000;
  90. }
  91. .scan-area{
  92. flex-shrink: 1;
  93. height: 100%;
  94. position: relative;
  95. .scan-code{
  96. width: 280rpx;
  97. height: 280rpx;
  98. background-color: #000;
  99. color: $uni-text-color-inverse;
  100. border-radius: 50%;
  101. position: absolute;
  102. top: 50%;
  103. left: 50%;
  104. transform: translate(-50%,-50%);
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. text-align: center;
  109. flex-direction: column;
  110. font-size: 36rpx;
  111. .iconfont{
  112. font-size: 80rpx;
  113. margin: 20rpx 0;
  114. }
  115. }
  116. .scan-mine{
  117. width: 80rpx;
  118. height: 80rpx;
  119. color: rgba(80, 80, 80, 1);
  120. border-radius: 21px;
  121. // font-size: 14px;
  122. line-height: 150%;
  123. box-shadow: 0px 1px 1px 0px rgba(0, 0, 0, 0.5);
  124. display: flex;
  125. align-items: center;
  126. justify-content: center;
  127. text-align: center;
  128. flex-direction: column;
  129. font-size: 36rpx;
  130. position: absolute;
  131. bottom: 20rpx;
  132. left: 20rpx;
  133. }
  134. }
  135. </style>