diff --git a/api/userrecruit.js b/api/userrecruit.js new file mode 100644 index 0000000..7a79419 --- /dev/null +++ b/api/userrecruit.js @@ -0,0 +1,40 @@ +import { + request +} from '@/untils/AxiosUtils.js'; +import { + getStore +} from '@/untils/store.js' +function getHeader() { + const platformId = getStore({ + name: 'platformId' + }) + if (platformId) { + return { + 'Platform-Id': platformId + } + } else { + return {} + } +} +/*首页 最新任务(10条)*/ +export const getPushListByUserId = (params) => { + return request({ + url: '/api/jobslink-api/user/userrecruit/getPushListByUserId', + headers: getHeader(), + method: 'get', + params + + }) +} + +/*岗位详情*/ +// workDetail +export const userrecruitDetail = (workId) => { + return request({ + url: '/api/jobslink-api/user/userrecruit/getWorksInfoByWorkId', + method: 'get', + params: { + workId + } + }) +} \ No newline at end of file diff --git a/components/companyList/applyList.vue b/components/companyList/applyList.vue index 78f8671..8bae6c1 100644 --- a/components/companyList/applyList.vue +++ b/components/companyList/applyList.vue @@ -23,6 +23,7 @@ + diff --git a/components/companyList/collectionList.vue b/components/companyList/collectionList.vue index 78f8671..d354559 100644 --- a/components/companyList/collectionList.vue +++ b/components/companyList/collectionList.vue @@ -23,6 +23,7 @@ + @@ -85,7 +86,11 @@ export default { }, computed: { skillNames() { - return this.companyitem.skillNames.split(',') + if(this.companyitem.skillNames) { + return this.companyitem.skillNames?.split(',') + } else { + return [] + } } }, methods: { diff --git a/pages.json b/pages.json index e9969ad..c6304b6 100644 --- a/pages.json +++ b/pages.json @@ -31,6 +31,12 @@ "navigationBarTitleText" : "岗位详情", "navigationBarBackgroundColor" : "#FFFFFF" } + },{ + "path" : "pages/projectInfo/userrecruitInfo", + "style" : { + "navigationBarTitleText" : "招工详情", + "navigationBarBackgroundColor" : "#FFFFFF" + } }, { "path" : "pages/projectInfo/signContract", diff --git a/pages/project/project.vue b/pages/project/project.vue index 2efa249..1d08393 100644 --- a/pages/project/project.vue +++ b/pages/project/project.vue @@ -3,7 +3,7 @@ 搜 索 - + @@ -64,28 +64,35 @@ + + + + + + + + + + + + + + 暂无信息 + + + - - + @@ -98,12 +105,14 @@ import vTabs from '@/components/v-tabs/v-tabs.vue'; import testData from '@/common/textdata.js'; import companyList from '@/components/companyList/companyList.vue'; import workList from '@/components/companyList/workList.vue' +import userrecruitList from './userrecruitList.vue' import { newMissionAll, recommendMission, nearMission } from '@/api/mission.js'; import {getPolicyContent} from '@/api/newIndex.js' +import {getPushListByUserId } from '@/api/userrecruit.js' import { getcoder } from "@/api/map.js"; @@ -114,7 +123,8 @@ export default { vTabs, companyList, verticalMenu, - workList + workList, + userrecruitList }, data() { @@ -140,6 +150,11 @@ export default { size: 10, total: 0 }, + policyPage: { + current: 1, + size: 10, + total: 0 + }, currentAddress: '', currentPoint: { latitude: 0, @@ -149,7 +164,7 @@ export default { open: false, showPopUp: false, - nonReactiveArray: ["推荐任务", "推荐岗位", "推荐政策"], + nonReactiveArray: ["推荐任务", "推荐岗位", "推荐招工"], } }, onLoad: function () { @@ -251,9 +266,32 @@ export default { }) }, getPolicy(){ - getPolicyContent(1).then(res=>{ - this.policyContentList=res.data.data.records - }) + let params = { + current: this.policyPage.current, + size: this.policyPage.size, + } + getPushListByUserId(params).then((res) => { + if(res.data.code === 200 ){ + const {records, current, total, size } = res.data.data + console.log('个人招工', records, current, total, size) + if(!records.length) { + return uni.showToast({ + icon: "none", + title: '没有更多了', + }) + } + if(current === 1) { + this.policyContentList = records + } else { + this.policyContentList = this.policyContentList.concat(records); + } + this.policyPage.current = current + 1; + this.policyPage.total = total; + } + }) + // getPolicyContent(1).then(res=>{ + // this.policyContentList=res.data.data.records + // }) }, changeTab: function (e) { this.activeTab = e; @@ -306,10 +344,10 @@ export default { if (this.newPage.current === 1) { this.newList = []; } - this.newPage.current += 1; this.newPage.total = res.data.data.total; if (res.data.data && res.data.data.records.length) { this.newList = this.newList.concat(res.data.data.records); + this.newPage.current += 1; } }) }, @@ -317,7 +355,8 @@ export default { upLoad: function () { if (this.activeTab === 0) { if (this.nearPage.current <= Math.ceil(this.nearPage.total / this.nearPage.size)) { - this.getNearList(this.currentPoint); + // this.getNearList(this.currentPoint); + this.getNewList(); } else { uni.showToast({ icon: "none", @@ -338,22 +377,16 @@ export default { return } if (this.activeTab === 2) { - if (this.newPage.current <= Math.ceil(this.newPage.total / this.newPage.size)) { - this.getNewList(); - } else { - uni.showToast({ - icon: "none", - title: '已经是最后一页', - }) - } - return + this.getPolicy() } }, //下拉刷新 download: function () { if (this.activeTab === 0) { this.nearPage.current = 1; + this.newPage.current = 1; this.getLocation(); + this.getNewList(); setTimeout(function () { uni.stopPullDownRefresh(); }, 1000); @@ -368,8 +401,8 @@ export default { return } if (this.activeTab === 2) { - this.newPage.current = 1; - this.getNewList(); + this.policyPage.current = 1; + this.getPolicy() setTimeout(function () { uni.stopPullDownRefresh(); }, 1000); diff --git a/pages/project/userrecruitList.vue b/pages/project/userrecruitList.vue new file mode 100644 index 0000000..17cf4eb --- /dev/null +++ b/pages/project/userrecruitList.vue @@ -0,0 +1,230 @@ + + + + + diff --git a/pages/projectInfo/userrecruitInfo.vue b/pages/projectInfo/userrecruitInfo.vue new file mode 100644 index 0000000..6a7e816 --- /dev/null +++ b/pages/projectInfo/userrecruitInfo.vue @@ -0,0 +1,571 @@ + + + + + diff --git a/pages/projectInfo/workInfo.vue b/pages/projectInfo/workInfo.vue index 8e929f8..57d408a 100644 --- a/pages/projectInfo/workInfo.vue +++ b/pages/projectInfo/workInfo.vue @@ -174,6 +174,7 @@ import {checkPass} from '@/api/auth.js'; import dictionary from '@/common/textdata.js'; import {dateFormat} from "../../untils/format.js"; + import {userrecruitDetail} from '@/api/userrecruit.js' import uniMask from '@/components/uni-mask/mask.vue' import validCode from '@/components/p-valid-code/p-valid-code.vue' export default { diff --git a/pages/seach/seach.vue b/pages/seach/seach.vue index 36319a6..de3c376 100644 --- a/pages/seach/seach.vue +++ b/pages/seach/seach.vue @@ -5,7 +5,7 @@ + placeholder="搜任务/搜岗位/搜政策/搜招工" /> 搜索