diff --git a/root/NEUIKit/pages/Chat/index.vue b/root/NEUIKit/pages/Chat/index.vue index 33d491e..00908e6 100644 --- a/root/NEUIKit/pages/Chat/index.vue +++ b/root/NEUIKit/pages/Chat/index.vue @@ -29,11 +29,15 @@ /> - - + +
@@ -76,7 +80,23 @@ export interface YxReplyMsg { } trackInit("ChatUIKit"); - +const tabInfo = ref({ + list: [ + { + name: "我的", + classify: 1, + }, + { + name: "浏览", + classify: 2, + }, + { + name: "收藏", + classify: 3, + }, + ], + active: 0, +}); const title = ref(""); const jobListShow = ref(false); const toDetail = () => { @@ -397,15 +417,20 @@ onLoad((options) => { uni.$on(events.HANDLE_MOVE_THROUGH, (flag) => { moveThrough.value = flag; }); - console.log("options聊天", options); + console.log("options聊天", options); uni.setNavigationBarTitle({ title: options.ctitle, }); }); const msgHeight = ref(0); +const beCollectedAgencyId = ref(0); + onMounted(() => { setNavTitle(); - getList(); + agencyIdByAccId().then((res) => { + beCollectedAgencyId.value = res.agencyId; + getList(); + }); uni.$on("msgHeight", (res) => { console.log(res); msgHeight.value = res; @@ -420,8 +445,6 @@ onMounted(() => { uni.$UIKitNIM.V2NIMTeamService.on("onTeamLeft", handleRemoveTeamMembers); uni.$on(events.GET_HISTORY_MSG, loadMoreMsgs); - - }); onUnmounted(() => { @@ -455,6 +478,24 @@ const checkLength = (e) => { searchJob(); } }; +const handleUpdateTab = (e) => { + console.log(e); + tabInfo.value.active = e; + if (e == 0 || e == 2) { + getList(); + } else { + getSeenList(); + } +}; +const getSeenList = () => {}; +const agencyIdByAccId = () => { + let accid = conversationId.split("|")[2]; + return new Promise((reso) => { + G.Post(api.get_AgencyIdByAccId, { accid }, (res) => { + reso(res); + }); + }); +}; const searchJob = () => { query.value.list = []; query.value.page = 1; @@ -462,72 +503,74 @@ const searchJob = () => { }; const getList = ($type = "init") => { loading.value = true; - G.Post( - api.job_list, - { - pageNum: query.value.page, - pageSize: query.value.size, - agencyId: uni.getStorageSync("apply-agencyId"), - classify: 99, - sortTag: 2, - keys: keyword.value, - cityName: "全国", - }, - (res) => { - console.log("res", res); - loading.value = false; - speed.value = res.recordCount; - query.value.isFinish = res.recordList.length; - console.log("query.value", query.value); - res.recordList = G.toGetAddressv3(res.recordList); - res.recordList = G.toGetAge(res.recordList); - res.recordList = G.yijobCopy(res.recordList); - if ($type == "init") { - query.value.list = []; - if (res.recordList.length > 0) { - query.value.list = res.recordList.map((item, index) => { - // console.log(item) - return { - ...item, - title: item.jobName, - address: item.district + item.age, - priceStr: item.salaryClassify != 7 ? G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), - logo: item.agencyLogo, - time: G.setDeadLine(item.updateTime, "jiaofu"), - fuWuFei: G.setReturnFee(item.returnFee, item.returnFeeType), - gender: G.getGenderByMinAge(item), - leafCateId: item.id, - // serverPrice: tabInfo.value.list[tabInfo.value.active].tip == 2 ? G.setReturnFee(item.returnFee, item.returnFeeType) : G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - serverPrice: G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - recruitmentSwitch: item.recruitment == 1 ? true : false, - recruitmentImage: item.recruitment, - isToday: item.today == 0 ? false : true, - }; - }); - } - } else { - query.value.list = query.value.list.concat( - res.recordList.map((item, index) => { - return { - ...item, - title: item.jobName, - priceStr: item.salaryClassify != 7 ? G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), - fuWuFei: G.setReturnFee(item.returnFee, item.returnFeeType), - gender: G.getGenderByMinAge(item), - logo: item.agencyLogo, - time: G.setDeadLine(item.updateTime, "jiaofu"), - leafCateId: item.id, - serverPrice: G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), - recruitmentSwitch: item.recruitment == 1 ? true : false, - recruitmentImage: item.recruitment, - isToday: item.today == 0 ? false : true, - }; - }) - ); + let parmas = { + pageNum: query.value.page, + pageSize: query.value.size, + keys: keyword.value, + cityName: "全国", + sortTag: 2, + }; + if (tabInfo.value.active === 0) { + parmas.agencyId = uni.getStorageSync("apply-agencyId"); + parmas.classify = 99; + } else if (tabInfo.value.active == 2) { + parmas.classify = 3; + parmas.beCollectedAgencyId = beCollectedAgencyId.value; + } + G.Post(api.job_list, {}, (res) => { + console.log("res", res); + loading.value = false; + speed.value = res.recordCount; + query.value.isFinish = res.recordList.length; + console.log("query.value", query.value); + res.recordList = G.toGetAddressv3(res.recordList); + res.recordList = G.toGetAge(res.recordList); + res.recordList = G.yijobCopy(res.recordList); + if ($type == "init") { + query.value.list = []; + if (res.recordList.length > 0) { + query.value.list = res.recordList.map((item, index) => { + // console.log(item) + return { + ...item, + title: item.jobName, + address: item.district + item.age, + priceStr: item.salaryClassify != 7 ? G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), + logo: item.agencyLogo, + time: G.setDeadLine(item.updateTime, "jiaofu"), + fuWuFei: G.setReturnFee(item.returnFee, item.returnFeeType), + gender: G.getGenderByMinAge(item), + leafCateId: item.id, + // serverPrice: tabInfo.value.list[tabInfo.value.active].tip == 2 ? G.setReturnFee(item.returnFee, item.returnFeeType) : G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), + serverPrice: G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), + recruitmentSwitch: item.recruitment == 1 ? true : false, + recruitmentImage: item.recruitment, + isToday: item.today == 0 ? false : true, + }; + }); } - console.log("query.value.list", query.value.list); + } else { + query.value.list = query.value.list.concat( + res.recordList.map((item, index) => { + return { + ...item, + title: item.jobName, + priceStr: item.salaryClassify != 7 ? G.getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue) : G.getSalaryClassifyValue(item.salaryClassify, item.minMonthlyPay, item.maxMonthlyPay), + fuWuFei: G.setReturnFee(item.returnFee, item.returnFeeType), + gender: G.getGenderByMinAge(item), + logo: item.agencyLogo, + time: G.setDeadLine(item.updateTime, "jiaofu"), + leafCateId: item.id, + serverPrice: G.setReturnFee(item.agencyReturnFee, item.agencyReturnFeeType), + recruitmentSwitch: item.recruitment == 1 ? true : false, + recruitmentImage: item.recruitment, + isToday: item.today == 0 ? false : true, + }; + }) + ); } - ); + console.log("query.value.list", query.value.list); + }); }; const sendMsg = () => { const customMsg = uni.$UIKitNIM.V2NIMMessageCreator.createCustomMessage( diff --git a/root/detail/apply.vue b/root/detail/apply.vue index 2f44fc7..941fb43 100644 --- a/root/detail/apply.vue +++ b/root/detail/apply.vue @@ -374,14 +374,15 @@ - 电话客服 - - - - - - - + + + + + + + + + diff --git a/root/detail/job.vue b/root/detail/job.vue index d9ec9d9..9c3f74e 100644 --- a/root/detail/job.vue +++ b/root/detail/job.vue @@ -481,7 +481,7 @@
编辑
-
+