search.vue 31 KB

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