searchResult.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  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>
  110. page {
  111. background: #F0F0F2;
  112. padding-bottom: 50px;
  113. }
  114. </style>
  115. <style lang="scss" scoped>
  116. .search {
  117. background-color: #fff;
  118. padding: 16rpx 32rpx;
  119. .search-box {
  120. border-radius: 50px;
  121. height: 72rpx;
  122. line-height: 72rpx;
  123. }
  124. }
  125. // 搜索结果
  126. .result{
  127. background-color: #fff;
  128. .tabs{
  129. padding-right:32rpx;
  130. display: flex;
  131. justify-content: space-between;
  132. align-items: center;
  133. border-bottom:1px solid #f1f1f1;
  134. .left{
  135. width: 70%;
  136. /deep/.u-tabs{
  137. background-color: #fff !important;
  138. }
  139. }
  140. .screen{
  141. display: flex;
  142. align-items: center;
  143. color: rgba(39, 149, 253, 1);
  144. font-size: 16px;
  145. img{
  146. width: 16px;
  147. height: 16px;
  148. vertical-align: middle;
  149. margin-right: 4rpx;
  150. }
  151. }
  152. }
  153. .result-content{
  154. .item{
  155. padding:24rpx 0 28rpx;
  156. margin: 0 32rpx;
  157. border-bottom:1px solid #f1f1f1;
  158. }
  159. .top{
  160. display: flex;
  161. justify-content: space-between;
  162. align-items: center;
  163. font-family: 'PingFangSC-medium';
  164. .name{
  165. color: rgba(16, 16, 16, 1);
  166. font-size: 36rpx;
  167. }
  168. .saraly{
  169. color: rgba(255, 61, 0, 1);
  170. font-size: 32rpx;
  171. }
  172. }
  173. .middle{
  174. display: flex;
  175. justify-content: space-between;
  176. align-items: center;
  177. margin-top: 12rpx;
  178. .tag{
  179. display: flex;
  180. .tag-item{
  181. width: 72rpx;
  182. height: 36rpx;
  183. line-height: 36rpx;
  184. border-radius: 4px;
  185. background-color: rgba(241, 241, 247, 1);
  186. color: rgba(129, 127, 153, 1);
  187. font-size: 24rpx;
  188. text-align: center;
  189. margin-right: 8rpx;
  190. }
  191. }
  192. .date{
  193. color: rgba(153, 153, 153, 1);
  194. font-size: 24rpx;
  195. }
  196. }
  197. .bottom{
  198. display: flex;
  199. justify-content: space-between;
  200. align-items: center;
  201. margin-top: 20rpx;
  202. .issuer{
  203. color: rgba(51, 51, 51, 1);
  204. font-size: 24rpx;
  205. }
  206. .address{
  207. color: rgba(119, 119, 119, 1);
  208. font-size: 24rpx;
  209. }
  210. }
  211. }
  212. }
  213. </style>