diff --git a/root/detail/userShare.vue b/root/detail/userShare.vue index b76c5f2..78e9667 100644 --- a/root/detail/userShare.vue +++ b/root/detail/userShare.vue @@ -22,7 +22,7 @@ {{ info.agencyName || info.fullName || "-" }} -
+
@@ -48,29 +48,29 @@
-
+
-
+
+
-->
-
+
-
+
-
+
-
+
@@ -81,34 +81,19 @@
-
+
-
+
- -
- -
-
- +
+
-
-
-
-
不让他看我的职位
-
- -
-
-
-
删除粉丝
-
@@ -148,8 +133,6 @@ export default { isLogin: null, submitConfirm: false, pageSpeed: 0, - isShowMore: true, - isShowJob: true, agencyId: 0, loading: true, keyword: '', // 搜索内容 @@ -188,7 +171,6 @@ export default { num: 250, }, ], - mLook: false, from: '', jobDetailShow: true, loginInfo: {}, @@ -219,7 +201,6 @@ export default { }, disabled: false, inviteUserId: 0, - beFllowAgencyInfo: {}, } }, onPageScroll(e) { @@ -245,14 +226,12 @@ export default { this.uid = options.id } this.type = options.type ? options.type : '' - this.isShowMore = options.isShowMore - this.isShowJob = options.isShowJob this.jobDetailShow = options.jobDetailShow || true this.from = options.shareForm if (options.bindid) { this.bindid = options.bindid } - this.getDetail() + // this.getDetail() }, onShow() { let that = this @@ -274,16 +253,16 @@ export default { // } else { // } }, - onReachBottom() { - let that = this - this.G.isLogin() - if (this.G.isLogin()) { - if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) { - that.query.page++ - that.getList('concat') - } - } - }, + // onReachBottom() { + // let that = this + // this.G.isLogin() + // if (this.G.isLogin()) { + // if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) { + // that.query.page++ + // that.getList('concat') + // } + // } + // }, methods: { goHome() { uni.switchTab({ @@ -307,6 +286,7 @@ export default { }, getDetail() { let that = this + // 123123 // this.G.isLogin(); // if (this.G.isLogin()) { that.pageSpeed = 0 @@ -329,7 +309,6 @@ export default { that.isShowMore = false } that.agencyId = res.agencyId - that.mLook = that.info.himSee == 1 ? false : true that.numSlot = [ { name: '总职位', @@ -355,6 +334,7 @@ export default { }, goDetailUser() { let that = this + return false this.G.isLogin() if (this.G.isLogin()) { if (this.info.recordStatus == 1 || this.info.recordStatus == 2) { @@ -379,6 +359,63 @@ export default { } } }, + setJobList(recordList, $type) { + let that = this + that.query.isFinish = recordList.length + recordList = that.G.toGetAddressv3(recordList) + recordList = that.G.toGetAge(recordList) + recordList = that.G.yijobCopy(recordList) + if ($type == 'init') { + that.query.list = [] + that.query.list = + recordList.length > 0 + ? recordList.map((item, index) => { + return { + ...item, + title: item.jobName, + address: item.district + item.age, + price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), + fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), + cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : '月薪', + gender: that.G.getGenderByMinAge(item), + logo: item.agencyLogo, + time: that.G.setDeadLine(item.updateTime, 'jiaofu'), + leafCateId: item.id, + // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), + serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), + recruitmentSwitch: item.recruitment == 1 ? true : false, + recruitmentImage: item.recruitment, + isToday: item.today == 0 ? false : true, + active: 0, + } + }) + : [] + } else { + that.query.list = that.query.list.concat( + recordList.length > 0 + ? recordList.map((item, index) => { + return { + ...item, + title: item.jobName, + address: item.district + item.age, + price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), + fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), + gender: that.G.getGenderByMinAge(item), + logo: item.agencyLogo, + time: that.G.setDeadLine(item.updateTime, 'jiaofu'), + leafCateId: item.id, + // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), + serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), + recruitmentSwitch: item.recruitment == 1 ? true : false, + recruitmentImage: item.recruitment, + isToday: item.today == 0 ? false : true, + active: 0, + } + }) + : [] + ) + } + }, getDefault($type) { let that = this console.log('$type', $type) @@ -390,7 +427,6 @@ export default { pageNum: that.query.page, pageSize: that.query.size, agencyId: that.agencyId, - keys: that.keyword, }, (res) => { console.log('resresresresresres', res) @@ -400,144 +436,12 @@ export default { that.loading = true } that.speed = res.recordCount - that.query.isFinish = res.recordList.length - res.recordList = that.G.toGetAddressv3(res.recordList) - res.recordList = that.G.toGetAge(res.recordList) - res.recordList = that.G.yijobCopy(res.recordList) - if ($type == 'init') { - that.query.list = [] - that.query.list = - res.recordList.length > 0 - ? res.recordList.map((item, index) => { - return { - ...item, - title: item.jobName, - address: item.district + item.age, - price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), - fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), - cus_price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValueHtml(item.salaryClassify, item.salaryClassifyValue) : '月薪', - gender: that.G.getGenderByMinAge(item), - logo: item.agencyLogo, - time: that.G.setDeadLine(item.updateTime, 'jiaofu'), - leafCateId: item.id, - // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), - serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - recruitmentSwitch: item.recruitment == 1 ? true : false, - recruitmentImage: item.recruitment, - isToday: item.today == 0 ? false : true, - active: 0, - } - }) - : [] - } else { - that.query.list = that.query.list.concat( - res.recordList.length > 0 - ? res.recordList.map((item, index) => { - return { - ...item, - title: item.jobName, - address: item.district + item.age, - price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), - fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), - gender: that.G.getGenderByMinAge(item), - logo: item.agencyLogo, - time: that.G.setDeadLine(item.updateTime, 'jiaofu'), - leafCateId: item.id, - // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), - serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - recruitmentSwitch: item.recruitment == 1 ? true : false, - recruitmentImage: item.recruitment, - isToday: item.today == 0 ? false : true, - active: 0, - } - }) - : [] - ) - } + that.setJobList(res.recordList, $type) console.log('query.list', that.query.list) } ) } }, - getHot($type) { - let that = this - this.G.isLogin() - if (this.G.isLogin()) { - that.G.Post( - that.api.job_hotList + '/' + that.agencyId, - { - pageNum: that.query.page, - pageSize: that.query.size, - agencyId: that.agencyId, - keys: '', - }, - (res) => { - console.log('推荐列表:', res) - if (res.length == 0) { - that.loading = false - } else { - that.loading = true - } - that.speed = res.length - that.query.isFinish = res.length - res = that.G.toGetAddressv3(res) - res = that.G.toGetAge(res) - res = that.G.yijobCopy(res) - if ($type == 'init') { - that.query.list = [] - that.query.list = - res.length > 0 - ? res.map((item, index) => { - return { - ...item, - title: item.jobName, - address: item.district + item.age, - price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), - fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), - gender: that.G.getGenderByMinAge(item), - logo: item.agencyLogo, - time: that.G.setDeadLine(item.updateTime, 'jiaofu'), - leafCateId: item.id, - // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), - serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - agencyId: item.agencyId, - recruitmentSwitch: item.recruitment == 1 ? true : false, - recruitmentImage: item.recruitment, - teamType: item.teamType, - creatorName: item.creatorName, - isToday: item.isToday, - active: 0, - } - }) - : [] - } else { - that.query.list = that.query.list.concat( - res.length > 0 - ? res.map((item, index) => { - return { - ...item, - title: item.jobName, - address: item.district + item.age, - price: item.salaryClassify != 7 ? that.G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : that.G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), - fuWuFei: that.G.setReturnFee(item.returnFee, item.returnFeeType), - gender: that.G.getGenderByMinAge(item), - logo: item.agencyLogo, - time: that.G.setDeadLine(item.updateTime, 'jiaofu'), - leafCateId: item.id, - // serverPrice: that.G.setReturnFee(item.returnFee, item.returnFeeType), - serverPrice: that.G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - recruitmentSwitch: item.recruitment == 1 ? true : false, - recruitmentImage: item.recruitment, - active: 0, - } - }) - : [] - ) - } - } - ) - } - }, checkLength(e) { if (e.length == 0) { this.keyword = '' @@ -546,43 +450,18 @@ export default { }, getList($type = 'init') { let that = this + return this.G.isLogin() if (this.G.isLogin()) { if (this.info.recordStatus == 1 || this.info.recordStatus == 2) { that.getDefault($type) - } else { - that.getHot($type) - } - } else { - that.getHot($type) - } - }, - goMore() { - let that = this, - str = '' - this.G.isLogin() - if (this.G.isLogin()) { - if (that.info.supplierAccount == 1) { - if (that.isShowMore == 'true') { - if (that.info.recordStatus == 2) { - str = 3 - } else { - str = that.info.up - } - console.log('that.type', that.type) - uni.navigateTo({ - url: '/root/bind/more?delta=2&id=' + that.agencyId + '&himSee=' + that.info.himSee + '&lookHim=' + that.info.lookHim + '&type=' + str + '&from=' + that.type + '&lid=' + that.info.lookHimOperateId + '&hid=' + that.info.himSeeOperateId, - }) - } } } }, goDetailJob($item) { let that = this - console.log('that.isSelf1', that.isSelf) - + return false this.G.isLogin() - console.log('that.isSelf2', that.isSelf) if (this.G.isLogin()) { if (that.isSelf) { uni.navigateTo({ @@ -673,34 +552,6 @@ export default { this.submitConfirm = true return - uni.showModal({ - title: '关注发单号', - content: '关注发单号后,您可以查看该账号职位的更新,确定要关注吗?', - confirmColor: '#576B95', - success(modalRes) { - if (modalRes.confirm) { - that.G.Get( - that.api.bind_subscribeSubmit + '/' + that.info.agencyId, - { - agencyId: that.agencyId, - source: _code, - remark: '', - }, - (res) => { - uni.showToast({ - title: '提交成功', - }) - setTimeout(() => { - that.getDetail() - }, 800) - } - ) - } else if (modalRes.cancel) { - console.log('用户点击取消') - } - }, - fail() {}, - }) } }, @@ -723,73 +574,41 @@ export default { ) } }, - goReturn() { - let that = this - this.G.isLogin() - if (this.G.isLogin()) { - that.G.handleConfirm({ - content: '确认删除粉丝吗?', - success: (res) => { - if (res.confirm) { - that.G.Get( - that.api.bind_delApply + '/' + that.agencyId, - { - agencyId: that.agencyId, - }, - () => { - uni.showToast({ - icon: 'success', - title: '删除粉丝成功', - }) - setTimeout(() => { - uni.navigateBack() - }, 1500) - } - ) - } - }, - }) - } - }, - handleCancel() { - let that = this - this.G.isLogin() - if (this.G.isLogin()) { - that.G.handleConfirm({ - content: '是否取消关注该发单号?', - success: (res) => { - if (res.confirm) { - that.G.Get( - that.api.bind_cancelApply + '/' + that.agencyId, - { - agencyId: that.agencyId, - }, - () => { - uni.showToast({ - icon: 'success', - title: '取消关注成功', - }) - setTimeout(() => { - that.getDetail() - that.getList() - }, 1500) - } - ) - } - }, - }) - } - }, getAgencyById() { let that = this return new Promise((reso, reject) => { this.G.Get(this.api.order_getAgencyByIdForApply, { agencyId: that.uid, inviteUserId: this.inviteUserId }, (res) => { console.log('resresresresresres++++++++++++++', res) - that.beFllowAgencyInfo = res + that.pageSpeed = 1 + that.info = res + that.agencyId = res.id + that.speed = res.jobList.length + + that.setJobList(res.jobList) if (res.id == that.agencyInfo.id) { that.isSelf = true } + that.numSlot = [ + { + name: '总职位', + num: that.info.jobNum, + }, + { + name: '在招', + num: that.info.recruitmentJobNum, + }, + { + name: '关注', + num: that.info.himSee, + }, + { + name: '粉丝', + num: that.info.downNum, + }, + ] + // that.getList() + reso() }) }) @@ -799,10 +618,10 @@ export default { console.log('successLogin', e) this.getAgencyInfo().then(() => { that.getAgencyById().then(() => { - if (that.beFllowAgencyInfo.recordStatus == 3 || that.beFllowAgencyInfo.recordStatus == 4 || that.beFllowAgencyInfo.recordStatus == 6) { + if (that.info.recordStatus == 3 || that.info.recordStatus == 4 || that.info.recordStatus == 6) { that.handleSubmit() } else { - if (that.beFllowAgencyInfo.recordStatus == 5) { + if (that.info.recordStatus == 5) { uni.showToast({ title: '已发起关注申请, 正在等待通过', icon: 'none',