diff --git a/api/model/index-lzx.js b/api/model/index-lzx.js index 7ffe6df..60d36fa 100644 --- a/api/model/index-lzx.js +++ b/api/model/index-lzx.js @@ -59,6 +59,22 @@ 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, + }, } export default api \ No newline at end of file diff --git a/pages_order/work/workDetail.vue b/pages_order/work/workDetail.vue index e4f5232..7b8f34d 100644 --- a/pages_order/work/workDetail.vue +++ b/pages_order/work/workDetail.vue @@ -63,14 +63,28 @@ 职位详情 - + 收藏 + + + + + + 已收藏 + @@ -119,7 +133,7 @@ - 推荐职位19 + 推荐职位{{total}} { if(res.code == 200){ this.detail = res.result.jobInfo - this.collectionFlag = res.result.collectionFlag + this.collectionFlag = res.result.CollectionFlage this.personInfo = res.result.personInfo this.companyInfo = res.result.companyInfo this.hanHaiMember = res.result.hanHaiMember } }) }, + addJobCollection(){ + let data = { + jobId : this.id + } + if(uni.getStorageSync('token')){ + data.token = uni.getStorageSync('token') + } + this.$api('addJobCollection', data, res => { + if(res.code == 200){ + uni.showToast({ + title: res.message, + icon: 'none' + }) + } + }) + this.getDetail(); + } } }