From 530f318fbd8f9c779ddd4fb701707d02e637002c Mon Sep 17 00:00:00 2001 From: huliyong <2783385703@qq.com> Date: Mon, 23 Dec 2024 23:38:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 45 +-- api/model/collect.js | 35 ++ api/model/index-lzx.js | 16 - api/model/resume.js | 10 + components/list/bossList/index.vue | 1 + components/list/userList/index.vue | 12 +- components/list/userList/userItem.vue | 19 +- components/list/userList/userListSwipe.vue | 7 +- components/list/workList/index.vue | 3 + components/list/workList/workItem.vue | 5 +- config.js | 2 +- manifest.json | 2 +- pages.json | 67 ++-- pages/index/consult.vue | 2 +- pages/index/index.vue | 24 +- pages_order/auth/certification.vue | 3 +- pages_order/mine/collect.vue | 3 + pages_order/mine/contactRecord.vue | 3 + pages_order/mine/releaseWork.vue | 2 + pages_order/mine/seeMy.vue | 5 +- pages_order/work/bossDetail.vue | 4 + pages_order/work/workDetail.vue | 381 ++++++++++------------ store/store.js | 4 +- uni_modules/uv-empty/components/uv-empty/props.js | 8 +- 24 files changed, 359 insertions(+), 304 deletions(-) create mode 100644 api/model/collect.js diff --git a/api/api.js b/api/api.js index d6fd825..cf4ea9a 100644 --- a/api/api.js +++ b/api/api.js @@ -9,6 +9,8 @@ const models = [ 'score', 'boss', 'login', 'vip', 'company', 'work','index-lzx', 'resume', 'config', 'examination', + 'collect', + 'contact', ] const config = { @@ -21,8 +23,6 @@ const config = { // getConfig : {url : '/api/getConfig', method : 'GET', limit : 500}, - - /** * 公共的接口 */ @@ -123,22 +123,7 @@ const config = { */ - //获取工作信息列表 - // employeeQueryJobList: { - // url: '/api/employee/queryJobListByAll', - // method: 'GET', - // }, - //根据Id查看工作详情 - // employeeQueryJobById: { - // url: '/api/employee/queryJobById', - // method: 'GET', - // }, - //我的收藏 - employeeQueryCollectionJobList: { - url: '/api/employee/queryJobCollectionList', - method: 'GET', - auth: true, - }, + //我的找活 employeeQueryResumeByUserId: { url: '/api/employee/queryResumeByUserId', @@ -161,36 +146,12 @@ const config = { /** * boss的接口 */ - //获取简历列表 - bossQueryJobList: { - url: '/employ/resume/queryResumeList', - method: 'GET', - }, - //根据Id查看简历详情 - bossQueryResumeById: { - url: '/employ/resume/queryResumeById', - method: 'GET', - }, //电子合同-获取电子合同列表 bossQueryContractList: { url: '/api/boss/queryContractList', method: 'GET', auth: true, }, - //我的收藏 - bossQueryCollectionJobList: { - url: '/api/boss/queryJobCollectionList', - method: 'GET', - auth: true, - }, - //我的招工 - // bossQueryJobListByUserId: { - // url: '/api/boss/queryJobListByUserId', - // method: 'GET', - // auth: true, - // }, - - } diff --git a/api/model/collect.js b/api/model/collect.js new file mode 100644 index 0000000..a8e613e --- /dev/null +++ b/api/model/collect.js @@ -0,0 +1,35 @@ + +// 收藏相关接口 + +const api = { + //我的收藏-添加简历收藏 + addResumeCollection: { + url: '/employ/collection/addResumeCollection', + method: 'POST', + auth: true, + limit : 500, + showLoading : true, + }, + //我的收藏-添加工作收藏 + addJobCollection: { + url: '/employ/collection/addJobCollection', + method: 'POST', + auth: true, + limit : 500, + showLoading : true, + }, + //我的收藏工作 + employeeQueryCollectionJobList: { + url: '/employ/collection/queryJobCollectionList', + method: 'GET', + auth: true, + }, + //我的收藏,简历 + bossQueryCollectionJobList: { + url: '/employ/collection/queryResumeCollectionList', + method: 'GET', + auth: true, + }, +} + +export default api \ No newline at end of file diff --git a/api/model/index-lzx.js b/api/model/index-lzx.js index 0b59ffe..e4213fe 100644 --- a/api/model/index-lzx.js +++ b/api/model/index-lzx.js @@ -59,22 +59,6 @@ const api = { limit : 500, showLoading : true, }, - //我的收藏-添加简历收藏 - addResumeCollection: { - url: '/employ/collection/addResumeCollection', - method: 'POST', - auth: true, - limit : 500, - showLoading : true, - }, - //我的收藏-添加工作收藏 - addJobCollection: { - url: '/employ/collection/addJobCollection', - method: 'POST', - auth: true, - limit : 500, - showLoading : true, - }, //面对面分享 getInviteCode: { url: '/employ/share/getInviteCode', diff --git a/api/model/resume.js b/api/model/resume.js index 2d9bb01..641d887 100644 --- a/api/model/resume.js +++ b/api/model/resume.js @@ -15,6 +15,16 @@ const api = { method: 'GET', auth : true, }, + //获取简历列表 + bossQueryJobList: { + url: '/employ/resume/queryResumeList', + method: 'GET', + }, + //根据Id查看简历详情 + bossQueryResumeById: { + url: '/employ/resume/queryResumeById', + method: 'GET', + }, } export default api \ No newline at end of file diff --git a/components/list/bossList/index.vue b/components/list/bossList/index.vue index 16950f1..8825a64 100644 --- a/components/list/bossList/index.vue +++ b/components/list/bossList/index.vue @@ -45,6 +45,7 @@ } this.$api(this.api, this.queryParams, res => { + uni.stopPullDownRefresh() if(res.code == 200){ this.list = res.result.records || res.result this.total = res.result.total || res.result.length diff --git a/components/list/userList/index.vue b/components/list/userList/index.vue index fae743f..bac09a3 100644 --- a/components/list/userList/index.vue +++ b/components/list/userList/index.vue @@ -8,8 +8,13 @@ @click="$utils.navigateTo('/pages_order/work/userDetail?id=' + item.id)" :key="index" v-for="(item, index) in list"> - + + + @@ -28,7 +33,9 @@ default : 'bossQueryJobList' }, handleData : {}, - keyName : {} + keyName : { + default : '' + } }, data() { return { @@ -47,6 +54,7 @@ } this.$api(this.api, this.queryParams, res => { + uni.stopPullDownRefresh() if(res.code == 200){ this.list = res.result.records || res.result this.total = res.result.total || res.result.length diff --git a/components/list/userList/userItem.vue b/components/list/userList/userItem.vue index 2d420b6..fae8877 100644 --- a/components/list/userList/userItem.vue +++ b/components/list/userList/userItem.vue @@ -19,7 +19,7 @@ - {{ item.sex }} · {{ item.nation }} · {{ item.qualification }} · 应届生 + {{ sex || item.sex }} · {{ item.nation }} · {{ item.qualification }} @@ -44,7 +44,7 @@ - {{ $dayjs(item.createTime).format('YYYY-MM-DD') }} + {{ $dayjs(createTime || item.createTime).format('YYYY-MM-DD') }} @@ -59,7 +59,16 @@ props : { item : { default : {} - } + }, + createTime : { + default : '', + }, + image : { + default : '' + }, + sex : { + default : '' + }, }, data() { return { @@ -68,8 +77,8 @@ }, computed : { headImage(){ - return this.item.headImage || '/static/image/center/headImage.png' - } + return this.image || this.item.headImage || '/static/image/center/headImage.png' + }, }, methods: { diff --git a/components/list/userList/userListSwipe.vue b/components/list/userList/userListSwipe.vue index d182d8f..f933b94 100644 --- a/components/list/userList/userListSwipe.vue +++ b/components/list/userList/userListSwipe.vue @@ -8,7 +8,8 @@ - + @@ -34,7 +35,9 @@ list : { default : [] }, - keyName : {} + keyName : { + default : '' + }, }, data() { return { diff --git a/components/list/workList/index.vue b/components/list/workList/index.vue index cf8ae0b..32f3a3a 100644 --- a/components/list/workList/index.vue +++ b/components/list/workList/index.vue @@ -10,6 +10,8 @@ v-for="(item, index) in list"> + + @@ -57,6 +59,7 @@ } this.$api(this.api, queryParams, res => { + uni.stopPullDownRefresh() if(res.code == 200){ this.list = res.result.records this.total = res.result.total diff --git a/components/list/workList/workItem.vue b/components/list/workList/workItem.vue index 66fe5a6..66a5b8e 100644 --- a/components/list/workList/workItem.vue +++ b/components/list/workList/workItem.vue @@ -109,16 +109,19 @@ .bottom{ display: flex; justify-content: space-between; - align-items: flex-end; + align-items: center; font-size: 24rpx; + gap: 16rpx; .time{ color: #999999; + flex-shrink: 0; } .phone{ background-color: rgba($uni-color, 0.2); color: $uni-color; padding: 8rpx 16rpx; border-radius: 10rpx; + flex-shrink: 0; image{ width: 20rpx; height: 20rpx; diff --git a/config.js b/config.js index 03ac722..2ca1da3 100644 --- a/config.js +++ b/config.js @@ -7,7 +7,7 @@ import uvUI from '@/uni_modules/uv-ui-tools' Vue.use(uvUI); // 当前环境 -const type = 'prod' +const type = 'dev' // 环境配置 diff --git a/manifest.json b/manifest.json index 7bbb9fc..d653c7c 100644 --- a/manifest.json +++ b/manifest.json @@ -1,5 +1,5 @@ { - "name" : "特易招", + "name" : "unapp模板", "appid" : "__UNI__FCE26BB", "description" : "", "versionName" : "1.0.0", diff --git a/pages.json b/pages.json index 968ec2b..822dca1 100644 --- a/pages.json +++ b/pages.json @@ -2,26 +2,25 @@ "pages": [{ "path": "pages/index/index", "style": { - "navigationBarTitleText": "", - "navigationBarTextStyle": "white" + "navigationBarTextStyle": "white", + "enablePullDownRefresh": true } }, { "path": "pages/index/consult", "style": { - "navigationBarTitleText": "" + "enablePullDownRefresh": true } }, { "path": "pages/index/keepAccounts", "style": { - "navigationBarTitleText": "" + "enablePullDownRefresh": true } }, { "path": "pages/index/center", "style": { - "navigationBarTitleText": "", "navigationBarTextStyle": "white" } } @@ -53,68 +52,92 @@ "path": "mine/help" }, { - "path": "work/workDetail" + "path": "work/workDetail", + "style": { + "enablePullDownRefresh": true + } }, { - "path": "work/bossDetail" + "path": "work/bossDetail", + "style": { + "enablePullDownRefresh": true + } }, { "path": "mine/collect", "style": { - "navigationBarTitleText": "", + "enablePullDownRefresh": true, "navigationBarTextStyle": "white" } }, { "path": "mine/contactRecord", "style": { - "navigationBarTitleText": "", + "navigationBarTextStyle": "white" } }, { "path": "mine/releaseWork", "style": { - "navigationBarTitleText": "", + "navigationBarTextStyle": "white" } }, { "path": "mine/seeMy", "style": { - "navigationBarTitleText": "", + "enablePullDownRefresh": true, "navigationBarTextStyle": "white" } }, { - "path": "mine/contract" + "path": "mine/contract", + "style": { + "enablePullDownRefresh": true + } }, { "path": "mine/promotion" }, { - "path": "mine/IntegralRecord" + "path": "mine/IntegralRecord", + "style": { + "enablePullDownRefresh": true + } }, { - "path": "mine/MemberRecharge" + "path": "mine/MemberRecharge", + "style": { + "enablePullDownRefresh": true + } }, { "path": "mine/GainPoints" }, { - "path": "kepp/AnnualExpenditure" + "path": "kepp/AnnualExpenditure", + "style": { + "enablePullDownRefresh": true + } }, { "path": "kepp/MechanicProblem" }, { - "path": "work/workList" + "path": "work/workList", + "style": { + "enablePullDownRefresh": true + } }, { "path": "mine/setting" }, { - "path": "work/userDetail" + "path": "work/userDetail", + "style": { + "enablePullDownRefresh": true + } }, { "path": "auth/certification" @@ -123,7 +146,10 @@ "path": "work/jobPosting" }, { - "path": "kepp/keepAccountsDetail" + "path": "kepp/keepAccountsDetail", + "style": { + "enablePullDownRefresh": true + } }, { "path": "mine/InvitationCredit" @@ -141,7 +167,10 @@ "path": "mine/about" }, { - "path": "mine/redeemCode" + "path": "mine/redeemCode", + "style": { + "enablePullDownRefresh": true + } }, { "path": "kepp/addPriceEntryRecords" diff --git a/pages/index/consult.vue b/pages/index/consult.vue index 450eb89..2238882 100644 --- a/pages/index/consult.vue +++ b/pages/index/consult.vue @@ -75,9 +75,9 @@ margin: 30rpx; .image{ width: 200rpx; - min-height: 300rpx; border-radius: 20rpx; margin-right: 20rpx; + flex-shrink: 0; } .info{ .title{ diff --git a/pages/index/index.vue b/pages/index/index.vue index 9be488b..3c1d5ff 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -67,7 +67,7 @@ v-if="role" mode="widthFix"> - @@ -113,14 +113,13 @@ return { productList: [], keyword : '', - numInfo:{} + numInfo : {}, } }, onPullDownRefresh(){ - // this.$refs.videoList.queryVideoList() - // this.queryBannerList() + this.$refs.workList.getData() + this.$store.commit('getBanner') }, - // 页面显示的时候触发 onShow() { this.$refs.workList.getData() @@ -134,6 +133,9 @@ methods: { //获取个人中心基础信息的接口 getUserCenterData(){ + if(!uni.getStorageSync('token')){ + return + } this.$api('getUserCenterData',{}, res =>{ if(res.code == 200){ this.numInfo = res.result @@ -156,7 +158,17 @@ }, // 切换身份 switchIdentity(){ - this.$store.commit('setRole', !this.role) + uni.showModal({ + title: `确认切换到${ + this.role ? '师傅' : '雇主' + }身份吗?`, + success : e => { + this.$store.commit('setRole', !this.role) + this.$nextTick(() => { + this.$refs.workList.getData() + }) + } + }) }, } } diff --git a/pages_order/auth/certification.vue b/pages_order/auth/certification.vue index 9a71862..14d2dea 100644 --- a/pages_order/auth/certification.vue +++ b/pages_order/auth/certification.vue @@ -134,10 +134,11 @@ getAuthenticationPerson(){ this.$api('getAuthenticationPerson',{}, res =>{ if(res.code == 200){ - this.sub = res.result.status; this.form = res.result || {}; + this.sub = this.form.status || 0; + this.fileList = this.form.image ? this.form.image.split(',').map(url => { return { url diff --git a/pages_order/mine/collect.vue b/pages_order/mine/collect.vue index d38afa5..64eeaec 100644 --- a/pages_order/mine/collect.vue +++ b/pages_order/mine/collect.vue @@ -10,6 +10,7 @@ @@ -19,6 +20,8 @@ keyName="employJob" @clickSwipeAction="clickSwipeAction" :list="list"/> + + diff --git a/pages_order/mine/contactRecord.vue b/pages_order/mine/contactRecord.vue index 0426cb1..bd5dcc2 100644 --- a/pages_order/mine/contactRecord.vue +++ b/pages_order/mine/contactRecord.vue @@ -78,6 +78,9 @@ this.$refs.list.getData() }) }, + onPullDownRefresh(){ + this.$refs.list.getData() + }, onReachBottom() { this.$refs.list.loadMoreData() }, diff --git a/pages_order/mine/releaseWork.vue b/pages_order/mine/releaseWork.vue index 80973a8..1209b91 100644 --- a/pages_order/mine/releaseWork.vue +++ b/pages_order/mine/releaseWork.vue @@ -22,6 +22,8 @@ v-else @clickSwipeAction="clickSwipeAction" :list="list"/> + + diff --git a/pages_order/mine/seeMy.vue b/pages_order/mine/seeMy.vue index e81d73c..080fb80 100644 --- a/pages_order/mine/seeMy.vue +++ b/pages_order/mine/seeMy.vue @@ -10,7 +10,7 @@ - + @@ -67,6 +67,9 @@ onReachBottom() { this.$refs.list.loadMoreData() }, + onPullDownRefresh(){ + this.$refs.list.getData() + }, methods: { clickSwipeAction({e, item}){ console.log(e, item); diff --git a/pages_order/work/bossDetail.vue b/pages_order/work/bossDetail.vue index 1ee7400..06bf4a9 100644 --- a/pages_order/work/bossDetail.vue +++ b/pages_order/work/bossDetail.vue @@ -94,6 +94,9 @@ onShow() { this.getDetail() }, + onPullDownRefresh() { + this.getDetail() + }, methods: { getDetail(){ let data = { @@ -103,6 +106,7 @@ data.token = uni.getStorageSync('token') } this.$api('employeeQueryJobById', data, res => { + uni.stopPullDownRefresh() if(res.code == 200){ this.detail = res.result.jobInfo this.collectionFlag = res.result.collectionFlag diff --git a/pages_order/work/workDetail.vue b/pages_order/work/workDetail.vue index ad1d6cf..b7856d3 100644 --- a/pages_order/work/workDetail.vue +++ b/pages_order/work/workDetail.vue @@ -1,16 +1,16 @@ + \ No newline at end of file diff --git a/store/store.js b/store/store.js index 80eedec..4b79787 100644 --- a/store/store.js +++ b/store/store.js @@ -10,12 +10,12 @@ const store = new Vuex.Store({ state: { configList: {}, //配置列表 // 角色 true为老板 false为工人 - role : false, + role : true, userInfo : {}, //用户信息 banner : [],//轮播图 jobTypeList : [],//工种 natureList : [],//工作性质 - addressList : [],//开放地址 + addressList : [],//开放地址 }, getters: { }, diff --git a/uni_modules/uv-empty/components/uv-empty/props.js b/uni_modules/uv-empty/components/uv-empty/props.js index 26c282d..27a21a8 100644 --- a/uni_modules/uv-empty/components/uv-empty/props.js +++ b/uni_modules/uv-empty/components/uv-empty/props.js @@ -18,7 +18,7 @@ export default { // 文字大小 textSize: { type: [String, Number], - default: 14 + default: 28 }, // 图标的颜色 iconColor: { @@ -28,7 +28,7 @@ export default { // 图标的大小 iconSize: { type: [String, Number], - default: 90 + default: 180 }, // 选择预置的图标类型 mode: { @@ -38,12 +38,12 @@ export default { // 图标宽度,单位px width: { type: [String, Number], - default: 160 + default: 320 }, // 图标高度,单位px height: { type: [String, Number], - default: 160 + default: 320 }, // 是否显示组件 show: {