searchResult.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. <template>
  2. <view>
  3. <u-navbar back-text="搜索结果" back-icon-size="28" back-icon-color="#ffffff"
  4. :background="{backgroundColor: '#2795FD',}" :back-text-style="{color: '#ffffff'}"></u-navbar>
  5. <!-- 搜索框 -->
  6. <view class="search">
  7. <view class="search-box">
  8. <view class="option">
  9. <nxsearch :selectList="selectList" button="inside" @search="doSearch" @confirm="doSearc"
  10. v-model="searchQuery.keyword" placeholder="输入关键字找工作" />
  11. </view>
  12. </view>
  13. </view>
  14. <!-- 搜索结果 -->
  15. <view class="result">
  16. <view class="tabs">
  17. <view class="left">
  18. <u-tabs bg-color="#F0F0F2" :list="tabList" :is-scroll="false" :current="current"
  19. @change="change"></u-tabs>
  20. </view>
  21. <view class="screen">
  22. <view class="icon">
  23. <img src="../../assets/img/riLine-filter-line@1x.png" alt="">
  24. </view>
  25. <view>筛选</view>
  26. </view>
  27. </view>
  28. <view class="result-content">
  29. <view class="item" v-for="item in 3">
  30. <view class="top">
  31. <view class="name">
  32. 地推日结
  33. </view>
  34. <view class="saraly">
  35. 200元/天
  36. </view>
  37. </view>
  38. <view class="middle">
  39. <view class="tag">
  40. <view class="tag-item">
  41. 个人
  42. </view>
  43. <view class="tag-item">
  44. 日结
  45. </view>
  46. </view>
  47. <view class="date">
  48. 2023-06-01
  49. </view>
  50. </view>
  51. <view class="bottom">
  52. <view class="issuer">
  53. 李先生
  54. </view>
  55. <view class="address">
  56. 江津东路151号锦佳宴
  57. </view>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </template>
  64. <script>
  65. import nxsearch from "../../components/nx-search.vue"
  66. export default {
  67. components: {
  68. nxsearch
  69. },
  70. data() {
  71. return {
  72. keyword: '',
  73. searchQuery: {
  74. keyword: '',
  75. selectIndex: 0
  76. },
  77. selectList: [{
  78. id: 1,
  79. name: '找工作'
  80. },
  81. {
  82. id: 2,
  83. name: '找公司'
  84. },
  85. ],
  86. tabList: [{
  87. name: '最新'
  88. }, {
  89. name: '日结'
  90. }, {
  91. name: '周结',
  92. }, {
  93. name: '月结'
  94. }],
  95. current: 0
  96. }
  97. },
  98. methods: {
  99. // 执行搜索
  100. doSearch(searchQuery) {
  101. console.log('searchQuery', searchQuery);
  102. },
  103. change(index) {
  104. this.current = index;
  105. }
  106. }
  107. }
  108. </script>
  109. <style lang="scss" scoped>
  110. page {
  111. background: #F0F0F2;
  112. padding-bottom: 50px;
  113. }
  114. .search {
  115. background-color: #fff;
  116. padding: 16rpx 32rpx;
  117. .search-box {
  118. border-radius: 50px;
  119. height: 72rpx;
  120. line-height: 72rpx;
  121. }
  122. }
  123. // 搜索结果
  124. .result{
  125. background-color: #fff;
  126. .tabs{
  127. padding-right:32rpx;
  128. display: flex;
  129. justify-content: space-between;
  130. align-items: center;
  131. border-bottom:1px solid #f1f1f1;
  132. .left{
  133. width: 70%;
  134. /deep/.u-tabs{
  135. background-color: #fff !important;
  136. }
  137. }
  138. .screen{
  139. display: flex;
  140. align-items: center;
  141. color: rgba(39, 149, 253, 1);
  142. font-size: 16px;
  143. img{
  144. width: 16px;
  145. height: 16px;
  146. vertical-align: middle;
  147. margin-right: 4rpx;
  148. }
  149. }
  150. }
  151. .result-content{
  152. .item{
  153. padding:24rpx 0 28rpx;
  154. margin: 0 32rpx;
  155. border-bottom:1px solid #f1f1f1;
  156. }
  157. .top{
  158. display: flex;
  159. justify-content: space-between;
  160. align-items: center;
  161. font-family: 'PingFangSC-medium';
  162. .name{
  163. color: rgba(16, 16, 16, 1);
  164. font-size: 36rpx;
  165. }
  166. .saraly{
  167. color: rgba(255, 61, 0, 1);
  168. font-size: 32rpx;
  169. }
  170. }
  171. .middle{
  172. display: flex;
  173. justify-content: space-between;
  174. align-items: center;
  175. margin-top: 12rpx;
  176. .tag{
  177. display: flex;
  178. .tag-item{
  179. width: 72rpx;
  180. height: 36rpx;
  181. line-height: 36rpx;
  182. border-radius: 4px;
  183. background-color: rgba(241, 241, 247, 1);
  184. color: rgba(129, 127, 153, 1);
  185. font-size: 24rpx;
  186. text-align: center;
  187. margin-right: 8rpx;
  188. }
  189. }
  190. .date{
  191. color: rgba(153, 153, 153, 1);
  192. font-size: 24rpx;
  193. }
  194. }
  195. .bottom{
  196. display: flex;
  197. justify-content: space-between;
  198. align-items: center;
  199. margin-top: 20rpx;
  200. .issuer{
  201. color: rgba(51, 51, 51, 1);
  202. font-size: 24rpx;
  203. }
  204. .address{
  205. color: rgba(119, 119, 119, 1);
  206. font-size: 24rpx;
  207. }
  208. }
  209. }
  210. }
  211. </style>