diff --git a/app.json b/app.json index e310b33..30d0f8d 100644 --- a/app.json +++ b/app.json @@ -105,7 +105,6 @@ } ], "requiredPrivateInfos": [ - "getLocation", "chooseLocation", "chooseAddress" ], diff --git a/app.wxss b/app.wxss index 6b50bb6..f21c3f2 100644 --- a/app.wxss +++ b/app.wxss @@ -283,29 +283,29 @@ page { border: 1px solid #eee; } .bb1 { - border-bottom: 1rpx solid #eee; + border-bottom: 1px solid #eee; } .br1 { - border-right: 1rpx solid #eee; + border-right: 1px solid #eee; } .bt1 { - border-top: 1rpx solid #eee; + border-top: 1px solid #eee; } .bl1 { - border-left: 1rpx solid #eee; + border-left: 1px solid #eee; } .bbd1 { - border-bottom: 1rpx dotted #eee; + border-bottom: 1px dotted #eee; } .brd1 { - border-right: 1rpx dotted #eee; + border-right: 1px dotted #eee; } .btd1 { - border-top: 1rpx dotted #eee; + border-top: 1px dotted #eee; } .bld1 { - border-left: 1rpx dotted #eee; + border-left: 1px dotted #eee; } .f4 { font-size: 4px; @@ -501,7 +501,7 @@ page { } .lineT { - height: 1rpx; + height: 1px; width: calc(100vw - 40px); margin: 0 auto; background-color: rgba(0, 0, 0, 0.1); @@ -701,7 +701,7 @@ button[disabled][type="primary"] { height: 50px; margin-right: 6px; border-radius: 4px; - /* border: 1rpx solid #ddd; */ + /* border: 1px solid #ddd; */ } .row-extra.c025 { @@ -860,8 +860,8 @@ button { margin: 0 !important; } .wx-border-tb { - border-top: 1px solid #f3f3f3; - border-bottom: 1px solid #f3f3f3; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; } .userImg { @@ -911,13 +911,7 @@ button::after { justify-content: center; } -.jobTitle { - font-size: 22px; - font-weight: 601; - color: rgba(0, 0, 0, 0.85); - line-height: 30px; - flex: 1; -} + [data-title*="null"] { display: none; @@ -1026,7 +1020,7 @@ button::after { padding-bottom: 16px; padding-top: 16px; box-sizing: border-box; - border-bottom: 1px solid #f3f3f3; + border-bottom: 1px solid #eee; } .staticTitle { @@ -1082,13 +1076,13 @@ button::after { color: #787878; line-height: 22px; margin-bottom: 20px; - /* border-bottom: 1rpx solid #e2e2e2; */ + /* border-bottom: 1px solid #e2e2e2; */ } .weui-dialog__bd view { /* padding-bottom: 20px; */ - /* border-bottom: 1rpx solid #e2e2e2; */ + /* border-bottom: 1px solid #e2e2e2; */ } .weui-dialog__hd { @@ -1173,7 +1167,7 @@ button::after { white-space: nowrap; } .servicePrice { - border: 1rpx solid var(--color-ysd); + border: 1px solid var(--color-ysd); background-color: #ffeee7; justify-content: space-between; border-right-color: transparent; @@ -1245,7 +1239,7 @@ button::after { padding-bottom: 10px; margin-bottom: 60px; padding-top: 32rpx; - border-top: 1px solid #f3f3f3; + border-top: 1px solid #eee; } .ui-step.ui-list > view { @@ -1411,7 +1405,7 @@ button::after { padding-bottom: 10px; margin-bottom: 60px; padding-top: 32rpx; - border-top: 1px solid #f3f3f3; + border-top: 1px solid #eee; } .ui-step.ui-list > view { @@ -1481,7 +1475,7 @@ button.newBtn.mbtn-hover { .topMenu { display: flex; padding: 12px 0; - border-bottom: 1px solid #f3f3f3; + border-bottom: 1px solid #eee; background-color: #fff; } @@ -1522,14 +1516,14 @@ button.newBtn.mbtn-hover { line-height: 18px; } .loadMore { - border-top: 1rpx solid transparent; - border-bottom: 1rpx solid transparent; + border-top: 1px solid transparent; + border-bottom: 1px solid transparent; background-color: #fff; } .loadMore view { width: 120px; height: 28px; - border: 1px solid #f3f3f3; + border: 1px solid #eee; border-radius: 20px; font-size: 14px; text-align: center; @@ -1698,7 +1692,7 @@ page { } .weui-loadmore_line { - border-top: 1px solid #f3f3f3; + border-top: 1px solid #eee; } .weui-grid4, .weui-grid5 { diff --git a/components/job-sub/index.wxml b/components/job-sub/index.wxml index 6d0ac47..22bbd2f 100644 --- a/components/job-sub/index.wxml +++ b/components/job-sub/index.wxml @@ -6,20 +6,21 @@ - + {{item.jobName || item.aliasName}} - + {{item.update}} - - {{item.storeAddr ?item.storeAddr : ''}} + + {{item.district }} + {{item.district ?'丨' :''}} {{item.distanceKm}} - {{' | ' + item.age}} + {{item.genderRestrict + '丨' + item.age}} diff --git a/pages/city/index.js b/pages/city/index.js index 950ab72..a51c56b 100644 --- a/pages/city/index.js +++ b/pages/city/index.js @@ -147,7 +147,7 @@ Page({ this.getAllCityLevel2(); this.getAllProvinceLevel1(); // that.getProvinceLocation() - // that.getLocation() + that.getLocation() }, leftMove (e) { this.setData({ diff --git a/pages/detail/index.js b/pages/detail/index.js index f7860a2..074ac6b 100644 --- a/pages/detail/index.js +++ b/pages/detail/index.js @@ -1,5 +1,7 @@ const app = getApp(); const commonUtil = require("../../utils/commonUtil"); +const dateUtil = require("../../utils/dateUtil"); + const { wxml, style @@ -59,17 +61,17 @@ Page({ shareDetailImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/share.png", posterImg: "", }, - showdialog() { + showdialog () { this.setData({ iosDialog: true, }); }, - closeDialog() { + closeDialog () { this.setData({ iosDialog: false, }); }, - onShow() { + onShow () { var that = this; this.setData({ isLogin: app.globalData.isLogin, @@ -122,10 +124,10 @@ Page({ phoneDialog: false, }); }, - wxLogin() { + wxLogin () { var that = this; wx.login({ - success(res) { + success (res) { if (res.code) { that.setData({ wxCode: res.code, @@ -136,7 +138,7 @@ Page({ }, }); }, - kefu(e) { + kefu (e) { console.log(e); console.log('jobDetail', this.data.jobDetail); if (this.data.fromBocai) { @@ -167,10 +169,10 @@ Page({ // sendMessageTitle:'丸子吗喽你好呀', // sendMessageImg:'../../assets/images/jbn.png', corpId: 'wwc227639d3a136c8d', - success(res) { + success (res) { console.log('res', res); }, - fail(err) { + fail (err) { console.log('err', err); } }) @@ -185,7 +187,7 @@ Page({ } }, - showImage(e) { + showImage (e) { let resImg = e.currentTarget.dataset.src; console.log(this.data.jobDetail.images); var imgArr = []; @@ -206,7 +208,7 @@ Page({ urls: imgArr, }); }, - showVideo(e) { + showVideo (e) { console.log(e); console.log(wx.getSystemInfo()); var that = this; @@ -220,7 +222,7 @@ Page({ }); }, 500); }, - fullScreen(e) { + fullScreen (e) { console.log(e); if (!e.detail.fullScreen) { this.setData({ @@ -229,7 +231,7 @@ Page({ this.videoContext.stop(); } }, - shareVideo(e) { + shareVideo (e) { console.log(e); wx.showLoading({ title: "下载中...", @@ -237,7 +239,7 @@ Page({ }); wx.downloadFile({ url: e.currentTarget.dataset.src, // 下载url - success(res) { + success (res) { // 下载完成后转发 wx.hideLoading(); wx.showLoading({ @@ -246,7 +248,7 @@ Page({ }); wx.shareVideoMessage({ videoPath: res.tempFilePath, - success() { + success () { wx.hideLoading(); }, fail: () => { @@ -266,7 +268,7 @@ Page({ }, }); }, - renderToCanvas() { + renderToCanvas () { const p1 = this.widget.renderToCanvas({ wxml: wxml(that.data.wxml), style @@ -277,7 +279,7 @@ Page({ console.log(res); }); }, - extraImage() { + extraImage () { var that = this; // return new Promise(function (resolve, reject) { that.widget.renderToCanvas({ @@ -294,7 +296,7 @@ Page({ }); // }); }, - onLoad(query) { + onLoad (query) { var that = this; console.log(app.globalData.loginUserInfo); qqmapsdk = new QQMapWX({ @@ -331,7 +333,7 @@ Page({ that.setData({ pbtm: 40, }); - } else {} + } else { } }, }); console.log(query); @@ -398,12 +400,12 @@ Page({ this.getStoreJobDetailById(); }, 100); }, - goIndex() { + goIndex () { wx.switchTab({ url: '../firstBill/index', }) }, - getCode() { + getCode () { var that = this; console.log('getCode'); console.log(this.data.searchForm.storeJobId); @@ -428,7 +430,7 @@ Page({ // } // }) }, - getAgencyInfo(job) { + getAgencyInfo (job) { var that = this; console.log(job); console.log("打印基本信息"); @@ -471,7 +473,7 @@ Page({ // return agencyStr + '\n' + objAgency.returnFeeDesp; } }, - toMapChoice(e) { + toMapChoice (e) { var that = this; console.log(e); if (e.currentTarget.dataset.address.record.storeLat) { @@ -521,13 +523,13 @@ Page({ // }, // }); // }, - changeMenu(e) { + changeMenu (e) { let currentIndex = parseInt(e.currentTarget.dataset.id); this.setData({ currIndex: e.currentTarget.dataset.id, }); }, - getLocation() { + getLocation () { var that = this; wx.getSetting({ @@ -536,7 +538,7 @@ Page({ if (res.authSetting.location) { wx.getLocation({ - success(res1) { + success (res1) { console.log("获取位置"); console.log(res1); @@ -548,7 +550,7 @@ Page({ that.getStoreJobDetailById(); }, - fail() { + fail () { that.getStoreJobDetailById(); }, }); @@ -607,7 +609,7 @@ Page({ // query: "?storeJobId=" + this.data.storeJobId, // }; // }, - getCanvas() { + getCanvas () { const that = this; return new Promise((resolve) => { @@ -628,7 +630,7 @@ Page({ // 绘制背景图片 wx.getImageInfo({ src: that.data.shareDetailImg, //网络图片,如果不行请换一个 - success(res) { + success (res) { console.log(res); var width = res.width; var height = res.height; @@ -690,7 +692,7 @@ Page({ ctx.restore(); }; - function roundRect1(ctx, x, y, w, h, r, color) { + function roundRect1 (ctx, x, y, w, h, r, color) { //绘制圆角矩形(无填充色)) ctx.save(); ctx.fillStyle = color; @@ -704,121 +706,121 @@ Page({ } //使用: new Promise((imgres) => { - // that.data.checkedList.forEach((item, index) => { - console.log(587); - let labelLeft = 0; - // ctx.arcTo() - let baseTop, logoLeft, logoSize, titleSize, ageTop, salaryClassifyValueLeft, salaryClassifyValueTop, monthlyPaySize, position, markTop, roundRectHeight, fubiaotiTop, bottomSloganTop, QRSize; - logoLeft = 56 * 2; - let baseMiddle = 248 * 2; - // if (that.data.checkedList.length == 1) { - baseTop = 2 * 370; - logoSize = 2 * 96; - QRSize = 2 * 260; - titleSize = 2 * 30; - roundRectHeight = 2 * 260; - ageTop = 2 * 110; - salaryClassifyValueLeft = 2 * 176; - salaryClassifyValueTop = 2 * 54; - monthlyPaySize = 2 * 24; - markTop = 2 * 145; - fubiaotiTop = 2 * 155; - bottomSloganTop = 2 * 355; - - // roundRect1(ctx, x, y, w, h, r, color) - - roundRect1(ctx, mycenter - 1104 / 2, baseTop - 100, 1104, roundRectHeight, 32, "#fff"); - // roundRect1(ctx, mycenter - 600 / 2, baseTop + 750, 600, 560, 32, "#fff"); - console.log(' that.data.currCode', that.data.currCode); - wx.getImageInfo({ - // src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/qrcode.png", //网络图片,如果不行请换一个 - // src:"https://daotian.matripe.com.cn/image/jobs/4/storeJobId9227.jpg", - src: app.globalData.ip + that.data.currCode, - success(res) { - console.log(res); - const img = canvas.createImage(); - img.src = res.path; - img.onload = () => { - - // (ctx, img, bg_x, bg_y, bg_w, bg_h, bg_r) - // roundRect(ctx, img, mycenter - res.width / 2 - 40, baseTop + 770, QRSize, QRSize, 32); - roundRect1(ctx, mycenter - 580 / 2, baseTop + 740, 580, 580, 0, "#fff"); - roundRect(ctx, img, mycenter - res.width / 2 - 40, baseTop + 770, QRSize, QRSize, 0); - // if (index == that.data.checkedList.length - 1) { - // setTimeout(() => { - // imgres(); - // }, 1000); - // } - wx.getImageInfo({ - src: that.data.jobDetail.store.logo, //网络图片,如果不行请换一个 - success(res) { - console.log(res); - const img = canvas.createImage(); - img.src = res.path; - img.onload = () => { - roundRect(ctx, img, logoLeft, baseTop + 40, logoSize, logoSize, 8); - // if (index == that.data.checkedList.length - 1) { - setTimeout(() => { - imgres(); - }, 200); - // } - }; - }, - fail(err) { - console.log(err); - }, - }); - }; - }, - fail(err) { - console.log(err); - }, - }); - that.data.jobDetail.record.jobSpecialLabelNames.forEach((item1, index) => { - console.log(item1); - // console.log(ctx.measureText(item1).width); - if (index <= 2) { - fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符 - roundRect1(ctx, 52 * 2 + labelLeft, baseTop + markTop, ctx.measureText(item1).width + 16 * 2, 40 * 2, 2 * 2, "#00000010"); - labelLeft += ctx.measureText(item1).width + 32 * 2; - } - }); + // that.data.checkedList.forEach((item, index) => { + console.log(587); + let labelLeft = 0; + // ctx.arcTo() + let baseTop, logoLeft, logoSize, titleSize, ageTop, salaryClassifyValueLeft, salaryClassifyValueTop, monthlyPaySize, position, markTop, roundRectHeight, fubiaotiTop, bottomSloganTop, QRSize; + logoLeft = 56 * 2; + let baseMiddle = 248 * 2; + // if (that.data.checkedList.length == 1) { + baseTop = 2 * 370; + logoSize = 2 * 96; + QRSize = 2 * 260; + titleSize = 2 * 30; + roundRectHeight = 2 * 260; + ageTop = 2 * 110; + salaryClassifyValueLeft = 2 * 176; + salaryClassifyValueTop = 2 * 54; + monthlyPaySize = 2 * 24; + markTop = 2 * 145; + fubiaotiTop = 2 * 155; + bottomSloganTop = 2 * 355; + + // roundRect1(ctx, x, y, w, h, r, color) + + roundRect1(ctx, mycenter - 1104 / 2, baseTop - 100, 1104, roundRectHeight, 32, "#fff"); + // roundRect1(ctx, mycenter - 600 / 2, baseTop + 750, 600, 560, 32, "#fff"); + console.log(' that.data.currCode', that.data.currCode); + wx.getImageInfo({ + // src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/qrcode.png", //网络图片,如果不行请换一个 + // src:"https://daotian.matripe.com.cn/image/jobs/4/storeJobId9227.jpg", + src: app.globalData.ip + that.data.currCode, + success (res) { + console.log(res); + const img = canvas.createImage(); + img.src = res.path; + img.onload = () => { + + // (ctx, img, bg_x, bg_y, bg_w, bg_h, bg_r) + // roundRect(ctx, img, mycenter - res.width / 2 - 40, baseTop + 770, QRSize, QRSize, 32); + roundRect1(ctx, mycenter - 580 / 2, baseTop + 740, 580, 580, 0, "#fff"); + roundRect(ctx, img, mycenter - res.width / 2 - 40, baseTop + 770, QRSize, QRSize, 0); + // if (index == that.data.checkedList.length - 1) { + // setTimeout(() => { + // imgres(); + // }, 1000); + // } + wx.getImageInfo({ + src: that.data.jobDetail.store.logo, //网络图片,如果不行请换一个 + success (res) { + console.log(res); + const img = canvas.createImage(); + img.src = res.path; + img.onload = () => { + roundRect(ctx, img, logoLeft, baseTop + 40, logoSize, logoSize, 8); + // if (index == that.data.checkedList.length - 1) { + setTimeout(() => { + imgres(); + }, 200); + // } + }; + }, + fail (err) { + console.log(err); + }, + }); + }; + }, + fail (err) { + console.log(err); + }, + }); + that.data.jobDetail.record.jobSpecialLabelNames.forEach((item1, index) => { + console.log(item1); + // console.log(ctx.measureText(item1).width); + if (index <= 2) { + fillTextLineBreak(ctx, item1, 60 * 2 + labelLeft, baseTop + markTop + 30 * 2, 400 * 2, 20, "#333", monthlyPaySize); // 标签字符 + roundRect1(ctx, 52 * 2 + labelLeft, baseTop + markTop, ctx.measureText(item1).width + 16 * 2, 40 * 2, 2 * 2, "#00000010"); + labelLeft += ctx.measureText(item1).width + 32 * 2; + } + }); - fillTextLineBreak(ctx, that.data.jobDetail.record.jobName, logoLeft, baseTop, 500 * 2, 20, "#333", titleSize, "600"); // 岗位标题 + fillTextLineBreak(ctx, that.data.jobDetail.record.jobName, logoLeft, baseTop, 500 * 2, 20, "#333", titleSize, "600"); // 岗位标题 - fillTextLineBreak(ctx, that.data.jobDetail.record.salaryClassifyValueHaibao, salaryClassifyValueLeft, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#1890ff", titleSize, "600"); // 时薪 + fillTextLineBreak(ctx, that.data.jobDetail.record.salaryClassifyValueHaibao, salaryClassifyValueLeft, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#1890ff", titleSize, "600"); // 时薪 - fillTextLineBreak(ctx, that.data.jobDetail.record.monthlyPay, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.record.salaryClassifyValueHaibao + " ").width, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#1890ff", monthlyPaySize, "400"); // 月工资 - // .slice(0, 7) + '...' + fillTextLineBreak(ctx, that.data.jobDetail.record.monthlyPay, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.record.salaryClassifyValueHaibao + " ").width, baseTop + salaryClassifyValueTop, 400 * 2, 20, "#1890ff", monthlyPaySize, "400"); // 月工资 + // .slice(0, 7) + '...' - fillTextLineBreak(ctx, that.data.jobDetail.store.districtStr.length > 9 ? that.data.jobDetail.store.districtStr.substring(0, 8) + '...' : that.data.jobDetail.store.districtStr, salaryClassifyValueLeft, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 省市 + fillTextLineBreak(ctx, that.data.jobDetail.store.districtStr.length > 9 ? that.data.jobDetail.store.districtStr.substring(0, 8) + '...' : that.data.jobDetail.store.districtStr, salaryClassifyValueLeft, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 省市 - fillTextLineBreak(ctx, "丨" + that.data.jobDetail.record.age, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.store.districtStr.length > 7 ? that.data.jobDetail.store.districtStr.substring(0, 8) + '...' : that.data.jobDetail.store.districtStr, ).width, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 年龄 + fillTextLineBreak(ctx, "丨" + that.data.jobDetail.record.age, salaryClassifyValueLeft + ctx.measureText(that.data.jobDetail.store.districtStr.length > 7 ? that.data.jobDetail.store.districtStr.substring(0, 8) + '...' : that.data.jobDetail.store.districtStr,).width, baseTop + ageTop, 300 * 2, 20, "#333", monthlyPaySize); // 年龄 - fillTextLineBreak(ctx, that.data.userInfo.agencyName, mycenter - ctx.measureText(that.data.userInfo.agencyName).width / 2, baseTop - fubiaotiTop, 400 * 2, 20, "#fff", monthlyPaySize, "600"); // 代理名称 + fillTextLineBreak(ctx, that.data.userInfo.agencyName, mycenter - ctx.measureText(that.data.userInfo.agencyName).width / 2, baseTop - fubiaotiTop, 400 * 2, 20, "#fff", monthlyPaySize, "600"); // 代理名称 - fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 2, baseTop + bottomSloganTop - 20, 300 * 2, 20, "#fff", monthlyPaySize); // 底部slogan + fillTextLineBreak(ctx, "长按查看职位详情", mycenter - ctx.measureText("长按查看职位详情").width / 2, baseTop + bottomSloganTop - 20, 300 * 2, 20, "#fff", monthlyPaySize); // 底部slogan - fillTextLineBreak(ctx, "好工作 放心干", mycenter - ctx.measureText("好工作 放心干").width / 1.6, baseTop + bottomSloganTop + 700, 500 * 2, 20, "#fff", titleSize); // 底部slogan - // let src - // src = that.data.jobDetail.store.logo.indexOf("https") > -1 ? that.data.jobDetail.store.logo : that.data.jobDetail.store.logo.replace("http", "https") - console.log(that.data.jobDetail.store.logo); + fillTextLineBreak(ctx, "好工作 放心干", mycenter - ctx.measureText("好工作 放心干").width / 1.6, baseTop + bottomSloganTop + 700, 500 * 2, 20, "#fff", titleSize); // 底部slogan + // let src + // src = that.data.jobDetail.store.logo.indexOf("https") > -1 ? that.data.jobDetail.store.logo : that.data.jobDetail.store.logo.replace("http", "https") + console.log(that.data.jobDetail.store.logo); - // }); - // setTimeout(() => { - // },500); - }) + // }); + // setTimeout(() => { + // },500); + }) .then(function () { wx.canvasToTempFilePath({ canvas: canvas, - success(res) { + success (res) { console.log(res); that.setData({ canvasImg: res.tempFilePath, }); resolve(res); }, - fail(res) { + fail (res) { wx.hideLoading(); wx.showToast({ @@ -840,7 +842,7 @@ Page({ * * */ - sharePoster() { + sharePoster () { wx.showLoading({ title: "生成中...", }); @@ -860,22 +862,22 @@ Page({ * * */ - hidedrawershow(e) { + hidedrawershow (e) { console.log(e); this.setData({ [e.detail.type]: false }) }, - hidePoster() { + hidePoster () { this.setData({ posterShow: false, }); }, - saveToalbum() { + saveToalbum () { let that = this; wx.saveImageToPhotosAlbum({ filePath: that.data.posterImg, - success(res) { + success (res) { console.log(res); if (res.errMsg == "saveImageToPhotosAlbum:ok") { wx.showToast({ @@ -885,7 +887,7 @@ Page({ }); } }, - fail(res) { + fail (res) { console.log(res); wx.showToast({ title: "图片保存失败", @@ -895,7 +897,7 @@ Page({ }, }); }, - getStoreJobDetailById() { + getStoreJobDetailById () { var that = this; wx.showLoading({ title: "加载中...", @@ -928,6 +930,10 @@ Page({ // item.url = item.url.replaceAll('http:','https:') // }); result.record.genderRestrict = commonUtil.getGenderByMinAge(result.record); + // 更新时间 + + result.record.update = dateUtil.timeShowXXX2(result.record.updateTime); + if (app.isNotEmptyCheck(title)) { title = result.record.jobName; } else { @@ -943,7 +949,7 @@ Page({ if (app.isNotEmptyCheck(result.record.calculationSalaryType)) { result.record.calculationSalaryType = result.record.calculationSalaryType.split("#")[0]; } - + // if (app.isNotEmptyCheck(result.record.jobDesp)) { // result.record.jobDesp = result.record.jobDesp.replaceAll("*****", "").split("————————")[0]; // } @@ -999,17 +1005,17 @@ Page({ // city = city.replace(/,/g, " | ") that.data.jobDetail = result that.showSexAge(); - - result.record["jobDesp1"] = `\n${result.record.jobName}\n\n一、薪资明细\n${result.record.salaryDetail}\n\n二、招聘要求\n${(that.data.showSexAgeText + '\n' + result.record.workContent) || '-'}\n\n三、其他说明\n${ result.record.otherDesp}\n\n四、注意事项\n${result.record.notes}` + + result.record["jobDesp1"] = `\n${result.record.jobName}\n\n一、薪资明细\n${result.record.salaryDetail}\n\n二、招聘要求\n${(that.data.showSexAgeText + '\n' + result.record.workContent) || '-'}\n\n三、其他说明\n${result.record.otherDesp}\n\n四、注意事项\n${result.record.notes}` that.setData({ jobDetail: result, isMaskShow: !(result.record.recruitment == "1"), - citys: citys || "-", + citys: citys , // addressNew: result.storeDistrict.replace(/,/g, "") + result.store.detailPosition, }); that.data.jobDetail.record["storeName"] = that.data.jobDetail.storeName ? that.data.jobDetail.storeName : that.data.jobDetail.record["storeName"]; - + // that.getAgencyInfo(result.record); @@ -1028,7 +1034,7 @@ Page({ }) }, - showSexAge() { + showSexAge () { var that = this; var manStr = ""; var womanStr = ""; @@ -1065,7 +1071,7 @@ Page({ /** * 处理后台返回的职位列表 */ - disposeJobListData(jobDetail) { + disposeJobListData (jobDetail) { var that = this; // item["workType"] = commonUtil.getWorkTypeById( @@ -1158,7 +1164,7 @@ Page({ // jobDetail.record['jobRequestLabelNames'] = that.getJobRequestLabelNamesArray(jobDetail.record.jobRequestLabelNames); // } }, - getJobSpecialLabelNamesArray(jobSpecialLabelNames) { + getJobSpecialLabelNamesArray (jobSpecialLabelNames) { console.log('getJobSpecialLabelNamesArray', jobSpecialLabelNames); if (app.isNotEmptyCheck(jobSpecialLabelNames)) { console.log('jobSpecialLabelNames.split(", ")', jobSpecialLabelNames.split(", ")); @@ -1166,14 +1172,14 @@ Page({ } return []; }, - getJobRequestLabelNamesArray(jobRequestLabelNames) { + getJobRequestLabelNamesArray (jobRequestLabelNames) { console.log(jobRequestLabelNames); if (app.isNotEmptyCheck(jobRequestLabelNames)) { return jobRequestLabelNames.split(", "); } return []; }, - goSimilar() { + goSimilar () { var that = this; console.log(that.data.jobDetail); @@ -1183,12 +1189,12 @@ Page({ url: "../similar/index?brandId=" + that.data.jobDetail.store.brandId + "&jobLabelId=" + that.data.jobDetail.record.jobLabelId + "&classify=99", }); }, - hideKefu() { + hideKefu () { this.setData({ kefuShow: false }) }, - makePhoneCall(e) { + makePhoneCall (e) { console.log('e', e); console.log(1); // return @@ -1231,7 +1237,7 @@ Page({ // }); // } }, - textPaste() { + textPaste () { var that = this; wx.setClipboardData({ // data: that.data.jobDetail.assistantUserWechat, @@ -1248,7 +1254,7 @@ Page({ title: "已复制微信号", content: "快去搜索添加经纪人好友吧", showCancel: false, - success(res) { + success (res) { if (res.confirm) { console.log("用户点击确定"); } else if (res.cancel) { @@ -1284,7 +1290,7 @@ Page({ },*/ - goNewEnroll(e) { + goNewEnroll (e) { let that = this; let argument; argument = JSON.stringify({ @@ -1307,9 +1313,9 @@ Page({ // url: `../newEnroll/enroll/index?applyType=1&info=${argument}`, // }); }, - emptyMethod() {}, + emptyMethod () { }, - getPhoneNumber(e) { + getPhoneNumber (e) { var that = this; console.log(e); console.log(e.detail.errMsg); @@ -1328,7 +1334,7 @@ Page({ var iv = e.detail.iv; var encryptedData = e.detail.encryptedData; wx.checkSession({ - success() { + success () { //session_key 未过期,并且在本生命周期一直有效 customRequest("/getWechatTel", { header: 'headers', @@ -1423,10 +1429,10 @@ Page({ // }, // }); }, - fail() { + fail () { // session_key 已经失效,需要重新执行登录流程 wx.login({ - success(res) { + success (res) { if (res.code) { console.log(res.code); //发起网络请求 @@ -1538,7 +1544,7 @@ Page({ } return false; }, - setCopy(e) { + setCopy (e) { var that = this; var contentInfo; const query = wx.createSelectorQuery().in(this); @@ -1549,9 +1555,9 @@ Page({ contentInfo = res.dataset.info; wx.setClipboardData({ data: e.currentTarget.dataset.content, - success(res) { + success (res) { wx.getClipboardData({ - success(res) { + success (res) { console.log(res.data); // data wx.showToast({ title: "内容已复制", @@ -1565,13 +1571,13 @@ Page({ }) .exec(); }, - changeContact() { + changeContact () { console.log(2123); wx.navigateTo({ url: `/pages/configAnnunciate/index`, }); }, - collectPaste(e) { + collectPaste (e) { console.log(1); var txt; var that = this; @@ -1599,7 +1605,7 @@ Page({ // }) // } }, - doCollected(collected, storeJobId) { + doCollected (collected, storeJobId) { var that = this; var url = "/user/collect/job/add"; if (collected - 1 == 0) { @@ -1700,7 +1706,7 @@ Page({ // }, // }); }, - toggleprice(type) { + toggleprice (type) { console.log(type); if (type.target.dataset.index == 1) { this.setData({ @@ -1712,7 +1718,7 @@ Page({ }); } }, - imageLoad() { + imageLoad () { this.setData({ isLoading: false, }); @@ -1722,17 +1728,37 @@ Page({ * * */ - modalMove() { + modalMove () { return false; }, - showTobe() { + showTobe () { this.setData({ iosDialogTobe: true, }); }, - closeTobe() { + closeTobe () { this.setData({ iosDialogTobe: false, }); }, + showFee () { + let that = this + wx.showModal({ + // title: "确认要转让创建人吗?", + content: that.data.jobDetail.record.returnFeeDesp, + contentColor: "#ccc", + confirmColor: "#1890ff", + confirmText: "确定", + showCancel: false, + success (res) { + // console.log(res); + // if (res.confirm) { + // wx.navigateTo({ + // url: `/pages/sendCreatorCode/index?info=${JSON.stringify(data.data)}`, + // }); + // } + + }, + }); + } }); \ No newline at end of file diff --git a/pages/detail/index.json b/pages/detail/index.json index 3528ba6..1834b0a 100644 --- a/pages/detail/index.json +++ b/pages/detail/index.json @@ -5,7 +5,7 @@ "navigationBarBackgroundColor":"#fff", "navigationBarTextStyle" :"black", "navigationBarTitleText": "", - "backgroundColor": "#fff" + "backgroundColor": "#f5f5f5" } \ No newline at end of file diff --git a/pages/detail/index.wxml b/pages/detail/index.wxml index 29252c3..2e7e972 100644 --- a/pages/detail/index.wxml +++ b/pages/detail/index.wxml @@ -1,12 +1,8 @@ - + - + 服务费: 仅登录可见 @@ -20,249 +16,277 @@ - - - - - - - {{jobDetail.record.jobName}} - + --> + + + + 代理佣金 + + + + {{fuWuFei || '--'}} + *** + + - - - - - - - - {{citys}} - - - - - {{jobDetail.record.genderRestrict}} - 丨{{jobDetail.record.age}} - + + + 佣金: + + 仅登录可见 + 仅代理可见 + + {{fuWuFei || '--'}} + *** + + + 佣金详情: + {{jobDetail.record.returnFeeDesp}} + *** + - - - - - - {{jobDetail.record.hourlyPay}} - /时 - - - - {{jobDetail.record.hourlyPay}} - /天 + + + + + + + + {{jobDetail.record.jobName}} + - - - {{jobDetail.record.hourlyPay}} - + {{jobDetail.record.update}} + + + + + + {{citys}} + + + {{citys ? '丨' :''}} + + + {{jobDetail.record.genderRestrict}} + 丨{{jobDetail.record.age}} + + - - - {{jobDetail.record.hourlyPay}} - + + + + + + {{item1}} - 计件 - - - {{jobDetail.record.hourlyPay}} - 保底 + + + {{itm || '-'}} + + 暂无特色 - 面议 - - - {{jobDetail.record.monthlyPay}} - /月 + + + + + + {{jobDetail.record.hourlyPay}} + /时 + + + + {{jobDetail.record.hourlyPay}} + /天 + + + + {{jobDetail.record.hourlyPay}} + + + + + {{jobDetail.record.hourlyPay}} + + + 计件 + + + {{jobDetail.record.hourlyPay}} + 保底 + + 面议 + + + {{jobDetail.record.monthlyPay}} + /月 + + + + + + {{jobDetail.record.monthlyPay || '--'}} + - - - - - {{jobDetail.record.monthlyPay || '--'}} - - - - - - {{item1}} - - - - - {{itm || '-'}} + + + + + {{(jobDetail.store.detailPosition ? jobDetail.store.detailPosition :jobDetail.record.storeAddr) || '暂无地址信息'}} + + + - 暂无特色 - - - - - - - {{(jobDetail.store.detailPosition ? jobDetail.store.detailPosition :jobDetail.record.storeAddr) || '暂无地址信息'}} - - - - - - + + - - - - - - + + + + + + - - - - - - - + - - - - - - - - 基本信息 - - + --> + + - + + + - + - + --> + - - - - - 职位描述 - - - - - - - - 温馨提示 - {{jobDetail.record.notes}} - - 薪资待遇 - - - 薪资明细 - {{jobDetail.record.salaryDetail}} - - - 招聘要求 - - - 性别年龄 - {{showSexAgeText}} - - - 岗位说明 - - - 班次工时 - {{jobDetail.record.workClasses}} - - - 其他说明 - {{jobDetail.record.otherDesp}} + --> + + + + 职位描述 + + - 对接信息 - - - + + + + 温馨提示 + {{jobDetail.record.notes}} + + 薪资待遇 + - 面试地点 - {{jobDetail.record.interviewAddr}} + 薪资明细 + {{jobDetail.record.salaryDetail}} - + 招聘要求 + - 面试地点 - {{jobDetail.record.interviewAddr}} + 性别年龄 + {{showSexAgeText}} - - - - 其它信息 - {{jobDetail.record.OtherInfo}} - - - - 面试 - - - 面试时间 - {{jobDetail.record.interviewDuration}} - - - + - - 出行方式 - {{jobDetail.record.tripMode}} - - + + 出行方式 + {{jobDetail.record.tripMode}} + + - - 面试说明 - {{jobDetail.record.interviewDesp}} - - - 入离职 - - + + 面试说明 + {{jobDetail.record.interviewDesp}} + + + 入离职 + + - - 入职说明 - {{jobDetail.record.entryDesp}} - - - 入职说明 - {{jobDetail.record.leaveRequire}} - - - 返厂 - {{jobDetail.record.leaveDesp}} - - - + + 入职说明 + {{jobDetail.record.entryDesp}} + + + 入职说明 + {{jobDetail.record.leaveRequire}} + + + 返厂 + {{jobDetail.record.leaveDesp}} + + + - - - 报名须知 - {{jobDetail.record.agencyStatement}} - + + + 报名须知 + {{jobDetail.record.agencyStatement}} + - - - 财务结算 - - + + + 财务结算 + + - - 服务费 - - 仅登录可见 - 仅代理可见 - - {{fuWuFei || '--'}} - *** - - - - + + 服务费 + + 仅登录可见 + 仅代理可见 + + {{fuWuFei || '--'}} + *** + + + + - + - + - + - - 服务费详情 - {{jobDetail.record.returnFeeDesp}} - - - 仅登录可见 - 仅代理可见 - - - - - - 复制 - - - {{jobDetail.record.jobDesp1}} - - - + + 服务费详情 + {{jobDetail.record.returnFeeDesp}} + + + 仅登录可见 + 仅代理可见 + + + + + + 复制 + + + {{jobDetail.record.jobDesp1}} + + + - - - + + + + --> + + diff --git a/pages/detail/index.wxss b/pages/detail/index.wxss index 4a23bfc..b4a680c 100644 --- a/pages/detail/index.wxss +++ b/pages/detail/index.wxss @@ -2,7 +2,10 @@ page, .pb180 { padding-bottom: 180px; - background-color: #fff; + background-color: #f5f5f5; +} +page{ + padding: 16px; } .p14 { padding: 14px; @@ -13,6 +16,13 @@ page, .pb10 { padding-bottom: 10px; } +.jobTitle { + font-size: 20px; + font-weight: 601; + color: rgba(0, 0, 0, 0.85); + line-height: 30px; + flex: 1; +} .desp-copy { color: #1890ff; font-size: 12px; diff --git a/utils/commonUtil.js b/utils/commonUtil.js index 8c9b200..e3677fd 100644 --- a/utils/commonUtil.js +++ b/utils/commonUtil.js @@ -1,3 +1,4 @@ +import dateUtil from './dateUtil.js' /** * 如果是null '' 'null' 'undefined' * @param item @@ -1168,7 +1169,7 @@ export function setJobInfoPosition (pos) { } }); citys = citys.join(",").replace(/,/g, " | "); - return citys || "-"; + return citys ; } /* 处理详情地址 @@ -1255,7 +1256,7 @@ export const cutShareImg = (imgUrl) => { * * */ - + export function disposeJobListData (recordList) { var that = this; console.log(recordList); @@ -1278,6 +1279,11 @@ export function disposeJobListData (recordList) { // console.log(item.salaryClassify, '=============', item.salaryClassifyValue); item["salaryClassifyValueHaibao"] = getSalaryClassifyValue1(item.salaryClassify, item.salaryClassifyValue); item["salaryClassifyValue"] = getSalaryClassifyValue(item.salaryClassify, item.salaryClassifyValue); + // x天前更新 + item["update"] = dateUtil.timeShowXXX2(item.updateTime); + console.log('item["update"]',item["update"]); + item.genderRestrict = getGenderByMinAge(item); + // //时薪 // var hourlyPayStr = ''; // var hasHourlyPay = false; @@ -1319,9 +1325,9 @@ export function disposeJobListData (recordList) { // } item["monthlyPay"] = monthlyPayStr; //地址深圳丨龙岗区丨 - let citys = setJobListInfoPosition(item.district); + let citys = setJobInfoPosition(item.storeDistrict); - // console.log(citys); + console.log('citys',citys); var districtStr = ""; if (isNotEmptyCheck(item.district)) { var districtArr = item.district.split(","); diff --git a/utils/dateUtil.js b/utils/dateUtil.js index 704dba9..f684336 100644 --- a/utils/dateUtil.js +++ b/utils/dateUtil.js @@ -786,24 +786,44 @@ function timeShow(val) { return hour; } - +function timeShowXXX2(val) { + const now = Date.now(); + const diff = now - val; + + const seconds = Math.floor(diff / 1000); + const minutes = Math.floor(seconds / 60); + const hours = Math.floor(minutes / 60); + const days = Math.floor(hours / 24); + + if (days < 2) { + if (hours > 0) { + return `${hours}小时前`; + } else if (minutes > 0) { + return `${minutes}分钟前`; + } else { + return `${seconds}秒前`; + } + } else { + return `${days}天前`; + } +} function timeShowXXX(val) { if (isEmptyCheck(val)) { return ""; } let date = ""; let differenceTime = new Date().getTime() - new Date(val).getTime(); - var D = Math.floor(differenceTime / (24 * 60 * 60 * 1000)); - var level1 = differenceTime % (24 * 3600 * 1000); - var H = Math.floor(level1 / (3600 * 1000)); + var D = Math.floor(differenceTime / (48 * 60 * 60 * 1000)); + var level1 = differenceTime % (48 * 3600 * 1000); + var H = Math.floor(level1 / ( 48 * 3600 * 1000)); var level2 = level1 % (3600 * 1000); var M = Math.floor(level2 / (60 * 1000)); var level3 = level2 % (60 * 1000); var S = Math.floor(level3 / 1000); date = null; - if (D > 0 && D <= 100) { + if (D > 1 && D <= 100) { date = D + "天前"; - } else if (D > 0) { + } else if (D > 1) { let date1 = new Date(val); var y = date1.getFullYear(); var m = date1.getMonth() + 1; @@ -962,4 +982,5 @@ module.exports = { getUserApplyOrderTypeByType, splitRemark, timeShow, + timeShowXXX2 };