records.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416
  1. <template>
  2. <view>
  3. <view class="gwList flex justify-center" v-if="dataList.length>0">
  4. <view class="gwList-box">
  5. <view class="gwList-box-item flex justify-center" @click="gotoInfo(item.postPushId)"
  6. v-for="(item,index) in dataList" :key="index">
  7. <view class="gwList-box-item-box">
  8. <view v-if="item" class="gwList-box-item-box-title flex justify-between align-center">
  9. <text>{{item.stationName}}</text>
  10. <text>{{item.salaryRange}}</text>
  11. </view>
  12. <view class="gwList-box-item-box-label flex align-center flex-wrap">
  13. <text
  14. style="color: #666666;font-size: 26rpx;padding: 10rpx 25rpx 10rpx 25rpx;background-color: #F6F6F6;border-radius: 8rpx;margin-right: 20rpx;margin-bottom: 20rpx;"
  15. v-for="(ite,ind) in item.positionWelfare" :key="ind">{{ite}}</text>
  16. </view>
  17. <block v-if="title=='我的收藏'">
  18. <view class="gwList-box-item-box-name flex justify-between align-center">
  19. <text>{{item.companyName?item.companyName:'匿名公司'}}</text>
  20. <text v-if="item.companyPeople">{{item.companyPeople}}</text>
  21. </view>
  22. <view class="gwList-box-item-box-line"></view>
  23. <view class="gwList-box-item-box-info flex justify-between align-center">
  24. <view class="gwList-box-item-box-info-l flex align-center">
  25. <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
  26. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  27. mode=""></image>
  28. <text v-if="item.companyLegalPerson">{{item.companyLegalPerson}}·创始人</text>
  29. </view>
  30. <view class="gwList-box-item-box-info-r">
  31. {{item.county}}
  32. {{item.address}}
  33. </view>
  34. </view>
  35. </block>
  36. <block v-else-if="title=='浏览记录'">
  37. <view class="gwList-box-item-box-name flex justify-between align-center">
  38. <text>{{item.companyName?item.companyName:'匿名公司'}}</text>
  39. <text>{{item.companyPeople?item.companyPeople:0}}</text>
  40. </view>
  41. <view class="gwList-box-item-box-line"></view>
  42. <view class="gwList-box-item-box-info flex justify-between align-center">
  43. <view class="gwList-box-item-box-info-l flex align-center">
  44. <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
  45. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  46. mode=""></image>
  47. <text v-if="item.companyLegalPerson">{{item.companyLegalPerson}}·创始人</text>
  48. </view>
  49. <view class="gwList-box-item-box-info-r">
  50. {{item.county}}
  51. {{item.address}}
  52. </view>
  53. </view>
  54. </block>
  55. <block v-else>
  56. <view class="gwList-box-item-box-name flex justify-between align-center">
  57. <text>{{item.companyName?item.companyName:'匿名公司'}}</text>
  58. <text v-if="item.companyPeople">{{item.companyPeople}}</text>
  59. </view>
  60. <view class="gwList-box-item-box-line"></view>
  61. <view class="gwList-box-item-box-info flex justify-between align-center">
  62. <view class="gwList-box-item-box-info-l flex align-center">
  63. <image :src="item.companyLogo?item.companyLogo:'../../static/logo.png'"
  64. style="width: 58rpx;height: 58rpx;border-radius: 50%;margin-right: 20rpx;"
  65. mode=""></image>
  66. <text v-if="item.companyLegalPerson">{{item.companyLegalPerson}}·创始人</text>
  67. </view>
  68. <view class="gwList-box-item-box-info-r">
  69. {{item.county}}
  70. {{item.address}}
  71. </view>
  72. </view>
  73. </block>
  74. </view>
  75. </view>
  76. </view>
  77. </view>
  78. <!-- 暂无数据 -->
  79. <view class="gwList" v-else>
  80. <empty />
  81. </view>
  82. <!-- 筛选悬浮 -->
  83. <view class="filterSe" @click="goScreen()">
  84. <image src="../../static/images/my/filterSe.png" mode=""></image>
  85. </view>
  86. </view>
  87. </template>
  88. <script>
  89. import empty from '../../components/empty.vue'
  90. export default {
  91. components: {
  92. empty
  93. },
  94. data() {
  95. return {
  96. dataList: [],
  97. page: 1,
  98. limit: 10,
  99. pages: '',
  100. title: '',
  101. filter: {
  102. education: '', //学历
  103. salaryRange: '', //薪资
  104. experience: '', //经验
  105. companyPeople: '', //公司规模
  106. industry: '', //行业
  107. }
  108. };
  109. },
  110. onLoad(option) {
  111. uni.setNavigationBarTitle({
  112. title: option.title
  113. })
  114. uni.showLoading({
  115. title: '加载中'
  116. })
  117. this.title = option.title
  118. if (option.title == '我的收藏') {
  119. this.getMyCollectionList()
  120. } else if (option.title == '浏览记录') {
  121. this.getDataList()
  122. } else {
  123. this.getDataLists()
  124. }
  125. },
  126. onUnload() {
  127. uni.removeStorageSync('browse')
  128. },
  129. watch: {
  130. filter: {
  131. handler() {
  132. this.page = 1
  133. if (this.title == '我的收藏') {
  134. this.getMyCollectionList()
  135. } else if (this.title == '浏览记录') {
  136. this.getDataList()
  137. } else {
  138. this.getDataLists()
  139. }
  140. },
  141. deep: true,
  142. immediate: true
  143. }
  144. },
  145. onShow() {
  146. if (uni.getStorageSync('browse') && (uni.getStorageSync('browse')).length > 0) {
  147. let browse = uni.getStorageSync('browse')
  148. console.log(browse, '2222222222')
  149. browse.map(item => {
  150. let arr = []
  151. item.list.map(ite => {
  152. if (ite.value != '不限') {
  153. arr.push(ite.value)
  154. }
  155. })
  156. switch (item.name) {
  157. case '学历':
  158. this.filter.education = arr.join(',')
  159. break;
  160. case '薪资':
  161. this.filter.salaryRange = arr.join(',')
  162. break;
  163. case '经验':
  164. this.filter.experience = arr.join(',')
  165. break;
  166. case '公司规模':
  167. this.filter.companyPeople = arr.join(',')
  168. break;
  169. case '行业':
  170. this.filter.industry = arr.join(',')
  171. break;
  172. }
  173. })
  174. } else {
  175. this.filter.education = '' //学历
  176. this.filter.experience = '' //经验
  177. this.filter.industry = '' //行业
  178. this.filter.salaryRange = '' //薪资
  179. this.filter.companyPeople = '' //公司规模
  180. }
  181. },
  182. onReachBottom() {
  183. if (this.page < this.pages) {
  184. this.page += 1
  185. if (this.title == '我的收藏') {
  186. this.getMyCollectionList()
  187. } else if (this.title == '浏览记录') {
  188. this.getDataList()
  189. } else {
  190. this.getDataLists()
  191. }
  192. }
  193. },
  194. onPullDownRefresh() {
  195. this.page = 1
  196. if (this.title == '我的收藏') {
  197. this.getMyCollectionList()
  198. } else if (this.title == '浏览记录') {
  199. this.getDataList()
  200. } else {
  201. this.getDataLists()
  202. }
  203. },
  204. methods: {
  205. // 去筛选
  206. goScreen() {
  207. uni.navigateTo({
  208. url: '/package/screen/screen?isBrowse=1'
  209. })
  210. },
  211. /**
  212. * 我的收藏记录列表
  213. */
  214. getMyCollectionList() {
  215. let data = {
  216. page: this.page,
  217. limit: this.limit,
  218. education: this.filter.education, //学历
  219. salaryRange: this.filter.salaryRange, //薪资
  220. experience: this.filter.experience, //经验
  221. companyPeople: this.filter.companyPeople, //公司规模
  222. industry: this.filter.industry, //行业
  223. }
  224. this.$Request.getT('/app/myCollection/getMyCollectionListV2', data).then(res => {
  225. uni.stopPullDownRefresh()
  226. uni.hideLoading()
  227. if (res.code == 0) {
  228. res.data.records.map(item => {
  229. if (item.positionWelfare) {
  230. item.positionWelfare = item.positionWelfare.split(',')
  231. }
  232. })
  233. this.pages = res.data.pages
  234. if (this.page == 1) {
  235. this.dataList = res.data.records
  236. } else {
  237. this.dataList = [...this.dataList, ...res.data.records]
  238. }
  239. }
  240. })
  241. },
  242. gotoInfo(postPushId) {
  243. if (!postPushId) {
  244. uni.showToast({
  245. title: '岗位不存在',
  246. icon: 'none'
  247. })
  248. return
  249. }
  250. uni.navigateTo({
  251. url: '/pages/index/game/order?postPushId=' + postPushId
  252. })
  253. },
  254. getDataLists() {
  255. let data = {
  256. page: this.page,
  257. limit: this.limit,
  258. userId: uni.getStorageSync('userId'),
  259. education: this.filter.education, //学历
  260. salaryRange: this.filter.salaryRange, //薪资
  261. experience: this.filter.experience, //经验
  262. companyPeople: this.filter.companyPeople, //公司规模
  263. industry: this.filter.industry, //行业
  264. }
  265. this.$Request.getT('/app/sendRecord/getMyRecordListV2', data).then(res => {
  266. uni.stopPullDownRefresh()
  267. uni.hideLoading()
  268. if (res.code == 0) {
  269. res.data.records.map(item => {
  270. if (item.positionWelfare) {
  271. item.positionWelfare = item.positionWelfare.split(',')
  272. }
  273. })
  274. this.pages = res.data.pages
  275. if (this.page == 1) {
  276. this.dataList = res.data.records
  277. } else {
  278. this.dataList = [...this.dataList, ...res.data.records]
  279. }
  280. }
  281. })
  282. },
  283. getDataList() {
  284. let data = {
  285. page: this.page,
  286. limit: this.limit,
  287. education: this.filter.education, //学历
  288. salaryRange: this.filter.salaryRange, //薪资
  289. experience: this.filter.experience, //经验
  290. companyPeople: this.filter.companyPeople, //公司规模
  291. industry: this.filter.industry, //行业
  292. // browseType:1
  293. }
  294. this.$Request.getT('/app/userBrowse/selectMyBrowseV2', data).then(res => {
  295. uni.stopPullDownRefresh()
  296. uni.hideLoading()
  297. if (res.code == 0) {
  298. res.data.records.map(item => {
  299. if (item.positionWelfare) {
  300. item.positionWelfare = item.positionWelfare.split(',')
  301. } else {
  302. item.positionWelfare = []
  303. }
  304. })
  305. this.pages = res.data.pages
  306. if (this.page == 1) {
  307. this.dataList = res.data.records
  308. } else {
  309. this.dataList = [...this.dataList, ...res.data.records]
  310. }
  311. }
  312. })
  313. },
  314. },
  315. }
  316. </script>
  317. <style lang="scss">
  318. page {
  319. background: #F2F2F7;
  320. }
  321. .filterSe {
  322. position: fixed;
  323. bottom: 10vh;
  324. right: 30rpx;
  325. image {
  326. width: 100rpx;
  327. height: 100rpx;
  328. // border-radius: 50%;
  329. }
  330. }
  331. .gwList {
  332. width: 100%;
  333. .gwList-box {
  334. width: 686rpx;
  335. height: 100%;
  336. .gwList-box-item {
  337. width: 100%;
  338. // height: 329rpx;
  339. background-color: #ffffff;
  340. border-radius: 24rpx;
  341. margin-bottom: 20rpx;
  342. padding-bottom: 20rpx;
  343. margin-top: 20rpx;
  344. }
  345. .gwList-box-item-box {
  346. width: 623rpx;
  347. height: 100%;
  348. .gwList-box-item-box-title {
  349. margin-top: 30rpx;
  350. text:nth-of-type(1) {
  351. color: #1F1F1F;
  352. font-size: 38rpx;
  353. font-weight: 800;
  354. }
  355. text:nth-of-type(2) {
  356. color: #00B88F;
  357. font-size: 38rpx;
  358. font-weight: bold;
  359. }
  360. }
  361. .gwList-box-item-box-label {
  362. margin-top: 30rpx;
  363. }
  364. .gwList-box-item-box-name {
  365. margin-top: 24rpx;
  366. color: #999999;
  367. font-size: 28rpx;
  368. font-weight: 500;
  369. text:nth-of-type(1) {
  370. width: 450rpx;
  371. }
  372. }
  373. .gwList-box-item-box-line {
  374. width: 100%;
  375. border: 1rpx solid #E6E6E6;
  376. margin-top: 30rpx;
  377. margin-bottom: 20rpx;
  378. }
  379. .gwList-box-item-box-info {
  380. font-size: 26rpx;
  381. .gwList-box-item-box-info-l {
  382. color: #1A1A1A;
  383. }
  384. .gwList-box-item-box-info-r {
  385. color: #999999;
  386. max-width: 340rpx;
  387. }
  388. }
  389. }
  390. }
  391. }
  392. </style>