index.vue 49 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831
  1. <template>
  2. <view>
  3. <block v-if="XCXIsSelect!='是'">
  4. <view class="banner flex justify-center">
  5. <view class="banner-box">
  6. <swiper :indicator-dots="false" style="width: 100%;height: 100%;" :autoplay="true" :interval="300"
  7. :duration="1000">
  8. <swiper-item v-for="(item,index) in bannerList" :key="index" @click="goNave(item.url)">
  9. <view class="swiper-item" style="width: 100%;height: 100%;">
  10. <image :src="item.imageUrl" style="width: 100%;height: 100%;border-radius: 24rpx;"
  11. mode="scaleToFill"></image>
  12. </view>
  13. </swiper-item>
  14. </swiper>
  15. </view>
  16. </view>
  17. <view class="" style="width: 100%;margin-top: 20rpx;" v-for="(item,index) in dataList" :key="index">
  18. <view class=""
  19. style="padding: 20rpx 20rpx;width: 686rpx;background-color: #ffffff;border-radius: 18rpx;margin: auto;">
  20. <view class="">
  21. <text>{{item.company?item.company.companyName:''}}</text>信息简介
  22. </view>
  23. <view class="flex flex-wrap" style="margin-top: 20rpx;">
  24. <text
  25. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;"
  26. v-for="(ite,ind) in item.positionWelfare" :key="ind">{{ite}}</text>
  27. </view>
  28. <view class="" style="margin-top: 20rpx;">
  29. <text>{{item.company?item.company.companyName:''}}提供数据支持</text>
  30. </view>
  31. </view>
  32. </view>
  33. </block>
  34. <block v-else>
  35. <!-- 用户端 -->
  36. <block v-if="userType==1">
  37. <view class="topbg">
  38. <!-- #ifdef H5 -->
  39. <view class="banner flex justify-center" style="padding-top: 20rpx;"
  40. v-if="bannerListuser.length!=0">
  41. <!-- #endif -->
  42. <!-- #ifndef H5 -->
  43. <view class="banner flex justify-center" v-if="bannerListuser.length!=0">
  44. <!-- #endif -->
  45. <view class="banner-box">
  46. <swiper :indicator-dots="false" style="width: 100%;height: 100%;" :autoplay="true"
  47. :interval="5000" :duration="300">
  48. <swiper-item v-for="(item,index) in bannerListuser" :key="index"
  49. @click="goNave(item.url)">
  50. <view class="swiper-item" style="width: 100%;height: 100%;">
  51. <image :src="item.imageUrl"
  52. style="width: 100%;height: 100%;border-radius: 24rpx;"
  53. mode="scaleToFill">
  54. </image>
  55. </view>
  56. </swiper-item>
  57. </swiper>
  58. </view>
  59. </view>
  60. <view class="announcement" v-if="gongao.length!=0">
  61. <view class="announcementbox">
  62. <view class="anount">最新公告</view>
  63. <view class="anounts flex align-center" v-if="gongao.length>0">
  64. <view class="" style="width: 100%;">
  65. <u-notice-bar color="#333" bg-color="#e5fff2" padding="0rpx 24rpx 4rpx 24rpx"
  66. :volume-icon="false" style="height: 100%;" mode="vertical"
  67. :list="gongao"></u-notice-bar>
  68. </view>
  69. </view>
  70. <view class="anounts flex align-center" style="padding-left: 30rpx;" v-else>
  71. 暂无公告
  72. </view>
  73. </view>
  74. </view>
  75. <view v-if="gridlist.length!=0">
  76. <u-grid :col="4" :border="false">
  77. <u-grid-item bg-color="#00DD9A">
  78. <view v-for="(item,index) in gridlist" :key="index" style="text-align: center;"
  79. @click="goNave(item.url)">
  80. <image :src="item.imageUrl"
  81. style="width:80rpx;height: 80rpx;border-radius: 50%;">
  82. </image>
  83. <view style="color: #FFFFFF;">{{item.name}}</view>
  84. </view>
  85. </u-grid-item>
  86. </u-grid>
  87. </view>
  88. </view>
  89. <view style="background: #00DD9A;width: 100%;position: sticky;top: 0px;z-index: 999;">
  90. <view class="topbg-type flex justify-center">
  91. <view class="topbg-type-box flex justify-between align-center">
  92. <view class="topbg-type-box-l flex align-center">
  93. <view class="topbg-type-box-l-i" :class="current==index?'active':''"
  94. @tap="current = index" v-for="(item,index) in typeList" :key="index">
  95. {{item.label}}
  96. </view>
  97. </view>
  98. <view class="topbg-type-box-r flex align-center"
  99. @click="goNavs('/package/search/search')">
  100. <u-icon name="search" color="#ffffff" size="40"></u-icon>
  101. 搜索
  102. </view>
  103. </view>
  104. </view>
  105. <!-- 求职意向 -->
  106. <view class="topbg-yx flex justify-center flex-wrap">
  107. <view v-if="current != typeList.length - 1"
  108. class="topbg-yx-box flex justify-between align-center">
  109. <view class="topbg-yx-box-l ">
  110. <scroll-view scroll-x="true" class="topbg-scroll"
  111. :scroll-into-view="'bottomView'+currentjob" scroll-with-animation="true">
  112. <view class="topbg-yx-box-l-i" :id="'bottomView'+index"
  113. :class="currentjob==index?'active2':''" @click="currentjob=index"
  114. v-for="(item,index) in jobTypeList" :key="index">
  115. <view class="topbg-yx-box-l-i-c">
  116. <view class="topbg-yx-box-l-i-text">{{item.name}}</view>
  117. <view v-if="currentjob==index" class="topbg-yx-box-l-i-line"></view>
  118. </view>
  119. </view>
  120. </scroll-view>
  121. </view>
  122. <view class="topbg-yx-box-r flex align-center"
  123. @click="goNav('/package/jobIntention/jobIntention')">
  124. <text>添加求职意向</text>
  125. <u-icon name="plus-circle" color="#00B88F" size="38"></u-icon>
  126. </view>
  127. </view>
  128. <!-- 筛选 -->
  129. <view class="topbg-sx-box flex justify-between align-center" style="padding-bottom: 20rpx;">
  130. <view v-if="current != typeList.length - 1" class="topbg-sx-box-l flex align-center">
  131. <view class="topbg-sx-box-l-i" :class="currentSx==index?'active3':''"
  132. @click="currentSx = index" v-for="(item,index) in sxTypeList" :key="index">
  133. {{item.name}}
  134. </view>
  135. </view>
  136. <view class="" v-else>
  137. </view>
  138. <view class="topbg-sx-box-r flex align-center">
  139. <text style="color: #00B78F;font-size: 28rpx;font-weight: 500;margin-right: 10rpx;"
  140. @click="goNavs('/package/jobIntention/city')">{{city?city:'选择城市'}}</text>
  141. <u-icon name="arrow-down-fill" color="#00B78F" size="20"
  142. @click="goNavs('/package/jobIntention/city')"></u-icon>
  143. <text style="color: #CCCCCC;margin-left: 30rpx;margin-right: 30rpx;">|</text>
  144. <block v-if="current != typeList.length - 1">
  145. <text
  146. style="color: #999999;font-size: 28rpx;font-weight: 500;margin-right: 10rpx;"
  147. @click="goNavs('/package/screen/screen')">筛选</text>
  148. <u-icon name="arrow-down-fill" color="#CCCCCC" size="20"
  149. @click="goNavs('/package/screen/screen')"></u-icon>
  150. </block>
  151. <block v-else>
  152. <text
  153. style="color: #999999;font-size: 28rpx;font-weight: 500;margin-right: 10rpx;"
  154. @click="goNavs('/package/screen/screenComp')">筛选</text>
  155. <u-icon name="arrow-down-fill" color="#CCCCCC" size="20"
  156. @click="goNavs('/package/screen/screenComp')"></u-icon>
  157. </block>
  158. </view>
  159. </view>
  160. </view>
  161. <!-- <view
  162. style="width: 100%;height: 40rpx;background: #F2F2F7;border-radius: 40rpx 40rpx 0 0;margin-top: 20rpx;"
  163. v-if="current == typeList.length - 1 && companList.length>0"></view> -->
  164. </view>
  165. <!-- 岗位推荐 -->
  166. <block v-if="current != typeList.length - 1">
  167. <view class="gwList flex justify-center" v-if="dataList.length>0">
  168. <view class="gwList-box">
  169. <scroll-view scroll-y="true" style="width: 100%;height: 100%;">
  170. <view class="gwList-box-item flex justify-center" @click="gotoInfo(item.postPushId)"
  171. v-for="(item,index) in dataList" :key="index">
  172. <view class="gwList-box-item-box">
  173. <view class="gwList-box-item-box-title flex justify-between align-center">
  174. <view class=""
  175. style="max-width: 450rpx;overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;">
  176. <block v-if="isSameName(item.ruleClassifyName,item.stationName)">
  177. {{item.ruleClassifyName}}-
  178. </block>
  179. <block>
  180. {{item.stationName}}
  181. </block>
  182. </view>
  183. <text>{{item.salaryRange}}</text>
  184. </view>
  185. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  186. <text
  187. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;">
  188. {{item.education}}
  189. </text>
  190. <text
  191. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;">
  192. {{item.experience}}
  193. </text>
  194. <text
  195. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;"
  196. v-for="(ite,ind) in item.positionWelfare" :key="ind">{{ite}}</text>
  197. </view>
  198. <view class="gwList-box-item-box-name flex justify-between align-center">
  199. <text
  200. style="width: 450rpx;">{{item.company?item.company.companyName:''}}</text>
  201. <text
  202. v-if="item.company">{{item.company?item.company.companyPeople:'0人'}}</text>
  203. </view>
  204. <view class="gwList-box-item-box-line"></view>
  205. <view class="gwList-box-item-box-info flex justify-between align-center">
  206. <view class="gwList-box-item-box-info-l flex align-center">
  207. <image
  208. :src="item.company?item.company.companyLogo:'../../static/logo.png'"
  209. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  210. mode=""></image>
  211. <view class="people" v-if="item.company">
  212. {{item.company.companyLegalPerson?item.company.companyLegalPerson:'未知'}}
  213. </view>·创始人
  214. </view>
  215. <view class="gwList-box-item-box-info-r">
  216. {{item.distance}} {{item.county}} {{item.address}}
  217. </view>
  218. </view>
  219. </view>
  220. </view>
  221. </scroll-view>
  222. </view>
  223. </view>
  224. <!-- 暂无数据 -->
  225. <view class="gwList" v-else>
  226. <empty />
  227. </view>
  228. </block>
  229. <view class="companyListBox" v-if="current == typeList.length - 1 && companList.length>0">
  230. <companyListIndex @goInfo="goInfo" :item="item" v-for="(item,index) in companList"
  231. :key="index" />
  232. </view>
  233. <view class="gwList" v-if="current == typeList.length - 1 && companList.length==0">
  234. <empty />
  235. </view>
  236. </block>
  237. <!-- 企业版 -->
  238. <block v-else>
  239. <!-- banner -->
  240. <view class="banner flex justify-center">
  241. <view class="banner-box">
  242. <swiper :indicator-dots="false" style="width: 100%;height: 100%;" :autoplay="true"
  243. :interval="5000" :duration="300">
  244. <swiper-item v-for="(item,index) in bannerList" :key="index">
  245. <view class="swiper-item" style="width: 100%;height: 100%;">
  246. <image :src="item.imageUrl" style="width: 100%;height: 100%;border-radius: 24rpx;"
  247. mode="scaleToFill"></image>
  248. </view>
  249. </swiper-item>
  250. </swiper>
  251. </view>
  252. </view>
  253. <view class="announcement" v-if="gongao.length!=0">
  254. <view class="announcementbox">
  255. <view class="anount">最新公告</view>
  256. <view class="anounts flex align-center" v-if="gongao.length>0">
  257. <view class="" style="width: 100%;">
  258. <u-notice-bar color="#333" bg-color="#e5fff2" padding="0rpx 24rpx 4rpx 24rpx"
  259. :volume-icon="false" style="height: 100%;" mode="vertical"
  260. :list="gongao"></u-notice-bar>
  261. </view>
  262. </view>
  263. </view>
  264. </view>
  265. <view v-if="gridlist.length!=0">
  266. <u-grid :col="4" :border="false">
  267. <u-grid-item bg-color="#f2f2f7">
  268. <view v-for="(item,index) in gridlist" :key="index" style="text-align: center;"
  269. @click="goNave(item.url)">
  270. <image :src="item.imageUrl" style="width:80rpx;height: 80rpx;border-radius: 50%;">
  271. </image>
  272. <view style="color: #333333;">{{item.name}}</view>
  273. </view>
  274. </u-grid-item>
  275. </u-grid>
  276. </view>
  277. <!-- 筛选 -->
  278. <u-sticky @fixed="isfixed" @unfixed="isunfixed" :radius='40' h5-nav-height="0" :enable="enable">
  279. <view class="qySx flex justify-center" :class="isfixeds==true?'isfixed':'isfixeds'">
  280. <view class="qySx-box">
  281. <view class="qySx-box-sxp flex justify-between">
  282. <view class="qySx-box-l flex align-center">
  283. <scroll-view scroll-x="true" class="topbg-scroll"
  284. :scroll-into-view="'bottomView'+currentJobSx" scroll-with-animation="true">
  285. <view class="qySx-box-l-i flex flex-wrap align-center" :id="'bottomView'+index"
  286. @tap="currentJobSx=index;getDomWidth()"
  287. v-for="(item,index) in jobSxTypeList" :key="index">
  288. <view class="jobtitle" style="z-index: 999;"
  289. :class="currentJobSx==index?'activeQ':''">
  290. {{item.name}}
  291. <view class="jobtitleBom"
  292. :style="domeWidth>0?'width:'+domeWidth+'rpx':''"
  293. v-if="currentJobSx==index"
  294. style="height: 14rpx;background: linear-gradient(90deg, #08F3CE 0%, #05F3A7 100%);border-radius: 7rpx;">
  295. </view>
  296. </view>
  297. </view>
  298. </scroll-view>
  299. </view>
  300. <view class="qySx-box-r flex align-center" @click="goNavss('/package/addJob/addJob')">
  301. <text style="margin-right: 20rpx;color: #00B88F;">发布招聘</text>
  302. <u-icon name="plus-circle" color="#00B88F" size="38"></u-icon>
  303. </view>
  304. </view>
  305. <view class="qySx-box-sxs flex justify-between align-center">
  306. <view class="qySx-box-sxs-l flex align-center">
  307. <view class="qySx-box-sxs-l-i" @click="currentJobSxs=index"
  308. :class="currentJobSxs==index?'activeQs':''"
  309. v-for="(item,index) in jobSxsTypeList" :key="index">
  310. {{item.name}}
  311. </view>
  312. </view>
  313. <view class="qySx-box-sxs-r flex align-center">
  314. <text style="margin-right: 10rpx;color: #00B78F;"
  315. @click="goNav('/package/jobIntention/city')">{{city?city:'选择城市'}}</text>
  316. <u-icon name="arrow-down-fill" @click="goNav('/package/jobIntention/city')"
  317. style="margin-right: 30rpx;" color="#00B88F" size="20">
  318. </u-icon>
  319. <text style="margin-right: 10rpx;"
  320. @click="goNav('/package/screen/screen?type=2')">筛选</text>
  321. <u-icon name="arrow-down-fill" @click="goNav('/package/screen/screen?type=2')"
  322. color="#CCCCCC" size="20"></u-icon>
  323. </view>
  324. </view>
  325. </view>
  326. </view>
  327. </u-sticky>
  328. <!-- 简历列表 -->
  329. <view class="qyList flex justify-center">
  330. <view class="qyList-box">
  331. <view class="qyList-box-item flex justify-center" v-for="(item,index) in datasList" :key="index"
  332. @click="goNav('/pages/index/game/orderDet?resumesId='+item.resumesId)">
  333. <view class="qyList-box-item-box">
  334. <view class="qyList-box-item-info flex justify-between align-center">
  335. <view class="qyList-box-item-info-l">
  336. <view class="" style="color: #212121;font-size: 38rpx;font-weight: 800;">
  337. {{item.resumesName}}
  338. </view>
  339. <view class="flex align-center flex-wrap"
  340. style="color: #999999;font-size: 26rpx;margin-top: 10rpx;">
  341. <text>{{item.resumesAge}}岁</text>
  342. <text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
  343. <text>{{item.resumesWorkExperience}}</text>
  344. <text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
  345. <text>{{item.school}}</text>
  346. <text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
  347. <text>期望{{item.resumesCompensation}}</text>
  348. </view>
  349. </view>
  350. <view class="qyList-box-item-info-r">
  351. <image :src="item.avatar?item.avatar:'../../static/logo.png'"
  352. style="width: 95rpx;height: 95rpx;border-radius: 50%;" mode=""></image>
  353. </view>
  354. </view>
  355. <view class="qyList-box-item-job flex align-center">
  356. <u-icon name="heart-fill" color="#00B88F" size="30" style="margin-right: 16rpx;">
  357. </u-icon>
  358. 期望岗位:{{item.resumesPost}}
  359. </view>
  360. <view class="qyList-box-item-job flex align-center">
  361. <image src="../../static/images/qi.png"
  362. style="width: 30rpx;height: 32rpx;margin-right: 16rpx;" mode=""></image>
  363. <block v-if="item.resumesCompanyList[0]">
  364. {{item.resumesCompanyList[0]?item.resumesCompanyList[0].resumesTitle:''}} /
  365. {{item.resumesCompanyList[0]?item.resumesCompanyList[0].resumesPost:''}}
  366. </block>
  367. <block v-else>
  368. 暂无工作经历
  369. </block>
  370. </view>
  371. <view class="qyList-box-item-rem" v-if="item.resumesDetails">
  372. 优势:{{item.resumesDetails}}
  373. </view>
  374. </view>
  375. </view>
  376. <empty :isShow="false" v-if="datasList.length==0" />
  377. </view>
  378. </view>
  379. </block>
  380. </block>
  381. <view v-if="goback==true" class="goback" @click="gotoBack">
  382. <image style="width: 88rpx;height: 88rpx;border-radius: 50%;" src="../../static/images/up.jpg" mode="">
  383. </image>
  384. </view>
  385. </view>
  386. </template>
  387. <script>
  388. import empty from '../../components/empty.vue'
  389. import permision from '@/js_sdk/wa-permission/permission.js'
  390. import companyListIndex from '@/components/companyListIndex/companyListIndex.vue'
  391. export default {
  392. components: {
  393. empty,
  394. companyListIndex
  395. },
  396. data() {
  397. return {
  398. enable: true, //开启吸顶
  399. goback: false,
  400. city: '',
  401. datasList: [],
  402. isfixeds: false,
  403. userType: 1,
  404. dataList: [],
  405. current: 0,
  406. typeList: [],
  407. currentSx: 0,
  408. sxTypeList: [{
  409. id: 1,
  410. name: '推荐',
  411. },
  412. {
  413. id: 2,
  414. name: '最新',
  415. }
  416. ],
  417. currentjob: 0,
  418. jobTypeList: [{
  419. projectName: '',
  420. name: '全部',
  421. }, ],
  422. currentJobSx: 0,
  423. jobSxTypeList: [{
  424. projectName: '',
  425. name: '全部',
  426. }],
  427. currentJobSxs: 0,
  428. jobSxsTypeList: [{
  429. id: 1,
  430. name: '推荐',
  431. },
  432. {
  433. id: 2,
  434. name: '最新',
  435. },
  436. // {
  437. // id: 2,
  438. // name: '优选',
  439. // }
  440. ],
  441. token: '',
  442. page: 1,
  443. limit: 10,
  444. latitude: '',
  445. longitude: '',
  446. totlo: '',
  447. education: '', //学历
  448. experience: '', //经验
  449. industry: '', //行业
  450. salaryRange: '', //薪资
  451. companyPeople: '', //公司规模
  452. domeWidth: 0,
  453. showModal: true,
  454. arr: [],
  455. companyStatus: '',
  456. XCXIsSelect: '是',
  457. bannerList: [], //企业端轮播图
  458. bannerListuser: [], //用户端轮播图
  459. gridlist: [], //用户端分类
  460. gongao: [], //公告
  461. tuiguang: '', //分享标题
  462. bgImg: '', //分享图片
  463. companList: [], //公司列表
  464. };
  465. },
  466. onShareAppMessage(res) {
  467. return {
  468. path: '/pages/index/index?invitation=' + uni.getStorageSync(
  469. 'invitationCode'), //这是为了传参 onload(data){let id=data.id;}
  470. title: this.tuiguang,
  471. imageUrl: this.bgImg
  472. }
  473. },
  474. onShareTimeline(res) {
  475. return {
  476. path: '/pages/index/index?invitation=' + uni.getStorageSync(
  477. 'invitationCode'), //这是为了传参
  478. title: this.tuiguang,
  479. imageUrl: this.bgImg
  480. }
  481. },
  482. watch: {
  483. current(newData, oldData) {
  484. console.log(this.current)
  485. uni.showLoading({
  486. title: '加载中'
  487. })
  488. this.page = 1
  489. if (this.current == this.typeList.length - 1) { //公司
  490. this.getComanyList()
  491. } else {
  492. this.getUserList()
  493. }
  494. },
  495. currentSx(newData, oldData) {
  496. uni.showLoading({
  497. title: '加载中'
  498. })
  499. this.page = 1
  500. this.getUserList();
  501. },
  502. currentjob(newData, oldData) {
  503. uni.showLoading({
  504. title: '加载中'
  505. })
  506. this.page = 1
  507. this.getUserList()
  508. },
  509. currentJobSx(newData, oldData) {
  510. uni.showLoading({
  511. title: '加载中'
  512. })
  513. this.page = 1
  514. this.getPeopList()
  515. },
  516. currentJobSxs(newData, oldData) {
  517. uni.showLoading({
  518. title: '加载中'
  519. })
  520. this.page = 1
  521. this.getPeopList()
  522. },
  523. //监听userType的变化 如果有旧值跟新值不同 则把分页重置为初始状态,为了解决切换身份后数据分页错误的问题
  524. userType(newType, oldType) {
  525. if (newType != oldType) {
  526. this.page = 1
  527. if (this.userType == 1) {
  528. uni.showLoading({
  529. title: '加载中'
  530. })
  531. this.page = 1
  532. this.getUserList()
  533. } else {
  534. uni.showLoading({
  535. title: '加载中'
  536. })
  537. this.page = 1
  538. this.getPeopList()
  539. }
  540. }
  541. }
  542. },
  543. onPageScroll(e) {
  544. if (e.scrollTop > 350) {
  545. this.goback = true
  546. } else {
  547. this.goback = false
  548. }
  549. },
  550. onLoad(e) {
  551. // #ifdef APP
  552. this.getAudioPermision()
  553. // #endif
  554. // 获取邀请码保存到本地
  555. if (e.invitation) {
  556. this.$queue.setData('inviterCode', e.invitation);
  557. }
  558. // #ifdef MP-WEIXIN
  559. if (e.scene) {
  560. const scene = decodeURIComponent(e.scene);
  561. this.$queue.setData('inviterCode', scene.split(',')[0]);
  562. }
  563. // #endif
  564. // this.XCXIsSelect = this.$queue.getData("XCXIsSelect");
  565. uni.showLoading({
  566. title: '加载中'
  567. })
  568. if (uni.getStorageSync('userType')) {
  569. this.userType = uni.getStorageSync('userType');
  570. }
  571. let that = this
  572. //获取经纬度后请求岗位接口,经纬度用于筛选距离
  573. uni.getLocation({
  574. type: 'wgs84', //wgs84 gcj02
  575. success: function(res) {
  576. console.log(res, '地理位置');
  577. that.latitude = res.latitude;
  578. that.longitude = res.longitude;
  579. if (that.userType == 1) {
  580. // that.getUserList();
  581. that.getPostType()
  582. } else {
  583. that.getPeopList()
  584. }
  585. // console.log(uni.getStorageSync('city') == '', '22222222222')
  586. if (!uni.getStorageSync('city') || uni.getStorageSync('city') == '' || uni.getStorageSync(
  587. 'city') == null) {
  588. // #ifdef APP-PLUS
  589. if (res.address) {
  590. that.city = res.address.city
  591. } else {
  592. that.getSelectCity(that.longitude, that.latitude);
  593. }
  594. // #endif
  595. // #ifndef APP
  596. that.getSelectCity(that.longitude, that.latitude);
  597. // #endif
  598. }
  599. },
  600. fail: function() {
  601. console.log('获取地址失败');
  602. }
  603. })
  604. this.getDomWidth()
  605. this.$Request.getT('/app/common/type/255').then(res => {
  606. if (res.code === 0) {
  607. if (res.data && res.data.value) {
  608. this.tuiguang = res.data.value;
  609. }
  610. }
  611. });
  612. if (this.userType == 1) { //用户邀请图
  613. this.$Request.getT('/app/banner/selectBannerList?state=-1&classify=5').then(res => {
  614. if (res.code === 0) {
  615. this.bgImg = res.data[0].imageUrl;
  616. }
  617. });
  618. } else { //企业邀请图
  619. this.$Request.getT('/app/banner/selectBannerList?state=-1&classify=6').then(res => {
  620. if (res.code === 0) {
  621. this.bgImg = res.data[0].imageUrl;
  622. }
  623. });
  624. }
  625. },
  626. //下拉刷新
  627. onPullDownRefresh() {
  628. this.page = 1
  629. if (this.userType == 1) {
  630. if (this.current != this.typeList.length - 1) {
  631. this.getUserList()
  632. } else {
  633. this.getComanyList()
  634. }
  635. } else {
  636. this.getPeopList()
  637. }
  638. },
  639. //加载更多
  640. onReachBottom() {
  641. if (this.page < this.totlo) {
  642. this.page += 1
  643. if (this.userType == 1) {
  644. if (this.current != this.typeList.length - 1) {
  645. this.getUserList()
  646. } else {
  647. this.getComanyList()
  648. }
  649. } else {
  650. this.getPeopList()
  651. }
  652. }
  653. },
  654. onHide() {
  655. //离开页面时关闭吸顶功能,用于处理h5环境运行下'bottom' of null报错的问题
  656. this.enable = false
  657. },
  658. onShow() {
  659. let that = this;
  660. uni.$once('city', data => {
  661. that.city = data.city
  662. uni.setStorageSync('city', that.city)
  663. })
  664. this.getBannerList()
  665. this.getgridList()
  666. this.getgonggaoList()
  667. // #ifdef MP-WEIXIN
  668. this.$Request.get('/app/common/type/257').then(res => {
  669. if (res.code == 0) {
  670. // #ifdef MP-WEIXIN
  671. this.XCXIsSelect = res.data.value
  672. // #endif
  673. // #ifndef MP-WEIXIN
  674. this.XCXIsSelect = '是'
  675. // #endif
  676. }
  677. });
  678. // this.$Request.get('/app/common/type/238').then(res => {
  679. // if (res.code == 0) {
  680. // // #ifdef MP-WEIXIN
  681. // this.XCXIsSelect = res.data.value
  682. // // #endif
  683. // // #ifndef MP-WEIXIN
  684. // this.XCXIsSelect = '是'
  685. // // #endif
  686. // }
  687. // });
  688. // #endif
  689. this.enable = true
  690. if (uni.getStorageSync('userType')) {
  691. this.userType = uni.getStorageSync('userType');
  692. }
  693. this.token = uni.getStorageSync('token');
  694. //获取选中的筛选条件
  695. if (uni.getStorageSync('filter') && (uni.getStorageSync('filter')).length > 0) {
  696. let filter = uni.getStorageSync('filter')
  697. this.education = '' //学历
  698. this.experience = '' //经验
  699. this.industry = '' //行业
  700. this.salaryRange = '' //薪资
  701. this.companyPeople = '' //公司规模
  702. filter.map(item => {
  703. let arr = []
  704. item.list.map(ite => {
  705. if (ite.value != '不限') {
  706. arr.push(ite.value)
  707. }
  708. })
  709. switch (item.name) {
  710. case '学历':
  711. this.education = arr.join(',')
  712. break;
  713. case '薪资':
  714. this.salaryRange = arr.join(',')
  715. break;
  716. case '经验':
  717. this.experience = arr.join(',')
  718. break;
  719. case '公司规模':
  720. this.companyPeople = arr.join(',')
  721. break;
  722. case '行业':
  723. this.industry = arr.join(',')
  724. break;
  725. }
  726. })
  727. // console.log(filter)
  728. } else {
  729. this.education = '' //学历
  730. this.experience = '' //经验
  731. this.industry = '' //行业
  732. this.salaryRange = '' //薪资
  733. this.companyPeople = '' //公司规模
  734. }
  735. // this.getPostType();
  736. if (this.userType == 1) {
  737. uni.setNavigationBarColor({
  738. frontColor: '#ffffff',
  739. backgroundColor: '#00DD9A'
  740. })
  741. } else {
  742. uni.setNavigationBarColor({
  743. frontColor: '#000000',
  744. backgroundColor: '#F2F2F7'
  745. })
  746. }
  747. if (this.token) {
  748. this.getUserInfo();
  749. if (this.userType == 1) {
  750. this.getJobType();
  751. } else {
  752. this.jobTypeList = [{
  753. projectName: '',
  754. name: '全部',
  755. }]
  756. this.getCompanyClassify()
  757. this.getCompanyStatus()
  758. }
  759. this.$Request.getT('/app/common/type/310').then(res => { //消息未读提醒
  760. if (res.code == 0) {
  761. if (res.data && res.data.value) {
  762. this.arr.push(res.data.value)
  763. }
  764. }
  765. })
  766. this.$Request.getT('/app/common/type/337').then(res => { //预约成功通知(通用)
  767. if (res.code == 0) {
  768. if (res.data && res.data.value) {
  769. this.arr.push(res.data.value)
  770. }
  771. }
  772. })
  773. this.$Request.getT('/app/common/type/338').then(res => { //订单状态通知
  774. if (res.code == 0) {
  775. if (res.data && res.data.value) {
  776. this.arr.push(res.data.value)
  777. }
  778. }
  779. })
  780. // #ifdef MP-WEIXIN
  781. if (this.showModal) {
  782. this.openMsg()
  783. }
  784. // #endif
  785. } else {
  786. this.jobTypeList = [{
  787. projectName: '',
  788. name: '全部',
  789. }]
  790. }
  791. if (uni.getStorageSync('city')) {
  792. this.city = uni.getStorageSync('city')
  793. } else {
  794. this.city = ''
  795. }
  796. if (this.city) {
  797. if (this.userType == 1) {
  798. if (this.current != this.typeList.length - 1) {
  799. this.getPostType();
  800. } else {
  801. this.getComanyList()
  802. }
  803. } else {
  804. this.getPeopList()
  805. }
  806. // if (this.userType == 1) { //用户端岗位
  807. // that.getPostType();
  808. // } else { //企业端简历
  809. // that.getPeopList();
  810. // }
  811. }
  812. },
  813. methods: {
  814. //去企业详情
  815. goInfo(item) {
  816. uni.navigateTo({
  817. url: '/my/enterpriseInfo/enterpriseInfo?companyId=' + item.companyId
  818. })
  819. },
  820. //获取公司列表
  821. getComanyList() {
  822. let data = {
  823. page: this.page,
  824. limit: this.limit,
  825. city: this.city == '全国' ? '' : this.city, //城市
  826. companyScope: this.industry,
  827. companyPeople: this.companyPeople
  828. }
  829. this.$Request.getT('/app/company/listCompany', data).then(res => {
  830. uni.hideLoading()
  831. uni.stopPullDownRefresh()
  832. if (res.code == 0) {
  833. this.totlo = res.data.pages
  834. if (this.page == 1) {
  835. this.companList = res.data.records
  836. } else {
  837. this.companList = [...this.companList, ...res.data.records]
  838. }
  839. // this.companList = res.data
  840. } else {
  841. uni.showToast({
  842. title: res.msg,
  843. icon: 'none'
  844. })
  845. }
  846. })
  847. },
  848. isSameName(className, name) {
  849. let str1 = className.trim();
  850. let str2 = name.trim();
  851. if (str1.length !== str2.length) {
  852. return true;
  853. }
  854. return str1.toLowerCase() !== str2.toLowerCase();
  855. },
  856. //获取麦克风/摄像头权限
  857. async getAudioPermision() {
  858. let status = permision.isIOS ? await permision.judgeIosPermission("record") : await permision
  859. .requestAndroidPermission("android.permission.RECORD_AUDIO")
  860. let status2 = permision.isIOS ? await permision.judgeIosPermission("camera") : await permision
  861. .requestAndroidPermission("android.permission.CAMERA")
  862. if (status === null || status === 1 || status == true) { //已经同意授权
  863. console.log('获取到权限了')
  864. } else { //未授权的
  865. this.popupshowsq = true
  866. }
  867. },
  868. goNave(url) {
  869. if (url.indexOf('/pages/') !== -1 || url.indexOf('/my/') !== -1 || url.indexOf('/package/') !== -1) {
  870. uni.navigateTo({
  871. url
  872. });
  873. } else {
  874. //#ifndef H5
  875. uni.navigateTo({
  876. url: '/pages/index/webView?url=' + url
  877. });
  878. //#endif
  879. //#ifdef H5
  880. window.location.href = url;
  881. //#endif
  882. }
  883. },
  884. //获取公告
  885. getgonggaoList() {
  886. if (!uni.getStorageSync('userType') || uni.getStorageSync('userType') == 1) {
  887. this.$Request.get('/app/message/page/1/1/100').then(res => {
  888. if (res.code == 0) {
  889. let arr = []
  890. res.data.list.map(item => {
  891. if (item.type == 1) {
  892. arr.push(item.title)
  893. }
  894. })
  895. this.gongao = arr
  896. } else {
  897. this.gongao = []
  898. }
  899. })
  900. } else if (uni.getStorageSync('userType') == 2) {
  901. this.$Request.get('/app/message/page/1/1/100').then(res => {
  902. if (res.code == 0) {
  903. let arr = []
  904. res.data.list.map(item => {
  905. if (item.type == 2) {
  906. arr.push(item.title)
  907. }
  908. })
  909. this.gongao = arr
  910. } else {
  911. this.gongao = []
  912. }
  913. })
  914. }
  915. },
  916. //获取金刚区
  917. getgridList() {
  918. if (uni.getStorageSync('userType') == 1) {
  919. this.$Request.get('/app/banner/selectBannerList?classify=2').then(res => {
  920. if (res.code == 0) {
  921. this.gridlist = res.data
  922. } else {
  923. this.gridlist = []
  924. }
  925. })
  926. } else {
  927. this.$Request.get('/app/banner/selectBannerList?classify=4').then(res => {
  928. if (res.code == 0) {
  929. this.gridlist = res.data
  930. } else {
  931. this.gridlist = []
  932. }
  933. })
  934. }
  935. },
  936. //获取bannerlist
  937. getBannerList() {
  938. if (!uni.getStorageSync('userType') || uni.getStorageSync('userType') == 1) {
  939. this.$Request.get('/app/banner/selectBannerList?classify=1').then(res => {
  940. if (res.code == 0) {
  941. this.bannerListuser = res.data
  942. this.bannerList = res.data
  943. } else {
  944. this.bannerListuser = [
  945. 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fphoto%2F2007-11-7%2F200711072147151187.jpg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1674883340&t=4b9cbb7796600699ac28f75cd138ba04'
  946. ]
  947. }
  948. })
  949. } else if (uni.getStorageSync('userType') == 2) {
  950. this.$Request.get('/app/banner/selectBannerList?classify=3').then(res => {
  951. if (res.code == 0) {
  952. this.bannerList = res.data
  953. } else {
  954. this.bannerList = [
  955. 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fup.enterdesk.com%2Fphoto%2F2007-11-7%2F200711072147151187.jpg&refer=http%3A%2F%2Fup.enterdesk.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1674883340&t=4b9cbb7796600699ac28f75cd138ba04'
  956. ]
  957. }
  958. })
  959. }
  960. },
  961. goNavss(url) {
  962. if (this.companyStatus) {
  963. if (this.companyStatus == 1) {
  964. uni.showToast({
  965. title: '企业认证审核中,请审核通过后操作!',
  966. icon: 'none'
  967. })
  968. return
  969. }
  970. if (this.companyStatus == 3) {
  971. uni.showToast({
  972. title: '企业认证审核未通过,请重新认证!',
  973. icon: 'none'
  974. })
  975. return
  976. }
  977. uni.navigateTo({
  978. url: url
  979. })
  980. } else {
  981. uni.showModal({
  982. title: '提示',
  983. content: '还未完成企业认证,请完成企业认证后操作',
  984. complete(ret) {
  985. if (ret.confirm) {
  986. }
  987. }
  988. })
  989. }
  990. },
  991. //获取企业认证状态(1:审核中 2:通过 3:拒绝)
  992. getCompanyStatus() {
  993. this.$Request.get("/app/company/selectCompanyByUserId").then(res => {
  994. if (res.code == 0 && res.data) {
  995. this.companyStatus = res.data.status
  996. uni.setStorageSync('companyStatus', this.companyStatus)
  997. } else {
  998. this.companyStatus = ''
  999. }
  1000. })
  1001. },
  1002. // 开启订阅消息
  1003. openMsg() {
  1004. console.log('订阅消息')
  1005. var that = this
  1006. uni.getSetting({
  1007. withSubscriptions: true, //是否获取用户订阅消息的订阅状态,默认false不返回
  1008. success(ret) {
  1009. console.log(ret.subscriptionsSetting, '------------------')
  1010. // if (ret.subscriptionsSetting.itemSettings && Object.keys(ret.subscriptionsSetting.itemSettings).length == 2) {
  1011. if (ret.subscriptionsSetting.itemSettings) {
  1012. uni.setStorageSync('sendMsg', true)
  1013. uni.openSetting({ // 打开设置页
  1014. success(rea) {
  1015. console.log(rea.authSetting)
  1016. }
  1017. });
  1018. } else { // 用户没有点击“总是保持以上,不再询问”则每次都会调起订阅消息
  1019. console.log(99999)
  1020. uni.setStorageSync('sendMsg', false)
  1021. uni.showModal({
  1022. title: '提示',
  1023. content: '为了更好的体验,请绑定消息推送',
  1024. confirmText: '确定',
  1025. cancelText: '取消',
  1026. confirmColor: '#00B88F',
  1027. success: function(res) {
  1028. if (res.confirm) {
  1029. console.log(that.arr)
  1030. wx.requestSubscribeMessage({
  1031. tmplIds: that.arr,
  1032. success(re) {
  1033. console.log(JSON.stringify(re),
  1034. '++++++++++++++')
  1035. var datas = JSON.stringify(re);
  1036. if (datas.indexOf("accept") != -1) {
  1037. console.log(re)
  1038. uni.setStorageSync('sendMsg', true)
  1039. }
  1040. },
  1041. fail: (res) => {
  1042. console.log(res)
  1043. }
  1044. })
  1045. uni.setStorageSync('sendMsg', true)
  1046. console.log('确认')
  1047. that.showModal = false
  1048. } else if (res.cancel) {
  1049. console.log('取消')
  1050. uni.setStorageSync('sendMsg', false)
  1051. that.showModal = true
  1052. }
  1053. }
  1054. })
  1055. }
  1056. }
  1057. })
  1058. },
  1059. //回到顶部
  1060. gotoBack() {
  1061. uni.pageScrollTo({
  1062. scrollTop: 0,
  1063. duration: 300
  1064. })
  1065. },
  1066. /**
  1067. * 获取简历列表
  1068. */
  1069. getPeopList() {
  1070. let data = {
  1071. page: this.page,
  1072. limit: this.limit,
  1073. postType: '', //工作性质
  1074. resumesPost: this.jobSxTypeList[this.currentJobSx].projectName, //岗位名称
  1075. screen: +this.currentJobSxs + 1, //1推荐 2最新
  1076. city: this.city == '全国' ? '' : this.city, //城市
  1077. resumesCompensation: this.salaryRange, //薪资范围
  1078. resumesEducation: this.education, //学历
  1079. resumesWorkExperience: this.experience, //经验
  1080. industryName: this.industry, //行业
  1081. // companyPeople: this.companyPeople, //公司规模
  1082. lng: this.longitude,
  1083. lat: this.latitude,
  1084. companyId: uni.getStorageSync('companyId') ? uni.getStorageSync('companyId') : ''
  1085. }
  1086. this.$Request.get('/app/resumes/selectResumesList', data).then(res => {
  1087. uni.stopPullDownRefresh()
  1088. uni.hideLoading()
  1089. if (res.code == 0 && res.data) {
  1090. this.totalPage = res.data.totalPage
  1091. // res.data.list.map(item => {
  1092. // if (item.positionWelfare) {
  1093. // item.positionWelfare = item.positionWelfare.split(',')
  1094. // } else {
  1095. // item.positionWelfare = []
  1096. // }
  1097. // })
  1098. if (this.page == 1) {
  1099. this.datasList = res.data.list
  1100. } else {
  1101. this.datasList = [...this.datasList, ...res.data.list]
  1102. }
  1103. this.totlo = res.data.totalPage
  1104. } else {
  1105. this.datasList = []
  1106. }
  1107. })
  1108. },
  1109. /**
  1110. * 获取公司发布的岗位列表
  1111. */
  1112. getCompanyClassify() {
  1113. let data = {
  1114. companyId: uni.getStorageSync('companyId')
  1115. }
  1116. this.$Request.getT('/app/postPush/getCompanyClassify', data).then(res => {
  1117. if (res.code == 0) {
  1118. let arr = [{
  1119. projectName: '',
  1120. name: '全部',
  1121. }, ]
  1122. res.data.map(item => {
  1123. let obj = {
  1124. projectName: item,
  1125. name: item,
  1126. }
  1127. arr.push(obj)
  1128. })
  1129. this.jobSxTypeList = arr
  1130. }
  1131. })
  1132. },
  1133. /**
  1134. * 获取dom元素的宽度
  1135. */
  1136. getDomWidth() {
  1137. this.$nextTick(() => {
  1138. let that = this
  1139. let obj = uni.createSelectorQuery().select('#bottomView' + that
  1140. .currentJobSx) // xx为class或者id,如 .block, #block
  1141. obj.boundingClientRect(function(data) { // data - dom中的参数,宽高等
  1142. // console.log(data.width)
  1143. that.domeWidth = data.width * 2 * 0.8
  1144. }).exec()
  1145. })
  1146. },
  1147. /**
  1148. * @param {Object} longitude
  1149. * @param {Object} latitude
  1150. * 使用经纬度获取城市
  1151. */
  1152. getSelectCity(longitude, latitude) {
  1153. this.$Request.get('/app/Login/selectCity?lat=' + latitude + '&lng=' + longitude).then(res => {
  1154. if (res.code == 0) {
  1155. // console.log(res, '获取地址信息')
  1156. this.city = res.data.city ? res.data.city : '区域'
  1157. uni.setStorageSync('city', res.data.city)
  1158. if (this.userType == 1) {
  1159. this.getUserList()
  1160. } else {
  1161. this.getPeopList()
  1162. }
  1163. }
  1164. });
  1165. },
  1166. /**
  1167. * 获取求职意向
  1168. */
  1169. getJobType() {
  1170. this.$Request.get('/app/intention/getIntentionList').then(res => {
  1171. if (res.code == 0 && res.data.records.length > 0) {
  1172. let arr = [{
  1173. projectName: '',
  1174. name: '全部',
  1175. }, ]
  1176. res.data.records.map(item => {
  1177. let obj = {
  1178. projectName: item.ruleClassifyName,
  1179. name: item.ruleClassifyName,
  1180. }
  1181. arr.push(obj)
  1182. })
  1183. this.jobTypeList = arr
  1184. }
  1185. })
  1186. },
  1187. /**
  1188. * 获取岗位列表
  1189. */
  1190. getUserList() {
  1191. let data = {
  1192. page: this.page,
  1193. limit: this.limit,
  1194. postType: this.typeList.length > 0 ? this.typeList[this.current].label : '',
  1195. ruleClassifyName: this.jobTypeList[this.currentjob].projectName, //岗位名称
  1196. screen: +this.currentSx + 1, //1推荐 2最新
  1197. city: this.city == '全国' ? '' : this.city, //城市
  1198. salaryRange: this.salaryRange, //薪资范围
  1199. education: this.education, //学历
  1200. experience: this.experience, //经验
  1201. industry: this.industry, //行业
  1202. companyPeople: this.companyPeople, //公司规模
  1203. lng: this.longitude,
  1204. lat: this.latitude,
  1205. userId: uni.getStorageSync('userId') ? uni.getStorageSync('userId') : ''
  1206. }
  1207. this.$Request.get('/app/postPush/userGetPostPushList', data).then(res => {
  1208. uni.stopPullDownRefresh()
  1209. uni.hideLoading()
  1210. if (res.code == 0) {
  1211. res.data.records.map(item => {
  1212. if (item.positionWelfare) {
  1213. item.positionWelfare = item.positionWelfare.split(',')
  1214. } else {
  1215. item.positionWelfare = []
  1216. }
  1217. if (item.distance) {
  1218. if (parseFloat(item.distance) > 1000) {
  1219. item.distance = (parseFloat(item.distance) / 1000).toFixed(2) + 'km'
  1220. } else {
  1221. item.distance = (parseFloat(item.distance)).toFixed(2) + 'm'
  1222. }
  1223. } else {
  1224. item.distance = ''
  1225. }
  1226. })
  1227. if (this.page == 1) {
  1228. // console.log(res.data.records, '岗位数据')
  1229. this.dataList = res.data.records
  1230. } else {
  1231. this.dataList = [...this.dataList, ...res.data.records]
  1232. }
  1233. this.totlo = res.data.pages
  1234. }
  1235. })
  1236. },
  1237. /**
  1238. * 工作性质
  1239. */
  1240. getPostType() {
  1241. this.$Request.get('/app/dict/list', {
  1242. type: '工作性质'
  1243. }).then(res => {
  1244. if (res.code == 0) {
  1245. let arr = res.data
  1246. arr = JSON.parse(JSON.stringify(arr).replace(/code/g, 'label'))
  1247. let obj = {
  1248. id: -1,
  1249. label: '企业',
  1250. name: '企业'
  1251. }
  1252. arr.push(obj)
  1253. this.typeList = arr
  1254. // console.log(this.typeList, '1111')
  1255. this.getUserList()
  1256. }
  1257. })
  1258. },
  1259. /**
  1260. * 获取个人信息
  1261. */
  1262. getUserInfo() {
  1263. this.$Request.get("/app/user/selectUserById").then(res => {
  1264. if (res.code == 0) {
  1265. this.$queue.setData('weChatNum', res.data.weChatNum)
  1266. if (res.data.companyId) {
  1267. uni.setStorageSync('companyId', res.data.companyId)
  1268. }
  1269. if (res.data.userType == 1 || res.data.userType == null) {
  1270. this.userType = 1
  1271. uni.setStorageSync('userType', 1)
  1272. } else {
  1273. this.userType = 2
  1274. uni.setStorageSync('userType', 2)
  1275. }
  1276. }
  1277. })
  1278. },
  1279. gotoInfo(postPushId) {
  1280. if (uni.getStorageSync('token')) {
  1281. // #ifdef MP-WEIXIN
  1282. if (uni.getStorageSync('sendMsg')) {
  1283. // console.log('授权+1')
  1284. wx.requestSubscribeMessage({
  1285. tmplIds: this.arr,
  1286. success(re) {
  1287. // console.log(JSON.stringify(re), 111111111111)
  1288. var datas = JSON.stringify(re);
  1289. if (datas.indexOf("accept") != -1) {
  1290. // console.log(re)
  1291. }
  1292. },
  1293. fail: (res) => {
  1294. // console.log(res)
  1295. }
  1296. })
  1297. }
  1298. // #endif
  1299. // uni.navigateTo({
  1300. // url: '/pages/index/game/order?postPushId=' + postPushId
  1301. // })
  1302. }
  1303. // else {
  1304. // this.noLogin()
  1305. // }
  1306. uni.navigateTo({
  1307. url: '/pages/index/game/order?postPushId=' + postPushId
  1308. })
  1309. },
  1310. //不需要登录跳转
  1311. goNavs(url) {
  1312. // #ifdef MP-WEIXIN
  1313. if (uni.getStorageSync('sendMsg')) {
  1314. // console.log('授权+1')
  1315. wx.requestSubscribeMessage({
  1316. tmplIds: this.arr,
  1317. success(re) {
  1318. // console.log(JSON.stringify(re), 111111111111)
  1319. var datas = JSON.stringify(re);
  1320. if (datas.indexOf("accept") != -1) {
  1321. // console.log(re)
  1322. }
  1323. },
  1324. fail: (res) => {
  1325. // console.log(res)
  1326. }
  1327. })
  1328. }
  1329. // #endif
  1330. uni.navigateTo({
  1331. url: url
  1332. })
  1333. },
  1334. //跳转
  1335. goNav(url) {
  1336. if (uni.getStorageSync('token')) {
  1337. // #ifdef MP-WEIXIN
  1338. if (uni.getStorageSync('sendMsg')) {
  1339. // console.log('授权+1')
  1340. wx.requestSubscribeMessage({
  1341. tmplIds: this.arr,
  1342. success(re) {
  1343. // console.log(JSON.stringify(re), 111111111111)
  1344. var datas = JSON.stringify(re);
  1345. if (datas.indexOf("accept") != -1) {
  1346. // console.log(re)
  1347. }
  1348. },
  1349. fail: (res) => {
  1350. // console.log(res)
  1351. }
  1352. })
  1353. }
  1354. // #endif
  1355. uni.navigateTo({
  1356. url: url
  1357. })
  1358. } else {
  1359. this.noLogin()
  1360. }
  1361. },
  1362. //未登录
  1363. noLogin() {
  1364. uni.showModal({
  1365. title: '提示',
  1366. content: '您还未登录,请先登录',
  1367. confirmColor: '#00B88F',
  1368. success: function(res) {
  1369. if (res.confirm) {
  1370. // console.log('用户点击确定');
  1371. uni.navigateTo({
  1372. url: '/pages/public/login'
  1373. })
  1374. } else if (res.cancel) {
  1375. // console.log('用户点击取消');
  1376. }
  1377. }
  1378. })
  1379. },
  1380. //吸顶
  1381. isfixed(e) {
  1382. // console.log(e, '+++++++++++++')
  1383. this.isfixeds = true
  1384. },
  1385. //不吸顶
  1386. isunfixed() {
  1387. this.isfixeds = false
  1388. }
  1389. }
  1390. }
  1391. </script>
  1392. <style lang="scss">
  1393. page {
  1394. background: #F2F2F7;
  1395. }
  1396. .goback {
  1397. position: fixed;
  1398. top: 80%;
  1399. right: 30rpx;
  1400. }
  1401. .jobtitle {
  1402. position: relative;
  1403. .jobtitleBom {
  1404. position: absolute;
  1405. width: 30rpx;
  1406. left: 50%;
  1407. top: 80%;
  1408. transform: translate(-50%, 0);
  1409. }
  1410. }
  1411. .topbg-scroll {
  1412. width: 100%;
  1413. white-space: nowrap;
  1414. }
  1415. .activeQs {
  1416. color: #1A1A1A !important;
  1417. font-weight: 800;
  1418. }
  1419. .activeQ {
  1420. color: #1A1A1A !important;
  1421. font-size: 38rpx;
  1422. font-weight: 800;
  1423. }
  1424. .active {
  1425. font-size: 38rpx !important;
  1426. font-weight: 800 !important;
  1427. }
  1428. .active2 {
  1429. color: #1A1A1A !important;
  1430. font-size: 38rpx !important;
  1431. font-weight: 800 !important;
  1432. }
  1433. .active3 {
  1434. color: #1A1A1A !important;
  1435. font-size: 28rpx !important;
  1436. font-weight: 800 !important;
  1437. }
  1438. .topbg {
  1439. width: 100%;
  1440. // height: 100rpx;
  1441. background-color: #00DD9A;
  1442. // position: fixed;
  1443. // /* #ifdef MP-WEIXIN */
  1444. // top: 0;
  1445. // /* #endif */
  1446. // /* #ifdef H5 */
  1447. // top: 78rpx;
  1448. // /* #endif */
  1449. // /* #ifdef APP-PLUS */
  1450. // top: 0;
  1451. // /* #endif */
  1452. // z-index: 998;
  1453. }
  1454. .topbg-type {
  1455. width: 100%;
  1456. // height: 40rpx;
  1457. // margin-top: 28rpx;
  1458. padding-top: 28rpx;
  1459. .topbg-type-box {
  1460. width: 686rpx;
  1461. height: 100%;
  1462. }
  1463. .topbg-type-box-l-i {
  1464. font-size: 32rpx;
  1465. color: #ffffff;
  1466. margin-right: 40rpx;
  1467. }
  1468. .topbg-type-box-r {
  1469. color: #ffffff;
  1470. }
  1471. }
  1472. .companyListBox {
  1473. width: 100%;
  1474. background-color: #F2F2F7;
  1475. // margin-top: 30rpx;
  1476. }
  1477. .topbg-yx {
  1478. width: 100%;
  1479. // height: 366rpx;
  1480. background: #F2F2F7;
  1481. border-radius: 40rpx 40rpx 0 0;
  1482. margin-top: 20rpx;
  1483. align-content: flex-start;
  1484. .topbg-yx-box {
  1485. width: 686rpx;
  1486. height: 40rpx;
  1487. margin-top: 35rpx;
  1488. }
  1489. .topbg-yx-box-l {
  1490. width: 62%;
  1491. .topbg-yx-box-l-i {
  1492. display: inline-block;
  1493. margin-right: 50rpx;
  1494. color: #999999;
  1495. font-size: 32rpx;
  1496. font-weight: 500;
  1497. .topbg-yx-box-l-i-c {
  1498. z-index: 1 !important;
  1499. // position: relative;
  1500. .topbg-yx-box-l-i-text {
  1501. z-index: 3 !important;
  1502. }
  1503. }
  1504. .topbg-yx-box-l-i-line {
  1505. margin-top: -10rpx;
  1506. width: 100%;
  1507. height: 10rpx;
  1508. background: linear-gradient(90deg, #08F3CE 0%, #05F3A7 100%);
  1509. border-radius: 7rpx;
  1510. z-index: 2 !important;
  1511. }
  1512. }
  1513. }
  1514. .topbg-yx-box-r {
  1515. text {
  1516. color: #00B88F;
  1517. font-size: 28rpx;
  1518. font-weight: 500;
  1519. margin-right: 20rpx;
  1520. }
  1521. }
  1522. .topbg-sx-box {
  1523. width: 686rpx;
  1524. // height: 25rpx;
  1525. margin-top: 30rpx;
  1526. .topbg-sx-box-l-i {
  1527. color: #999999;
  1528. font-size: 28rpx;
  1529. font-weight: 500;
  1530. margin-right: 38rpx;
  1531. }
  1532. }
  1533. }
  1534. .gwList {
  1535. width: 100%;
  1536. // margin-top: 260rpx;
  1537. .gwList-box {
  1538. width: 686rpx;
  1539. height: 100%;
  1540. .gwList-box-item {
  1541. width: 100%;
  1542. // height: 329rpx;
  1543. background-color: #ffffff;
  1544. border-radius: 24rpx;
  1545. margin-bottom: 20rpx;
  1546. padding-bottom: 20rpx;
  1547. }
  1548. .gwList-box-item-box {
  1549. width: 623rpx;
  1550. height: 100%;
  1551. .gwList-box-item-box-title {
  1552. margin-top: 30rpx;
  1553. view:nth-of-type(1) {
  1554. color: #1F1F1F;
  1555. font-size: 38rpx;
  1556. font-weight: 800;
  1557. }
  1558. text:nth-of-type(1) {
  1559. color: #00B88F;
  1560. font-size: 38rpx;
  1561. font-weight: bold;
  1562. }
  1563. }
  1564. .gwList-box-item-box-label {
  1565. margin-top: 30rpx;
  1566. }
  1567. .gwList-box-item-box-name {
  1568. margin-top: 24rpx;
  1569. color: #999999;
  1570. font-size: 28rpx;
  1571. font-weight: 500;
  1572. }
  1573. .gwList-box-item-box-line {
  1574. width: 100%;
  1575. border: 1rpx solid #E6E6E6;
  1576. margin-top: 30rpx;
  1577. margin-bottom: 20rpx;
  1578. }
  1579. .gwList-box-item-box-info {
  1580. font-size: 26rpx;
  1581. .gwList-box-item-box-info-l {
  1582. color: #1A1A1A;
  1583. .people {
  1584. max-width: 110rpx;
  1585. overflow: hidden; //超出的文本隐藏
  1586. text-overflow: ellipsis; //溢出用省略号显示
  1587. white-space: nowrap; // 默认不换行;
  1588. }
  1589. }
  1590. .gwList-box-item-box-info-r {
  1591. color: #999999;
  1592. max-width: 50%;
  1593. overflow: hidden; //超出的文本隐藏
  1594. text-overflow: ellipsis; //溢出用省略号显示
  1595. white-space: nowrap; // 默认不换行;
  1596. }
  1597. }
  1598. }
  1599. }
  1600. }
  1601. .banner {
  1602. width: 100%;
  1603. height: 250rpx;
  1604. // margin-top: 20rpx;
  1605. .banner-box {
  1606. width: 686rpx;
  1607. height: 100%;
  1608. border-radius: 24rpx;
  1609. }
  1610. }
  1611. .isfixed {
  1612. border-radius: 0 !important;
  1613. }
  1614. .isfixeds {
  1615. border-radius: 40rpx 40rpx 0 0;
  1616. }
  1617. .qySx {
  1618. width: 100%;
  1619. // height: 366rpx;
  1620. background: linear-gradient(to bottom, #ffffff, #F2F2F7);
  1621. padding-bottom: 40rpx;
  1622. .qySx-box {
  1623. width: 686rpx;
  1624. height: 100%;
  1625. .qySx-box-sxp {
  1626. height: 60rpx;
  1627. margin-top: 40rpx;
  1628. }
  1629. .qySx-box-l {
  1630. height: 100%;
  1631. width: 65%;
  1632. // background-color: red;
  1633. .qySx-box-l-i {
  1634. display: inline-block;
  1635. height: 100%;
  1636. margin-right: 20rpx;
  1637. color: #999999;
  1638. font-size: 32rpx;
  1639. }
  1640. }
  1641. .qySx-box-r {
  1642. height: 100%;
  1643. }
  1644. .qySx-box-sxs {
  1645. width: 100%;
  1646. height: 30rpx;
  1647. margin-top: 30rpx;
  1648. .qySx-box-sxs-l {
  1649. .qySx-box-sxs-l-i {
  1650. margin-right: 40rpx;
  1651. color: #999999;
  1652. font-size: 28rpx;
  1653. }
  1654. }
  1655. .qySx-box-sxs-r {
  1656. color: #999999;
  1657. font-size: 28rpx;
  1658. }
  1659. }
  1660. }
  1661. }
  1662. .qyList {
  1663. width: 100%;
  1664. height: auto;
  1665. .qyList-box {
  1666. width: 686rpx;
  1667. height: 100%;
  1668. .qyList-box-item {
  1669. width: 100%;
  1670. // height: 400rpx;
  1671. padding-bottom: 40rpx;
  1672. background-color: #ffffff;
  1673. border-radius: 24rpx;
  1674. margin-bottom: 20rpx;
  1675. .qyList-box-item-box {
  1676. width: 626rpx;
  1677. height: 100%;
  1678. }
  1679. .qyList-box-item-info {
  1680. margin-top: 40rpx;
  1681. }
  1682. .qyList-box-item-job {
  1683. width: 100%;
  1684. color: #121212;
  1685. font-size: 28rpx;
  1686. font-weight: 500;
  1687. margin-top: 20rpx;
  1688. }
  1689. .qyList-box-item-rem {
  1690. color: #999999;
  1691. font-size: 26rpx;
  1692. margin-top: 20rpx;
  1693. }
  1694. }
  1695. }
  1696. }
  1697. .announcement {
  1698. // background: #ffffff;
  1699. padding: 0px 0px 10px 10px;
  1700. margin-top: 20rpx;
  1701. }
  1702. .announcementbox {
  1703. width: 712upx;
  1704. height: 64upx;
  1705. background: #e5fff2;
  1706. border-radius: 32upx;
  1707. display: flex;
  1708. align-items: center;
  1709. padding: 0px 24upx;
  1710. }
  1711. .anount {
  1712. color: #00DD9A;
  1713. font-weight: bold;
  1714. }
  1715. .anounts {
  1716. width: 80%;
  1717. height: 64rpx;
  1718. color: #333333;
  1719. font-size: 24upx;
  1720. }
  1721. </style>