From 3c8513c9928031e4af67055a145fa11820a0b3b3 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Tue, 25 Feb 2025 18:19:38 +0800 Subject: [PATCH] =?UTF-8?q?=E8=81=8C=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 21 +++++++++++ components/job-sub/index.wxml | 37 ++++++++----------- components/job-sub/index.wxss | 23 ++++++++++-- pages/billDetail/index.js | 62 ++++++++++++++++++-------------- pages/city/index.wxml | 6 ++-- pages/detail/index.js | 77 ++++++++++++++++++++------------------- pages/detail/index.wxml | 57 +++++++++++++---------------- pages/detail/index.wxss | 3 ++ pages/firstBill/index.js | 83 ++++++++++++++++++++++++++----------------- pages/firstBill/index.wxml | 18 +++++----- pages/setting/index.wxml | 2 +- pages/versionPage/index.wxml | 2 +- project.private.config.json | 7 ++++ utils/commonUtil.js | 60 +++++++++++++++++++++++-------- 14 files changed, 273 insertions(+), 185 deletions(-) diff --git a/app.js b/app.js index 30f87f0..18024f4 100644 --- a/app.js +++ b/app.js @@ -586,5 +586,26 @@ App({ }; console.log('分享数据:', params) return params; + }, + copyFun (data, callBack) { + wx.setClipboardData({ + data, + success (res) { + wx.getClipboardData({ + success (res) { + console.log(res.data); // data + if (callBack) { + callBack(); + } else { + wx.showToast({ + title: "内容已复制", + icon: "none", + duration: 1500, + }); + } + }, + }); + }, + }); } }); diff --git a/components/job-sub/index.wxml b/components/job-sub/index.wxml index 227830b..5970866 100644 --- a/components/job-sub/index.wxml +++ b/components/job-sub/index.wxml @@ -7,36 +7,31 @@ - {{item.jobName || item.aliasName}} + + {{item.picked ? '甄选' : '三方'}} + {{item.jobName || item.aliasName}} + {{item.update}} - - {{item.district }} - + {{item.district }} {{item.district ?'丨' :''}} - - {{item.distanceKm}} - + {{item.distanceKm}} {{item.genderRestrict + '丨' + item.age}} - + - - {{itm || '-'}} - - - - 暂无特色 + {{itm || '-'}} + 暂无特色 + --> @@ -80,12 +75,8 @@ - - 登录查看 - - - {{agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '-') : '仅代理可见'}} - + 登录查看 + {{agencyStatus == 1 ? (item.fuWuFei ? item.fuWuFei : '详询客服') : '仅代理可见'}} @@ -97,7 +88,7 @@ {{itm || '-'}} - --> + --> - \ No newline at end of file + diff --git a/components/job-sub/index.wxss b/components/job-sub/index.wxss index 3c01198..87b21e6 100644 --- a/components/job-sub/index.wxss +++ b/components/job-sub/index.wxss @@ -12,9 +12,26 @@ padding: 10px 10px; } -.cusFlexStart{ +.cusFlexStart { justify-content: start; } -.cusFlexStart .fss{ +.cusFlexStart .fss { margin-right: 6px; -} \ No newline at end of file +} +.markTag { + height: 14px; + padding: 2px 4px; + font-size: 12px; + line-height: 14px; + border-radius: 4px; + margin-right: 4px; +} +.sanfang { + border: 1px solid #666; + color: #333; +} +.zhenxuan { + border: 1px solid #1677ff; + background-color: #1677ff; + color: #fff; +} diff --git a/pages/billDetail/index.js b/pages/billDetail/index.js index 9bec074..b99d16a 100644 --- a/pages/billDetail/index.js +++ b/pages/billDetail/index.js @@ -88,18 +88,22 @@ Page({ var that = this; var text = "姓名:" + that.data.recordDetail.userName + "/" + (that.data.recordDetail.sex == 1 ? "男" : "女") + "/" + that.data.recordDetail.age + "岁" + (that.data.recordDetail.nation == "族" ? "" : "/" + that.data.recordDetail.nation) + "\n电话:" + (that.data.recordDetail.tel == "" || that.data.recordDetail.tel == undefined || that.data.recordDetail.tel == null ? "-" : that.data.recordDetail.tel) + "\n身份证号:" + (that.data.recordDetail.idCard == "" ? "-" : that.data.recordDetail.idCard) + "\n家庭地址:" + (that.data.recordDetail.address == "" || that.data.recordDetail.address == undefined || that.data.recordDetail.address == null ? "-" : that.data.recordDetail.address) + "\n报名岗位:" + that.data.recordDetail.storeJobName + "\n员工薪资:" + (that.data.recordDetail.employeeSalary || '-') + "\n代理政策:" + that.data.recordDetail.policy; + app.copyFun(text,()=>{ + console.log(123123); + that.close2(); - wx.setClipboardData({ - data: text, - success (res) { - wx.getClipboardData({ - success (res) { - console.log(res.data); // data - that.close2(); - }, - }); - }, - }); + }) + // wx.setClipboardData({ + // data: text, + // success (res) { + // wx.getClipboardData({ + // success (res) { + // console.log(res.data); // data + // that.close2(); + // }, + // }); + // }, + // }); }, close2: function () { console.log("close"); @@ -260,23 +264,27 @@ Page({ copyClose () { var that = this; var text = "姓名:" + that.data.userinfo.userName + "/" + (that.data.userinfo.sex == 1 ? "男" : "女") + "/" + that.data.userinfo.age + "岁" + (that.data.userinfo.nation == "族" ? "" : "/" + that.data.userinfo.nation) + "\n身份证号:" + (that.data.userinfo.idCard == "" ? "-" : that.data.userinfo.idCard) + "\n企业岗位:" + that.data.userinfo.storeJobName + "\n面试时间:" + that.data.interviewTime + "\n电话:" + (that.data.userinfo.tel == "" ? "-" : that.data.userinfo.tel); + app.copyFun(text,()=>{ + console.log(123123); + that.close1(); - wx.setClipboardData({ - data: text, - success (res) { - wx.getClipboardData({ - success (res) { - console.log(res.data); // data - wx.showToast({ - title: "内容已复制", - icon: "none", - duration: 1500, - }); - that.close1(); - }, - }); - }, - }); + }) + // wx.setClipboardData({ + // data: text, + // success (res) { + // wx.getClipboardData({ + // success (res) { + // console.log(res.data); // data + // wx.showToast({ + // title: "内容已复制", + // icon: "none", + // duration: 1500, + // }); + // that.close1(); + // }, + // }); + // }, + // }); }, showImgs (e) { diff --git a/pages/city/index.wxml b/pages/city/index.wxml index 9f536a8..a41620e 100644 --- a/pages/city/index.wxml +++ b/pages/city/index.wxml @@ -15,11 +15,11 @@ - --> +--> {{alpha}} - + 当前城市 @@ -51,7 +51,7 @@ - + 当前省份 diff --git a/pages/detail/index.js b/pages/detail/index.js index c7cb1ce..f2ae844 100644 --- a/pages/detail/index.js +++ b/pages/detail/index.js @@ -879,21 +879,27 @@ Page({ // console.log("notLogin", that.data.isLogin); // commonUtil.fillTextLineBreak(ctx, "工价登录后查看", baseLeft + logoSize + 10, line3 - 40, 400, 20, "#ff4400", titleFontSize - 6, "400"); // 时薪 // } - - that.data.jobDetail.record.jobRequestLabelNames.forEach((item1, index) => { - if (index <= 3) { - commonUtil.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line4 + 4, 400, 40, "#666", mainFontSize); // 标签字符 - commonUtil.roundRect1(ctx, baseLeft + labelLeft, line4 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); - labelLeft += ctx.measureText(item1).width + 32; - if (index == 3) { - labelLeft = 0; + console.log('that.data.jobDetail.record.jobRequestLabelNames', that.data.jobDetail.record.jobRequestLabelNames); + if (that.data.jobDetail.record.jobRequestLabelNames && that.data.jobDetail.record.jobRequestLabelNames.length > 0) { + that.data.jobDetail.record.jobRequestLabelNames.forEach((item1, index) => { + if (index <= 3) { + commonUtil.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line4 + 4, 400, 40, "#666", mainFontSize); // 标签字符 + commonUtil.roundRect1(ctx, baseLeft + labelLeft, line4 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); + labelLeft += ctx.measureText(item1).width + 32; + if (index == 3) { + labelLeft = 0; + } + } else if (index > 3 && index <= 6) { + commonUtil.roundRect1(ctx, baseLeft + labelLeft, line5 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); + commonUtil.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line5 + 4, 400, 40, "#666", mainFontSize); // 标签字符 + labelLeft += ctx.measureText(item1).width + 32; } - } else if (index > 3 && index <= 6) { - commonUtil.roundRect1(ctx, baseLeft + labelLeft, line5 - 38, ctx.measureText(item1).width + 24, 56, 8, "#00000012"); - commonUtil.fillTextLineBreak(ctx, item1, baseLeft + labelLeft + 12, line5 + 4, 400, 40, "#666", mainFontSize); // 标签字符 - labelLeft += ctx.measureText(item1).width + 32; - } - }); + }); + } else { + commonUtil.fillTextLineBreak(ctx, '暂无特色', baseLeft + 12, line4 + 4, 400, 40, "#666", mainFontSize); // 标签字符 + commonUtil.roundRect1(ctx, baseLeft , line4 - 38, ctx.measureText('暂无特色').width + 24, 56, 8, "#00000012"); + } + // 根据标签数量调整宣传标语位置 // commonUtil.roundRect1(ctx, mycenter - 712 / 2, line6 + (that.data.jobDetail.record.jobSpecialLabelNames.length > 3 ? 0 : -70), 712, 60, 4, "#fff6e8"); // 宣传标语背景 commonUtil.roundRect1(ctx, mycenter - 712 / 2, line6, 712, 60, 4, "#fff6e8"); // 宣传标语背景 @@ -1111,15 +1117,11 @@ Page({ that.setData({ fuWuFei: commonUtil.getReturnFeeTypeName1ById(result.record.returnFeeType, result.record.returnFee ? result.record.returnFee / 100 : ''), }); - } else { - that.setData({ - fuWuFei: "-", - }); } console.log(result); console.log(commonUtil); - let citys = commonUtil.setJobInfoPosition(result.record.storeDistrict); + let citys = commonUtil.setJobInfoPositionv3(result.record.storeAddr); // city = city.replace(/,/g, " | ") that.data.jobDetail = result that.showSexAge(); @@ -1670,26 +1672,15 @@ Page({ query .select(".contactInfo") .boundingClientRect(function (res) { - console.log(res); - contentInfo = res.dataset.info; - wx.setClipboardData({ - data: e.currentTarget.dataset.content + contentInfo, - success (res) { - wx.getClipboardData({ - success (res) { - console.log(res.data); // data - wx.showToast({ - title: "内容已复制", - icon: "none", - duration: 1500, - }); - }, - }); - }, - }); + let data = e.currentTarget.dataset.content + res.dataset.info + app.copyFun(data) }) .exec(); }, + getJobName (e) { + let data = e.currentTarget.dataset.content + app.copyFun(data) + }, changeContact () { console.log(2123); wx.navigateTo({ @@ -1877,10 +1868,18 @@ Page({ let that = this // if (!this.data.isAgency) return false console.log('that.data.bclr', that.data.bclr); + let content, title + if (that.data.jobDetail.record.returnFeeDesp) { + title = that.data.isAgency ? '佣金: ' + that.data.fuWuFei : '' + content = that.data.isAgency ? that.data.jobDetail.record.returnFeeDesp : '抱歉,您需先成为伯才代理以获得使用权限。' + + } else { + title = '详询客服' + content = '因三方项目政策变动太快,详情请咨询客服。页面左下角点击“联系客服”直接联系我哟~' + } wx.showModal({ - title: that.data.isAgency ? '佣金: ' + that.data.fuWuFei : '', - content: that.data.isAgency ? that.data.jobDetail.record.returnFeeDesp : '抱歉,您需先成为伯才代理以获得使用权限。', - // content: that.data.bclr, + title, + content, contentColor: "#ccc", confirmColor: "#1890ff", confirmText: "确定", diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index 9fd126b..731935e 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -17,50 +17,40 @@ --> - + + + + 来源 + + {{jobDetail.record.askAgencyName}} + + + + 项目方 + + + {{jobDetail.record.supplier.supplierName}} + + + + 代理佣金 - {{fuWuFei || '--'}} + {{fuWuFei || '详询客服'}} *** - - + - - - {{jobDetail.record.jobName}} - @{{jobDetail.record.supplier.supplierName}} - - + {{jobDetail.record.jobName}} {{jobDetail.record.update}} @@ -136,8 +126,11 @@ {{jobDetail.record.monthlyPay ? '丨' + jobDetail.record.monthlyPay : '--'}} + + + 复制 + - 代理:{{jobDetail.record.askAgencyName}} @@ -249,7 +242,7 @@ 面试地点 - {{jobDetail.record.interviewAddr}} + {{jobDetail.record.interviewAddr || '-'}} diff --git a/pages/detail/index.wxss b/pages/detail/index.wxss index f94424b..31ae092 100644 --- a/pages/detail/index.wxss +++ b/pages/detail/index.wxss @@ -599,3 +599,6 @@ button.collectBtn { .h67 { height: 67px; } +.h45 { + height: 45px; +} diff --git a/pages/firstBill/index.js b/pages/firstBill/index.js index 63ea4e8..dda5462 100644 --- a/pages/firstBill/index.js +++ b/pages/firstBill/index.js @@ -10,10 +10,27 @@ import { } from '../../utils/request.js' Page({ data: { - isSwiper:true, + isSwiper: true, toped: "1", jobNum: 0, // 48小时更新职位数 currCode: '', + tabGroup: [ + { + name: '全部', + key: '0', + picked: '' + }, + { + name: '甄选', + key: '1', + picked: '1' + }, + { + name: '三方', + key: '2', + picked: '0' + }, + ], anchorList: [ { id: 'age', @@ -661,7 +678,7 @@ Page({ this.data.storeJobListSearchForm.keys = ""; this.getJobList('search'); }, - bindconfirm: function (e){ + bindconfirm: function (e) { if (!this.data.isLogin) { wx.navigateTo({ url: "../login/index", @@ -1826,12 +1843,12 @@ Page({ // this.getJobList(); }, - swiperToggleT(){ + swiperToggleT () { this.setData({ - isSwiper:false + isSwiper: false }) }, - swiperToggleF(){ + swiperToggleF () { this.setData({ // isSwiper:true, // inputVal:'' @@ -2654,10 +2671,10 @@ Page({ }).then((res) => { console.log("职位列表↓↓↓↓"); console.log(res); - if($type == 'search'){ + if ($type == 'search') { that.setData({ - isSwiper:true, - inputVal:'' + isSwiper: true, + inputVal: '' }) } let data = res.data.data @@ -2720,16 +2737,13 @@ Page({ that.setData({ isCity: that.data.searchCityParamStorage.isCity, }); - wx.hideLoading({ - success: (res) => { }, - }); + that.setData({ loading: false, pageShow: true, storeJobListSearchForm: that.data.storeJobListSearchForm, }); - resolve(); - that.getTag(); + that.data.recordList.forEach((item, index) => { // console.log(item); @@ -2772,6 +2786,11 @@ Page({ recordList: that.data.recordList, currentJobDrawer: that.data.currentJobDrawer, }); + wx.hideLoading({ + success: (res) => { }, + }); + resolve(); + that.getTag(); // if (that.data.recordList.length < data.recordCount) { // that.setData({ // hasMoreData: true, @@ -4241,14 +4260,13 @@ Page({ */ collectChange (e) { let that = this; - if ( - that.data.isLogin || - (!that.data.isLogin && e.currentTarget.dataset.id == 0) - ) { - if (e.currentTarget.dataset.id) { - that.data.choiceCollect = e.currentTarget.dataset.id; + // if (that.data.isLogin || (!that.data.isLogin && e.currentTarget.dataset.item.key == 0)) { + if (e.currentTarget.dataset.item) { + let item = e.currentTarget.dataset.item + that.data.choiceCollect = item.key; // that.data.storeJobListSearchForm.ucj = e.currentTarget.dataset.id; - that.data.storeJobListSearchForm.sortTag = e.currentTarget.dataset.id; + that.data.storeJobListSearchForm.sortTag = item.key; + that.data.storeJobListSearchForm.picked = item.picked; that.data.storeJobListSearchForm.pageNum = 1; that.setData({ choiceCollect: that.data.choiceCollect, @@ -4258,14 +4276,14 @@ Page({ }); that.getJobList(); } - } else { - // if(e.currentTarget.dataset.id == 1){ - that.setData({ - recordList: [], - choiceCollect: 1, - }); - // } - } + // } else { + // // if(e.currentTarget.dataset.id == 1){ + // that.setData({ + // recordList: [], + // choiceCollect: 1, + // }); + // // } + // } }, choiceFilter (e) { var that = this; @@ -4545,8 +4563,8 @@ Page({ }); }, showLeft () { - wx.navigateTo({ - url: `/pages/listSharePage/index`, + wx.navigateTo({ + url: `/pages/listSharePage/index`, }); // this.getTabBar().setData({ @@ -4829,9 +4847,10 @@ Page({ url: "/pages/filterPage/index", }); }, + // 获取48小时内职位更新数 getJobNum () { - // 获取48小时内职位更新数 - customRequest("/yishoudan/custom/job/countUpdateNumByHour/48", { + // let url = this.data.choiceCollect == + customRequest("/yishoudan/custom/job/countUpdateNumByHourV3/48", { header: 'headers', method: 'get', }).then((res) => { diff --git a/pages/firstBill/index.wxml b/pages/firstBill/index.wxml index 5586e82..b069200 100644 --- a/pages/firstBill/index.wxml +++ b/pages/firstBill/index.wxml @@ -34,16 +34,16 @@ - - 最新 + + {{item.name}} - - 工价 - - - 佣金 + @@ -64,7 +64,7 @@ 工价优先 - 距离优先 + 佣金优先 diff --git a/pages/setting/index.wxml b/pages/setting/index.wxml index 1b9c0f8..35ce078 100644 --- a/pages/setting/index.wxml +++ b/pages/setting/index.wxml @@ -28,7 +28,7 @@ - 关于伯才 + 关于伯才供应链 版本{{version}} diff --git a/pages/versionPage/index.wxml b/pages/versionPage/index.wxml index 2ecf59a..a09e33c 100644 --- a/pages/versionPage/index.wxml +++ b/pages/versionPage/index.wxml @@ -1,7 +1,7 @@ -

伯才

+

伯才供应链

Version {{version}}

diff --git a/project.private.config.json b/project.private.config.json index 60f5c19..8ac6013 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -8,6 +8,13 @@ "condition": { "miniprogram": { "list": [ + { + "name": "pages/billDetail/index", + "pathName": "pages/billDetail/index", + "query": "", + "launchMode": "default", + "scene": null + }, { "name": "pages/workBench/index", "pathName": "pages/workBench/index", diff --git a/utils/commonUtil.js b/utils/commonUtil.js index 4bb9753..0b83c79 100644 --- a/utils/commonUtil.js +++ b/utils/commonUtil.js @@ -1,4 +1,4 @@ -import dateUtil from './dateUtil.js' +import dateUtil from './dateUtil.js' /** * 如果是null '' 'null' 'undefined' * @param item @@ -1169,7 +1169,37 @@ export function setJobInfoPosition (pos) { } }); citys = citys.join(",").replace(/,/g, "丨"); - return citys ; + return citys; +} +export function setJobInfoPositionv3 (str) { + var reg = /.+?(省|市|自治区|自治州|县|区)/g; // 省市区的正则 + let result = ''; + if (str) { + if (str.match(reg)) { + if (str.match(reg).length == 1) { + result = str.match(reg)[0]; + } else if (str.match(reg).length == 2) { + result = str + .match(reg) + .map((item) => { + return item; + }) + .join(" | "); + } else if (str.match(reg).length == 3) { + result = str + .match(reg) + .filter((item, index) => { + return item; + }) + .join(" | "); + } + } else { + result = str; + } + return result; + } else { + return ''; + } } /* 处理详情地址 @@ -1256,7 +1286,7 @@ export const cutShareImg = (imgUrl) => { * * */ - + export function disposeJobListData (recordList) { var that = this; console.log(recordList); @@ -1325,7 +1355,7 @@ export function disposeJobListData (recordList) { // } item["monthlyPay"] = monthlyPayStr; //地址深圳丨龙岗区丨 - let citys = setJobInfoPosition(item.storeDistrict); + let citys = setJobInfoPositionv3(item.storeAddr); // console.log('citys',citys); var districtStr = ""; @@ -1416,39 +1446,39 @@ export function query (id, fn) { query.exec(fn); } -export function policyNumToHanZi (i) { +export function policyNumToHanZi (i) { let pickerStr; if (i <= 9) { switch (i) { case 1: - pickerStr = "政策一"; + pickerStr = "政策一"; break; case 2: - pickerStr = "政策二"; + pickerStr = "政策二"; break; case 3: - pickerStr = "政策三"; + pickerStr = "政策三"; break; case 4: - pickerStr = "政策四"; + pickerStr = "政策四"; break; case 5: - pickerStr = "政策五"; + pickerStr = "政策五"; break; case 6: - pickerStr = "政策六"; + pickerStr = "政策六"; break; case 7: - pickerStr = "政策七"; + pickerStr = "政策七"; break; case 8: - pickerStr = "政策八"; + pickerStr = "政策八"; break; case 9: - pickerStr = "政策九"; + pickerStr = "政策九"; break; case 10: - pickerStr = "政策十"; + pickerStr = "政策十"; break; default: pickerStr = "政策" + (i + 1);