search.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292
  1. <template>
  2. <view style="display: flex;flex-direction: column;height: 100vh;">
  3. <!-- 自定义导航栏 -->
  4. <view class="custom-navbar" :style="{ paddingTop: (12 + statusBarHeight) + 'px' }">
  5. <view class="navbar-content">
  6. <view class="nav-left" @click="goBack">
  7. <u-icon name="arrow-leftward" color="#333" size="38"></u-icon>
  8. </view>
  9. <view class="nav-title">职位搜索</view>
  10. <view class="nav-right"></view>
  11. </view>
  12. </view>
  13. <!-- 搜索 -->
  14. <view class="search flex align-center justify-center">
  15. <view class="search-box">
  16. <u-search placeholder="搜索职位或公司" shape="round" searchIconSize=40 searchIconColor="rgba(153, 153, 153, 1)"
  17. bgColor="rgba(241, 241, 241, 1)" borderColor="rgba(227, 231, 236, 1)" @clear="clear"
  18. v-model="keyword" @custom="custom" @search="custom"></u-search>
  19. </view>
  20. </view>
  21. <view v-if="show" style="flex: 1;">
  22. <!-- 历史搜索 -->
  23. <view class="searchJl flex justify-center">
  24. <view class="searchJl-box">
  25. <view class="searchJl-box-header">
  26. <text class="searchJl-box-title">历史搜索</text>
  27. <image v-if="searchList.length > 0" src="../../static/images/shanchu22.svg"
  28. style="width: 32rpx; height: 32rpx;" mode="aspectFit" @click="clearHistory"></image>
  29. </view>
  30. <view class="searchJl-box-label flex align-center flex-wrap">
  31. <view class="searchJl-box-item" @click="goSearch(item.keyWord)"
  32. v-for="(item, index) in searchList" :key="index">
  33. {{ item.keyWord }}
  34. </view>
  35. <view class="no-more" v-if="searchList.length == 0">暂无记录</view>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 近期热招 -->
  40. <view class="hot-jobs-container flex justify-center">
  41. <view class="hot-jobs-section">
  42. <view class="section-header">
  43. <text class="section-title">近期热招</text>
  44. <!-- <image src="../../static/images/shanchu22.svg" style="width: 32rpx; height: 32rpx;" mode="aspectFit" @click="clearHotJobs"></image> -->
  45. </view>
  46. <view class="hot-jobs-grid">
  47. <view class="hot-job-item" v-for="(job, index) in hotJobsList" :key="index"
  48. @click="selectHotJob(job)">
  49. <text class="job-name">{{ job.ruleClassifyName }}</text>
  50. <view class="hot-tag" v-if="job.isHot">
  51. <text class="hot-tag-text">Hot</text>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. <block v-else>
  59. <!-- 筛选 -->
  60. <view class="screen flex justify-center align-center">
  61. <view class="screen-box">
  62. <view class="topbg-sx-box">
  63. <view class="topbg-sx-box-l flex align-center">
  64. <view class="topbg-sx-box-l-i" :class="currentSx == index ? 'active3' : ''"
  65. @click="currentSx = index" v-for="(item, index) in sxTypeList" :key="index">
  66. {{ item.name }}
  67. </view>
  68. </view>
  69. <view class="topbg-sx-box-r flex align-center">
  70. <view class="city-container" @click="selectCity">
  71. <text class="city-text"
  72. style="margin-right: 10rpx;">{{ county ? county : (city ? city : '选择城市') }}</text>
  73. <u-icon name="arrow-down" color="#999999" size="20"></u-icon>
  74. </view>
  75. <view v-if="currentSx == 0" class="sort-container" @click="showSortModal">
  76. <text class="sort-text"
  77. style="margin-right: 10rpx;">{{ sortOptions[selectedSort] }}</text>
  78. <u-icon name="arrow-down" color="rgba(1, 107, 246, 1)" size="20"></u-icon>
  79. </view>
  80. <view class="filter-container" :class="{ activeColor: filledFieldsCount }"
  81. @click="goNav('/package/screen/screen')">
  82. <text class="filter-text" style="margin-right: 10rpx;">筛选{{ filledFieldsCount }}</text>
  83. <u-icon name="arrow-down" :color="filledFieldsCount ? '#016bf6' : '#999999'"
  84. size="20"></u-icon>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 岗位推荐 -->
  91. <block v-if="currentSx == 0">
  92. <view class="gwList flex justify-center" v-if="dataList.length > 0">
  93. <view class="gwList-box">
  94. <scroll-view scroll-y="true" style="width: 100%;height: 100%;" refresher-enabled="true"
  95. :refresher-threshold="80" refresher-background="#fff" refresher-default-style="white"
  96. :refresher-triggered="isRefreshing" @refresherrefresh="handlePullDownRefresh"
  97. @refresherpulling="onPullingDown" @scrolltolower="loadMore"
  98. scroll-with-animation="true">
  99. <view class="gwList-box-item flex justify-center" @click="gotoInfo(item.postPushId)"
  100. v-for="(item, index) in dataList" :key="index">
  101. <view class="gwList-box-item-box">
  102. <!-- 标题-薪资 -->
  103. <view class="gwList-box-item-box-title flex justify-between align-center">
  104. <view class="title-left flex align-center">
  105. <view class="job-title-text"
  106. style="max-width: 450rpx;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;">
  107. <!-- <block v-if="isSameName(item.ruleClassifyName,item.stationName)">
  108. {{item.ruleClassifyName}}-
  109. </block> -->
  110. <block>
  111. {{ item.ruleClassifyName }}
  112. </block>
  113. </view>
  114. <view v-if="item.isDue" class="salary-text-box">
  115. <image src="../../static/images/index/jipinIcom.svg"
  116. class="jipin-icon" />
  117. <text class="jipin-text">急聘</text>
  118. </view>
  119. </view>
  120. <text class="salary-text">{{ item.salaryRange }}</text>
  121. </view>
  122. <!-- 公司名称-公司人数 -->
  123. <view class="gwList-box-item-box-name flex align-center">
  124. <text class="company-name"
  125. style="margin-right: 8rpx;">{{ item.company ? item.company.companyName : '' }}</text>
  126. <text class="company-people"
  127. v-if="item.company">{{ item.company ? item.company.companyPeople : '0人' }}</text>
  128. </view>
  129. <!-- 职位标签 -->
  130. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  131. <text class="job-tag">{{ item.education }}</text>
  132. <text class="job-tag">{{ item.experience }}</text>
  133. <text class="job-tag" v-for="(ite, ind) in item.positionWelfare"
  134. :key="ind">{{ ite }}</text>
  135. </view>
  136. <!-- <view class="gwList-box-item-box-line"></view> -->
  137. <!-- 公司简介-位置 -->
  138. <view class="gwList-box-item-box-info flex justify-between align-center">
  139. <view class="gwList-box-item-box-info-l flex align-center">
  140. <image
  141. :src="item.hr && item.hr.hrImg ? item.hr.hrImg : item.user && item.user.avatar ? item.user.avatar : '../../static/logo.png'"
  142. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  143. mode=""></image>
  144. <view class="company-info-text">
  145. {{ item.user && item.user.userName ? item.user.userName : '未知' }}·{{ item.hr && item.hr.hrPosition || '匿名职位' }}
  146. </view>
  147. <view v-if="item.respondTime" class="reply-time">{{ item.respondTime }}</view>
  148. </view>
  149. <view class="location-text">
  150. {{ item.county }}
  151. </view>
  152. </view>
  153. </view>
  154. </view>
  155. <nomore v-if="dataList.length > 0 && page >= totlo"></nomore>
  156. </scroll-view>
  157. </view>
  158. </view>
  159. <!-- 暂无数据 -->
  160. <view class="gwList" v-else>
  161. <empty />
  162. </view>
  163. </block>
  164. <!-- 公司 -->
  165. <block v-else>
  166. <view class="gwList flex justify-center" v-if="dataList.length > 0">
  167. <view class="gwList-box">
  168. <scroll-view scroll-y="true" style="width: 100%;height: 100%;" refresher-enabled="true"
  169. :refresher-threshold="80" refresher-background="#fff" refresher-default-style="white"
  170. :refresher-triggered="isRefreshing" @refresherrefresh="handlePullDownRefresh"
  171. @refresherpulling="onPullingDown" @scrolltolower="loadMore"
  172. scroll-with-animation="true">
  173. <view class="box" v-for="(item, index) in dataList" :key="'company' + index">
  174. <view class="gwList-box-item company"
  175. @click="goTo('/my/enterpriseInfo/enterpriseInfo?companyId=' + item.companyId)">
  176. <view class="gwList-box-item-box">
  177. <view class="gwList-box-item-box-title flex justify-between align-center">
  178. <u-avatar
  179. :src="item.companyLogo ? item.companyLogo : '../../static/images/index/jipinIcom.svg'"
  180. class="jipin-icon"></u-avatar>
  181. <view class="gwList-box-item-box-info-l">
  182. <view class="companyTitle">{{ item.companyName || item.companyAllName }}</view>
  183. <view class="company-info-text">
  184. {{ item.companyPeople }} · {{ item.companyScope }}
  185. </view>
  186. <view class="company-info-text">
  187. {{ item.workTime }} <text v-if="item.welfare.length > 0">·</text> <text
  188. v-for="(we, i) in item.welfare" :key="'welfare' + i">{{ we }} <text
  189. v-if="i < item.welfare.length - 1">·</text> </text>
  190. </view>
  191. </view>
  192. <view class="goRight">
  193. <u-icon name="arrow-right"></u-icon>
  194. </view>
  195. </view>
  196. </view>
  197. </view>
  198. <view class="gwList-box-item companyPost" v-for="(it, ind) in item.postPushList"
  199. :key="'post' + ind">
  200. <view class="gwList-box-item-box"
  201. @click="goTo('/pages/index/game/order?postPushId=' + it.postPushId)">
  202. <!-- 标题-薪资 -->
  203. <view class="gwList-box-item-box-info flex justify-between align-center">
  204. <view class="gwList-box-item-box-info-l">
  205. <view class="companyTitle">{{ it.ruleClassifyName }}</view>
  206. <view class="company-info-text tags">
  207. <u-tag borderColor="#fdfdfd" :text="it.experience" type="info"
  208. mode="light" size="mini"></u-tag>
  209. <u-tag borderColor="#fdfdfd" :text="it.education" type="info"
  210. mode="light" size="mini"></u-tag>
  211. <u-tag v-for="we in it.welfareTag && it.welfareTag.split(';') || []"
  212. borderColor="#fdfdfd" :text="we" type="info" mode="light"
  213. size="mini"></u-tag>
  214. <u-tag v-for="indus in it.industry && it.industry.split(',') || []"
  215. borderColor="#fdfdfd" :text="indus" type="info" mode="light"
  216. size="mini"></u-tag>
  217. </view>
  218. </view>
  219. <view class="location-text">
  220. {{ it.salaryRange }} · {{ item.salaryTimes || 12 }}薪
  221. </view>
  222. </view>
  223. </view>
  224. </view>
  225. <view v-if="item.postPushList.length > 3" class="gwList-box-item companyPost"
  226. @click="goTo('/my/enterpriseInfo/enterpriseInfo?companyId=' + item.companyId)">
  227. <view class="gwList-box-item-box">
  228. <!-- 标题-薪资 -->
  229. <view class="morePost">查看更多职位</view>
  230. </view>
  231. </view>
  232. </view>
  233. <nomore v-if="dataList.length > 0 && page >= totlo"></nomore>
  234. </scroll-view>
  235. </view>
  236. </view>
  237. <!-- 暂无数据 -->
  238. <view class="gwList" v-else>
  239. <empty />
  240. </view>
  241. </block>
  242. </block>
  243. <!-- 排序弹窗 -->
  244. <view class="sort-modal" v-if="showSortModalFlag" @click="hideSortModal">
  245. <view class="sort-modal-content" @click.stop>
  246. <!-- 拖拽条 -->
  247. <view class="sort-modal-handle"></view>
  248. <!-- 标题 -->
  249. <view class="sort-modal-title">排序</view>
  250. <!-- 排序选项 -->
  251. <view class="sort-options">
  252. <view class="sort-option" :class="selectedSort === index ? 'active' : ''" @click="selectSort(index)"
  253. v-for="(option, index) in sortOptions" :key="index">
  254. <view class="sort-option-icon">
  255. <view class="check-icon" v-if="selectedSort === index">✓</view>
  256. </view>
  257. <text class="sort-option-text">{{ option }}</text>
  258. </view>
  259. </view>
  260. </view>
  261. </view>
  262. <u-popup mode="top" ref="permission">
  263. <view class="popup-content">
  264. <view class="popup-text-permission">获取位置需要定位权限,用于推荐同城的求职岗位或牛人</view>
  265. </view>
  266. </u-popup>
  267. </view>
  268. </template>
  269. <script>
  270. import empty from '../../components/empty.vue'
  271. import nomore from '../../components/nomore.vue'
  272. export default {
  273. components: {
  274. empty,
  275. nomore
  276. },
  277. data() {
  278. return {
  279. statusBarHeight: 0, // 状态栏高度
  280. show: true,
  281. keyword: '',
  282. currentSx: 0,
  283. sxTypeList: [{
  284. id: 1,
  285. name: '职位',
  286. },
  287. {
  288. id: 2,
  289. name: '公司',
  290. }
  291. ],
  292. token: '',
  293. page: 1,
  294. limit: 10,
  295. totlo: 1,
  296. city: '',
  297. county: '', //区
  298. education: '', //学历
  299. salaryRange: '', //薪资
  300. experience: '', //经验
  301. companyPeople: '', //公司规模
  302. industry: '', //行业
  303. longitude: '',
  304. latitude: '',
  305. dataList: [],
  306. searchList: [],
  307. hotJobsList: [
  308. ],
  309. showSortModalFlag: false,
  310. selectedSort: 0,
  311. sortOptions: ['综合排序', '最新优先', '距离优先'],
  312. filter: '筛选',
  313. isRefreshing: false
  314. };
  315. },
  316. watch: {
  317. currentSx(newData, oldData) {
  318. this.page = 1
  319. this.dataList = []
  320. this.getUserList();
  321. },
  322. },
  323. onLoad() {
  324. // 获取状态栏高度
  325. let systemInfo = uni.getSystemInfoSync();
  326. this.statusBarHeight = systemInfo.statusBarHeight || 0;
  327. let that = this
  328. const condition = this.$queue.getFilterData()
  329. this.education = condition.education //学历
  330. this.experience = condition.experience //经验
  331. this.industry = condition.industry //行业
  332. this.salaryRange = condition.salaryRange //薪资
  333. this.companyPeople = condition.companyPeople //公司规模
  334. if (!this.city) {
  335. if (uni.getStorageSync('city')) {
  336. this.city = uni.getStorageSync('city')
  337. } else {
  338. this.city = ''
  339. }
  340. }
  341. uni.$on('filterCity', data => {
  342. console.log(data, '选择的市')
  343. that.city = data.city
  344. that.county = data.county
  345. this.page = 1
  346. that.getUserList();
  347. })
  348. this.token = uni.getStorageSync('token');
  349. this.getMyRecordList()
  350. this.getHotList()
  351. uni.$on('updateScreenFilterRecord', () => {
  352. const condition = this.$queue.getFilterData()
  353. this.education = condition.education //学历
  354. this.experience = condition.experience //经验
  355. this.industry = condition.industry //行业
  356. this.salaryRange = condition.salaryRange //薪资
  357. this.companyPeople = condition.companyPeople //公司规模
  358. this.page = 1
  359. that.getUserList();
  360. })
  361. },
  362. onUnload() {
  363. uni.$off('filterCity');
  364. uni.$off('updateScreenFilterRecord');
  365. },
  366. computed: {
  367. filledFieldsCount() {
  368. const fields = [this.education, this.experience, this.industry, this.salaryRange, this.companyPeople];
  369. const count = fields.filter(item => item).length;
  370. return count > 0 ? '·' + count : '';
  371. }
  372. },
  373. onPullDownRefresh() {
  374. this.page = 1
  375. this.getUserList();
  376. },
  377. onReachBottom() {
  378. if (this.page < this.totlo) {
  379. this.page += 1
  380. this.getUserList();
  381. }
  382. },
  383. methods: {
  384. // 下拉刷新
  385. handlePullDownRefresh() {
  386. this.isRefreshing = true;
  387. this.page = 1
  388. this.getUserList();
  389. },
  390. // 下拉中
  391. onPullingDown(e) {
  392. // 可以在这里处理下拉中的动画效果
  393. },
  394. // 加载更多
  395. loadMore() {
  396. if (this.page < this.totlo) {
  397. this.page += 1
  398. this.getUserList();
  399. }
  400. },
  401. // 删除历史记录
  402. clearHistory() {
  403. let that = this;
  404. uni.showModal({
  405. title: "提示",
  406. content: "确定删除吗?",
  407. confirmColor: "#016BF6",
  408. success: function (res) {
  409. if (res.cancel) return;
  410. that.$Request.post('/app/record/deleteRecord', { recordId: '' }).then(res => {
  411. if (res.code == 0) {
  412. that.searchList = []
  413. uni.showToast({
  414. title: '删除成功',
  415. icon: "none"
  416. })
  417. }
  418. })
  419. },
  420. });
  421. },
  422. async selectCity() {
  423. //获取经纬度后请求岗位接口,经纬度用于筛选距离
  424. var that = this
  425. // #ifdef APP
  426. const hasLocation = await this.$queue.checkPermission(
  427. 'location',
  428. '获取位置需要定位权限,用于推荐同城的求职岗位或牛人',
  429. this
  430. );
  431. if (!hasLocation) return that.goNav('/package/screen/city?city=' + that.city + '&county=' + that.county);
  432. // #endif
  433. uni.getLocation({
  434. type: 'wgs84', //wgs84 gcj02
  435. success: function (res) {
  436. console.log(res, '地理位置');
  437. that.latitude = res.latitude;
  438. that.longitude = res.longitude;
  439. // that.getUserList();
  440. that.goNav('/package/screen/city?city=' + that.city + '&county=' + that.county)
  441. },
  442. fail: function () {
  443. console.log('获取地址失败');
  444. that.goNav('/package/screen/city?city=' + that.city + '&county=' + that.county)
  445. }
  446. })
  447. },
  448. /**
  449. * 返回上一页
  450. */
  451. goBack() {
  452. uni.navigateBack()
  453. },
  454. //判断岗位名称与职位名称是否相同(不区分大小写)
  455. isSameName(className, name) {
  456. if (!className || !name)
  457. return;
  458. let str1 = className.trim();
  459. let str2 = name.trim();
  460. if (str1.length !== str2.length) {
  461. return true;
  462. }
  463. return str1.toLowerCase() !== str2.toLowerCase();
  464. },
  465. /**
  466. * @param {Object} postPushId
  467. * 岗位详情
  468. */
  469. gotoInfo(postPushId) {
  470. if (uni.getStorageSync('token')) {
  471. uni.navigateTo({
  472. url: '/pages/index/game/order?postPushId=' + postPushId
  473. })
  474. } else {
  475. this.noLogin()
  476. }
  477. },
  478. goTo(action) {
  479. if (uni.getStorageSync('token')) {
  480. uni.navigateTo({
  481. url: action,
  482. success(e) {
  483. console.log(e)
  484. }, fail(e) {
  485. console.log(e)
  486. }
  487. })
  488. } else {
  489. this.noLogin()
  490. }
  491. },
  492. //我的搜索关键词
  493. getMyRecordList() {
  494. this.$Request.get('/app/record/getMyRecordList', {
  495. userId: uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
  496. }).then(res => {
  497. if (res.code == 0) {
  498. this.searchList = res.data.records
  499. if (this.searchList.length > 0) {
  500. this.show = true
  501. } else {
  502. this.show = false
  503. this.custom()
  504. }
  505. }
  506. })
  507. },
  508. getHotList() {
  509. this.$Request.get('/app/postPush/getHotList', {
  510. userId: uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
  511. }).then(res => {
  512. if (res.code == 0) {
  513. this.hotJobsList = res.data
  514. }
  515. })
  516. },
  517. /**
  518. * 清空搜索内容
  519. */
  520. clear() {
  521. this.page = 1
  522. this.getUserList();
  523. },
  524. /**
  525. * @param {Object} keyword
  526. * 热词搜索
  527. */
  528. goSearch(keyword) {
  529. this.show = false
  530. this.keyword = keyword
  531. this.getUserList();
  532. },
  533. /**
  534. * @param {Object} e
  535. * 用户点击搜索时触发
  536. */
  537. custom(e) {
  538. this.show = false
  539. this.page = 1
  540. this.getUserList()
  541. },
  542. /**
  543. * 获取岗位列表
  544. */
  545. getUserList() {
  546. let data = {
  547. page: this.page,
  548. limit: this.limit,
  549. postType: '',
  550. ruleClassifyName: this.keyword, //岗位名称
  551. screen: this.selectedSort + 1, //1推荐 2最新
  552. county: this.county, //区
  553. city: this.city, //城市
  554. salaryRange: this.salaryRange, //薪资范围
  555. education: this.education, //学历
  556. experience: this.experience, //经验
  557. industry: this.industry, //行业
  558. companyPeople: this.companyPeople, //公司规模
  559. lng: this.longitude,
  560. lat: this.latitude,
  561. /* userId: uni.getStorageSync('userId') ? uni.getStorageSync('userId') : '' */
  562. }
  563. if (this.currentSx == 1)
  564. data.key = this.keyword
  565. let action = this.currentSx == 1 ? '/app/company/getCompanyPostPush' : '/app/postPush/userGetPostPushList'
  566. this.$Request.get(action, data).then(res => {
  567. this.isRefreshing = false
  568. if (res.code == 0) {
  569. if (this.currentSx == 0)
  570. res.data.records.map(item => {
  571. if (item.positionWelfare) {
  572. item.positionWelfare = item.positionWelfare.split(',')
  573. } else {
  574. item.positionWelfare = []
  575. }
  576. })
  577. else
  578. res.data.records.map(item => {
  579. if (item.welfare) {
  580. item.welfare = item.welfare.split(',')
  581. } else {
  582. item.welfare = []
  583. }
  584. })
  585. if (this.page == 1) {
  586. this.dataList = res.data.records
  587. } else {
  588. this.dataList = [...this.dataList, ...res.data.records]
  589. }
  590. this.totlo = res.data.pages
  591. }
  592. }).catch(() => {
  593. this.isRefreshing = false
  594. })
  595. },
  596. //跳转
  597. goNav(url) {
  598. if (uni.getStorageSync('token')) {
  599. uni.navigateTo({
  600. url: url
  601. })
  602. } else {
  603. this.noLogin()
  604. }
  605. },
  606. //未登录
  607. noLogin() {
  608. uni.showModal({
  609. title: '提示',
  610. content: '您还未登录,请先登录',
  611. confirmColor: '#016BF6',
  612. success: (res) => {
  613. if (res.confirm) {
  614. console.log('用户点击确定');
  615. this.$queue.toLogin('navigateTo')
  616. } else if (res.cancel) {
  617. console.log('用户点击取消');
  618. }
  619. }
  620. })
  621. },
  622. // 选择热门职位
  623. selectHotJob(job) {
  624. this.keyword = job.ruleClassifyName
  625. this.custom()
  626. },
  627. // 显示排序弹窗
  628. showSortModal() {
  629. this.showSortModalFlag = true
  630. },
  631. // 隐藏排序弹窗
  632. hideSortModal() {
  633. this.showSortModalFlag = false
  634. },
  635. // 选择排序选项
  636. selectSort(index) {
  637. this.selectedSort = index;
  638. this.hideSortModal()
  639. // 这里可以添加排序逻辑
  640. this.getUserList();
  641. },
  642. },
  643. }
  644. </script>
  645. <style lang="scss">
  646. // page {
  647. // background: #F2F2F7;
  648. // }
  649. .active3 {
  650. flex-direction: row;
  651. justify-content: center;
  652. align-items: center;
  653. padding: 12rpx;
  654. border-radius: 12rpx;
  655. background: #FFFFFF !important;
  656. margin-right: 12rpx;
  657. border: 0.5px solid rgba(1, 107, 246, 1);
  658. color: rgba(1, 107, 246, 1) !important;
  659. font-family: DM Sans;
  660. font-size: 22rpx;
  661. font-weight: 400;
  662. line-height: 20rpx;
  663. letter-spacing: 0px;
  664. text-align: left;
  665. }
  666. .custom-navbar {
  667. // position: fixed;
  668. // top: 0;
  669. // left: 0;
  670. // right: 0;
  671. width: 100%;
  672. // padding-top: 80rpx;
  673. // height: 88rpx;
  674. background-color: #ffffff;
  675. z-index: 10000;
  676. .navbar-content {
  677. display: flex;
  678. align-items: center;
  679. justify-content: space-between;
  680. height: 100%;
  681. padding: 0 32rpx;
  682. .nav-left,
  683. .nav-right {
  684. width: 60rpx;
  685. height: 60rpx;
  686. display: flex;
  687. align-items: center;
  688. justify-content: center;
  689. }
  690. .nav-title {
  691. color: rgba(51, 51, 51, 1);
  692. font-family: DM Sans;
  693. font-size: 30rpx;
  694. font-weight: 700;
  695. line-height: 26px;
  696. letter-spacing: 0px;
  697. text-align: center;
  698. }
  699. }
  700. }
  701. .search {
  702. width: 100%;
  703. padding-top: 20rpx;
  704. height: 88rpx;
  705. background-color: #ffffff;
  706. // position: fixed;
  707. // top: 88rpx;
  708. // z-index: 9999;
  709. .search-box {
  710. width: 686rpx;
  711. height: 60rpx;
  712. }
  713. /deep/ .u-action {
  714. color: rgba(1, 107, 246, 1);
  715. font-family: DM Sans;
  716. font-size: 24rpx;
  717. font-weight: 500;
  718. line-height: 48rpx;
  719. letter-spacing: 0px;
  720. text-align: center;
  721. }
  722. }
  723. .screen {
  724. width: 100%;
  725. height: 160rpx;
  726. background-color: #ffffff;
  727. // position: fixed;
  728. // top: 200rpx;
  729. // z-index: 9999;
  730. .screen-box {
  731. padding-top: 20rpx;
  732. width: 686rpx;
  733. height: 160rpx;
  734. .topbg-sx-box {
  735. width: 686rpx;
  736. height: 25rpx;
  737. margin-top: 30rpx;
  738. .topbg-sx-box-l-i {
  739. flex-direction: row;
  740. justify-content: center;
  741. align-items: center;
  742. padding: 12rpx;
  743. border-radius: 12rpx;
  744. background: rgba(153, 153, 153, 0.1);
  745. margin-right: 12rpx;
  746. color: rgba(102, 102, 102, 1);
  747. font-family: DM Sans;
  748. font-size: 22rpx;
  749. font-weight: 400;
  750. line-height: 20rpx;
  751. letter-spacing: 0px;
  752. text-align: left;
  753. margin-bottom: 20rpx;
  754. }
  755. }
  756. }
  757. }
  758. // 筛选栏右侧容器样式
  759. .city-container {
  760. color: rgba(153, 153, 153, 1);
  761. font-family: DM Sans;
  762. font-size: 22rpx;
  763. font-weight: 400;
  764. line-height: 20rpx;
  765. letter-spacing: 0px;
  766. text-align: left;
  767. margin-right: 10rpx;
  768. padding: 8rpx 12rpx;
  769. border-radius: 12rpx;
  770. background: rgba(198, 198, 198, 0.1);
  771. }
  772. .sort-container {
  773. color: rgba(1, 107, 246, 1);
  774. font-family: DM Sans;
  775. font-size: 22rpx;
  776. font-weight: 400;
  777. line-height: 20rpx;
  778. letter-spacing: 0px;
  779. text-align: left;
  780. margin-right: 10rpx;
  781. padding: 8rpx 12rpx;
  782. border-radius: 12rpx;
  783. border: 0.5px solid rgba(1, 107, 246, 1);
  784. }
  785. .filter-container {
  786. color: rgba(153, 153, 153, 1);
  787. font-family: DM Sans;
  788. font-size: 22rpx;
  789. font-weight: 400;
  790. line-height: 20rpx;
  791. letter-spacing: 0px;
  792. text-align: left;
  793. margin-right: 10rpx;
  794. padding: 8rpx 12rpx;
  795. border-radius: 12rpx;
  796. background: rgba(198, 198, 198, 0.1);
  797. border: 1rpx solid rgba(198, 198, 198, 0.1);
  798. }
  799. .activeColor {
  800. color: #016bf6;
  801. border: 1rpx solid #016bf6;
  802. background: #fff;
  803. }
  804. .searchJl {
  805. width: 100%;
  806. background-color: #ffffff;
  807. // position: fixed;
  808. // top: 200rpx;
  809. // height: calc(100vh - 80rpx);
  810. margin-bottom: 40rpx;
  811. .searchJl-box {
  812. width: 686rpx;
  813. height: 100%;
  814. padding-top: 28rpx;
  815. .searchJl-box-header {
  816. display: flex;
  817. align-items: center;
  818. justify-content: space-between;
  819. // margin-bottom: 15rpx;
  820. }
  821. .searchJl-box-title {
  822. color: rgba(34, 37, 42, 1);
  823. font-family: DM Sans;
  824. font-size: 26rpx;
  825. font-weight: 400;
  826. line-height: 48rpx;
  827. letter-spacing: 0px;
  828. text-align: left;
  829. }
  830. .searchJl-box-label {
  831. width: 100%;
  832. gap: 8rpx;
  833. .searchJl-box-item {
  834. padding: 12rpx;
  835. border-radius: 8rpx;
  836. background: rgba(153, 153, 153, 0.1);
  837. color: rgba(102, 102, 102, 1);
  838. font-family: DM Sans;
  839. font-size: 20rpx;
  840. font-weight: 400;
  841. line-height: 20rpx;
  842. letter-spacing: 0px;
  843. text-align: left;
  844. margin-top: 20rpx;
  845. }
  846. .no-more {
  847. line-height: 20rpx;
  848. padding: 12rpx;
  849. font-family: DM Sans;
  850. font-size: 20rpx;
  851. font-weight: 400;
  852. }
  853. }
  854. }
  855. }
  856. // 近期热招容器样式
  857. .hot-jobs-container {
  858. width: 100%;
  859. background-color: #ffffff;
  860. // position: fixed;
  861. // top: 420rpx;
  862. // height: calc(100vh - 400rpx);
  863. // z-index: 9999;
  864. .hot-jobs-section {
  865. width: 686rpx;
  866. // padding-top: 28rpx;
  867. }
  868. }
  869. // 近期热招样式
  870. .hot-jobs-section {
  871. // margin-bottom: 32rpx;
  872. .section-header {
  873. display: flex;
  874. align-items: center;
  875. justify-content: space-between;
  876. margin-bottom: 20rpx;
  877. .section-title {
  878. color: rgba(34, 37, 42, 1);
  879. font-family: DM Sans;
  880. font-size: 26rpx;
  881. font-weight: 400;
  882. line-height: 48rpx;
  883. letter-spacing: 0px;
  884. text-align: left;
  885. }
  886. }
  887. }
  888. .hot-jobs-grid {
  889. display: flex;
  890. flex-wrap: wrap;
  891. gap: 8rpx;
  892. .hot-job-item {
  893. width: calc(50% - 4rpx);
  894. padding: 8rpx;
  895. background: #ffffff;
  896. border-radius: 12rpx;
  897. position: relative;
  898. .job-name {
  899. color: rgba(102, 102, 102, 1);
  900. font-family: DM Sans;
  901. font-size: 20rpx;
  902. font-weight: 400;
  903. line-height: 44rpx;
  904. letter-spacing: 0px;
  905. text-align: left;
  906. }
  907. .hot-tag {
  908. position: absolute;
  909. top: 8rpx;
  910. right: 10rpx;
  911. border-radius: 12rpx;
  912. background: rgba(237, 66, 69, 1);
  913. padding: 4rpx 12rpx;
  914. .hot-tag-text {
  915. color: rgba(255, 255, 255, 1);
  916. font-family: DM Sans;
  917. font-size: 16rpx;
  918. font-weight: 400;
  919. text-align: center;
  920. }
  921. }
  922. }
  923. }
  924. // 排序弹窗样式
  925. .sort-modal {
  926. position: fixed;
  927. top: 0;
  928. left: 0;
  929. right: 0;
  930. bottom: 0;
  931. background: rgba(0, 0, 0, 0.5);
  932. z-index: 10001;
  933. display: flex;
  934. align-items: flex-end;
  935. .sort-modal-content {
  936. width: 100%;
  937. background: #ffffff;
  938. border-radius: 24rpx 24rpx 0 0;
  939. padding: 20rpx 40rpx 40rpx 40rpx;
  940. max-height: 60vh;
  941. .sort-modal-handle {
  942. width: 80rpx;
  943. height: 8rpx;
  944. background: #E5E5E5;
  945. border-radius: 4rpx;
  946. margin: 0 auto 30rpx auto;
  947. }
  948. .sort-modal-title {
  949. font-size: 32rpx;
  950. font-weight: 600;
  951. color: #333333;
  952. text-align: center;
  953. padding-bottom: 30rpx;
  954. margin-bottom: 30rpx;
  955. border-bottom: 1px solid rgba(153, 153, 153, 0.25);
  956. }
  957. .sort-options {
  958. .sort-option {
  959. display: flex;
  960. align-items: center;
  961. padding: 24rpx 32rpx;
  962. margin-bottom: 16rpx;
  963. // background: #F8F8F8;
  964. border-radius: 42rpx;
  965. border: 2rpx solid rgba(227, 231, 236, 1);
  966. &.active {
  967. background: #F0F8FF;
  968. border-color: #007AFF;
  969. .sort-option-icon {
  970. background: #007AFF;
  971. border-color: #007AFF;
  972. .check-icon {
  973. color: #ffffff;
  974. }
  975. }
  976. .sort-option-text {
  977. color: #007AFF;
  978. font-weight: 500;
  979. }
  980. }
  981. .sort-option-icon {
  982. width: 40rpx;
  983. height: 40rpx;
  984. border-radius: 50%;
  985. border: 2rpx solid #E5E5E5;
  986. background: #ffffff;
  987. display: flex;
  988. align-items: center;
  989. justify-content: center;
  990. margin-right: 24rpx;
  991. .check-icon {
  992. font-size: 24rpx;
  993. color: #ffffff;
  994. font-weight: bold;
  995. }
  996. }
  997. .sort-option-text {
  998. font-size: 28rpx;
  999. color: #333333;
  1000. flex: 1;
  1001. }
  1002. }
  1003. }
  1004. }
  1005. }
  1006. .title-left {
  1007. display: flex;
  1008. align-items: center;
  1009. gap: 8rpx;
  1010. }
  1011. .job-title-text {
  1012. color: rgba(23, 23, 37, 1);
  1013. font-family: DM Sans;
  1014. font-size: 38rpx;
  1015. font-weight: 700;
  1016. line-height: 48rpx;
  1017. letter-spacing: 0.5%;
  1018. text-align: left;
  1019. }
  1020. .salary-text-box {
  1021. border-radius: 24rpx;
  1022. background: #FEE2E3;
  1023. display: flex;
  1024. justify-content: flex-start;
  1025. align-items: center;
  1026. padding: 6rpx 24rpx;
  1027. .jipin-icon {
  1028. width: 20rpx;
  1029. height: 20rpx;
  1030. margin-right: 4rpx;
  1031. }
  1032. .jipin-text {
  1033. color: rgba(237, 66, 69, 1);
  1034. font-family: DM Sans;
  1035. font-size: 18rpx;
  1036. font-weight: 400;
  1037. line-height: 20px;
  1038. letter-spacing: 0.5%;
  1039. text-align: left;
  1040. }
  1041. }
  1042. .salary-text {
  1043. color: rgba(1, 107, 246, 1);
  1044. font-family: DM Sans;
  1045. font-size: 28rpx;
  1046. font-weight: 700;
  1047. line-height: 40rpx;
  1048. letter-spacing: 0.5%;
  1049. text-align: right;
  1050. }
  1051. .company-name,
  1052. .company-people {
  1053. color: rgba(156, 164, 171, 1);
  1054. font-family: DM Sans;
  1055. font-size: 24rpx;
  1056. font-weight: 400;
  1057. line-height: 40rpx;
  1058. letter-spacing: 0.5%;
  1059. text-align: left;
  1060. }
  1061. .job-tag {
  1062. height: 42rpx;
  1063. display: flex;
  1064. flex-direction: row;
  1065. justify-content: center;
  1066. align-items: center;
  1067. padding: 8rpx;
  1068. border-radius: 8rpx;
  1069. background: rgba(198, 198, 198, 0.1);
  1070. margin-right: 16rpx;
  1071. margin-bottom: 16rpx;
  1072. color: rgba(153, 153, 153, 1);
  1073. font-size: 24rpx;
  1074. }
  1075. .company-info-text,
  1076. .location-text {
  1077. color: rgba(156, 164, 171, 1);
  1078. font-family: DM Sans;
  1079. font-size: 20rpx;
  1080. font-weight: 400;
  1081. line-height: 40rpx;
  1082. letter-spacing: 0.5%;
  1083. text-align: left;
  1084. white-space: nowrap;
  1085. overflow: hidden;
  1086. text-overflow: ellipsis;
  1087. }
  1088. .reply-time {
  1089. display: flex;
  1090. flex-direction: row;
  1091. justify-content: center;
  1092. align-items: center;
  1093. padding: 8rpx;
  1094. font-family: DM Sans;
  1095. font-size: 20rpx;
  1096. font-weight: 400;
  1097. line-height: 40rpx;
  1098. letter-spacing: 0.5%;
  1099. text-align: left;
  1100. border-radius: 12rpx;
  1101. background: #ECE1FD;
  1102. color: #8858C5;
  1103. margin-left: 10rpx
  1104. }
  1105. .gwList {
  1106. width: 100%;
  1107. margin-top: 40rpx;
  1108. flex: 1;
  1109. overflow: auto;
  1110. .gwList-box {
  1111. width: 710rpx;
  1112. height: 100%;
  1113. .box {
  1114. margin-bottom: 25rpx;
  1115. }
  1116. .gwList-box-item {
  1117. width: 100%;
  1118. // height: 329rpx;
  1119. background-color: #ffffff;
  1120. border-radius: 12rpx;
  1121. margin-bottom: 20rpx;
  1122. padding: 36rpx;
  1123. background: rgba(253, 253, 253, 1);
  1124. border: 0.5px solid rgba(227, 231, 236, 1);
  1125. }
  1126. .company {
  1127. padding: 20rpx;
  1128. background: #fff;
  1129. margin-bottom: 0rpx;
  1130. .gwList-box-item-box-info-l {
  1131. width: 80%;
  1132. margin-left: 20rpx;
  1133. margin-right: 20rpx;
  1134. }
  1135. }
  1136. .companyPost {
  1137. padding: 20rpx;
  1138. margin-top: 8rpx;
  1139. margin-bottom: 0rpx;
  1140. .location-text {
  1141. font-size: 26rpx;
  1142. font-weight: 500;
  1143. color: #007AFF;
  1144. align-self: flex-start;
  1145. }
  1146. .companyTitle {
  1147. font-size: 32rpx;
  1148. font-weight: 500;
  1149. color: #111
  1150. }
  1151. .morePost {
  1152. color: #007AFF;
  1153. font-size: 20rpx;
  1154. text-align: center;
  1155. }
  1156. }
  1157. .gwList-box-item-box {
  1158. width: 100%;
  1159. height: 100%;
  1160. .gwList-box-item-box-title {}
  1161. .gwList-box-item-box-label {
  1162. margin-top: 14rpx;
  1163. }
  1164. .gwList-box-item-box-name {
  1165. margin-top: 14rpx;
  1166. color: #999999;
  1167. font-size: 28rpx;
  1168. font-weight: 500;
  1169. }
  1170. .gwList-box-item-box-line {
  1171. width: 100%;
  1172. border: 1rpx solid #E6E6E6;
  1173. margin-top: 30rpx;
  1174. margin-bottom: 20rpx;
  1175. }
  1176. .gwList-box-item-box-info {
  1177. font-size: 26rpx;
  1178. .gwList-box-item-box-info-l {
  1179. color: #1A1A1A;
  1180. .tags {
  1181. gap: 10rpx;
  1182. display: flex;
  1183. margin-top: 10rpx;
  1184. flex-flow: row wrap;
  1185. }
  1186. }
  1187. .gwList-box-item-box-info-r {
  1188. color: #999999;
  1189. max-width: 300rpx;
  1190. }
  1191. }
  1192. }
  1193. }
  1194. }
  1195. </style>