diff --git a/components/customTabbar.vue b/components/customTabbar.vue index 81bcb9d..6805ea2 100644 --- a/components/customTabbar.vue +++ b/components/customTabbar.vue @@ -57,13 +57,7 @@ export default { text: "首页", iconSize: 48, }, - { - iconPath: "icon-fadanhao-31 g_c_9", - selectedIconPath: "icon-fadanhao-31 g_c_main", - pagePath: "/pages/home/order", - text: "发单号", - iconSize: 48, - }, + { iconPath: "icon-message g_c_9", selectedIconPath: "icon-message g_c_main", @@ -72,7 +66,7 @@ export default { iconSize: 78, iconType: "custom", }, - + { iconPath: "icon-order_active g_c_9", selectedIconPath: "icon-order_active g_c_main", @@ -81,6 +75,13 @@ export default { iconSize: 48, count: 0, }, + { + iconPath: "icon-fadanhao-31 g_c_9", + selectedIconPath: "icon-fadanhao-31 g_c_main", + pagePath: "/pages/home/order", + text: "发单号", + iconSize: 48, + }, { iconPath: "icon-user g_c_9", selectedIconPath: "icon-user g_c_main", diff --git a/components/list/job.vue b/components/list/job.vue index 8d1c3cb..9ecc449 100644 --- a/components/list/job.vue +++ b/components/list/job.vue @@ -110,12 +110,12 @@ - - + + - {{ item.fullName || item.agencyName || "-" }} + {{ item.fullName || item.agencyName || "-" }} @@ -346,6 +346,20 @@ export default { }, }); }, + + toApplyInfo($item) { + let that = this; + let params = { + id: $item.agencyId, + type: 1, + shareForm: "apply", + isShowMore: true, + isShowJob: true, + }; + uni.navigateTo({ + url: "/root/detail/userShare?" + that.G.objToStr(params), + }); + }, handleCard($item) { console.log("$item", $item); let that = this; diff --git a/components/myMain.vue b/components/myMain.vue index fdc99fe..18f4819 100644 --- a/components/myMain.vue +++ b/components/myMain.vue @@ -162,11 +162,18 @@ export default { // #endif }, + lifetimes: { + // 组件生命周期函数,在组件实例被从页面节点树移除时执行 + detached() { + console.log('detacheddetacheddetacheddetacheddetached'); + uni.removeStorageSync("poster_img"); + }, + }, watch: { shareJobImg(newValue, oldValue) { console.log("shareJobImg123", newValue); if (newValue) { - console.log("shareJobImg345", newValue); + console.log("shareJobImg345", newValue); uni.hideLoading(); } }, @@ -491,17 +498,17 @@ export default { } // 如果数字小于1000,直接返回 - if (num < 1000) { + if (num < 10000) { return num.toString(); } // 如果数字小于10000,转换为千 - if (num < 10000) { - return (num / 1000).toFixed(fixed) + "千"; - } + // if (num < 10000) { + // return (num / 1000).toFixed(fixed) + "K"; + // } // 如果数字大于等于10000,转换为万 - return (num / 10000).toFixed(fixed) + "万"; + return (num / 10000).toFixed(fixed); }, // 设置分享布局 setShareJobImg(ctx, canvas, mycenter, funObj) { @@ -539,14 +546,7 @@ export default { // that.G.fillTextLineBreak(ctx, "今日更新职位" + info.jobUpdateNum, 140, 400, ("今日更新职位" + info.jobUpdateNum).length * 56, 56, "#999", 56, 500, "left"); // 今日更新职位 console.log("that.formatNumberAdvanced(info.jobNum)", that.formatNumberAdvanced(info.jobNum)); - const textSegments = [ - { content: that.formatNumberAdvanced(info.jobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, - { content: "总职位", color: "#666", fontWeight: 500, fontSize: 56, space: 70 }, - { content: that.formatNumberAdvanced(info.recruitmentJobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, - { content: "在招数", color: "#666", fontWeight: 500, fontSize: 56, space: 70 }, - { content: that.formatNumberAdvanced(info.downNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, - { content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 }, - ]; + const textSegments = [{ content: that.formatNumberAdvanced(info.jobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: info.jobNum < 10000 ? 10 : 0 }, info.jobNum < 10000 ? null : { content: "万", color: "#000", fontWeight: 500, fontSize: 64, space: 10 }, { content: "总职位", color: "#666", fontWeight: 500, fontSize: 56, space: 70 }, { content: that.formatNumberAdvanced(info.recruitmentJobNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, { content: "在招", color: "#666", fontWeight: 500, fontSize: 56, space: 70 }, { content: that.formatNumberAdvanced(info.downNum).toString(), color: "#000", fontWeight: 500, fontSize: 80, space: 10 }, { content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 }]; that.G.drawCenteredText(ctx, mycenter + 20, 745, textSegments); imgres(canvas); }; diff --git a/components/panel/formSlot.vue b/components/panel/formSlot.vue index c14885b..04998a7 100644 --- a/components/panel/formSlot.vue +++ b/components/panel/formSlot.vue @@ -10,6 +10,7 @@ 'padding-left': (item.pRow ? item.pRow : 10) + 'px', 'padding-right': (item.pRow ? item.pRow : 10) + 'px', }" + v-if="item" >
@@ -72,10 +73,12 @@
-
@@ -182,7 +185,7 @@
- {{ JSON.parse(props.msg.attachment.raw).serviceFee ? JSON.parse(props.msg.attachment.raw).serviceFee : '详询客服' }} + {{ JSON.parse(props.msg.attachment.raw).serviceFee ? JSON.parse(props.msg.attachment.raw).serviceFee : '费用待定' }}
diff --git a/root/bind/search.vue b/root/bind/search.vue index ee5af33..e0cfe37 100644 --- a/root/bind/search.vue +++ b/root/bind/search.vue @@ -98,6 +98,7 @@ export default { onReady() { this.G.setNavStyle(); }, + onShareAppMessage1() { let that = this; let params = { @@ -127,6 +128,10 @@ export default { title: "发展代理", }); } + uni.onAfterPageUnload(() => { + console.log("onAfterPageUnload"); + uni.removeStorageSync("poster_img"); + }); }, onShow() { this.getDetail(); diff --git a/root/components/chatEvent/markdown.vue b/root/components/chatEvent/markdown.vue index 5712fc7..c25045c 100644 --- a/root/components/chatEvent/markdown.vue +++ b/root/components/chatEvent/markdown.vue @@ -76,7 +76,7 @@ - {{ item.fuWuFei || "详询客服" }} + {{ item.fuWuFei || "费用待定" }} {{ "仅代理可见" }} diff --git a/root/detail/job.vue b/root/detail/job.vue index 732330d..063f968 100644 --- a/root/detail/job.vue +++ b/root/detail/job.vue @@ -29,7 +29,7 @@
- {{ jobDetail.serverPrice || "详询客服" }} + {{ jobDetail.serverPrice || "费用待定" }} *** @@ -1307,8 +1307,8 @@ export default { title = "佣金: " + that.jobDetail.serverPrice; content = that.jobDetail.returnFeeDesp; } else { - title = "详询客服"; - content = "因三方项目政策变动太快,详情请咨询客服。页面左下角点击“联系客服”直接联系我哟~"; + title = "费用待定"; + content = "费用暂未公布"; } that.G.handleConfirm({ diff --git a/root/detail/userShare.vue b/root/detail/userShare.vue index 6176955..26f6df7 100644 --- a/root/detail/userShare.vue +++ b/root/detail/userShare.vue @@ -23,7 +23,7 @@ - + @@ -248,7 +248,7 @@ export default { this.inviteUserId = sceneJson.id.split("_")[1]; //被关注团队的邀请人id this.uid = sceneJson.id.split("_")[0]; // 被关注团队的id this.fromQRCode = true; // 被关注团队的id - that.G.watchUserPage('/root/detail/userShare'); + that.G.watchUserPage("/root/detail/userShare"); } else { this.uid = options.id; this.isShowMore = options.isShowMore ? true : false; diff --git a/root/home/quickApplication.vue b/root/home/quickApplication.vue index 0007019..bf5c5c9 100644 --- a/root/home/quickApplication.vue +++ b/root/home/quickApplication.vue @@ -192,7 +192,7 @@ export default { }, data() { return { - detailRes:{}, + detailRes: {}, IS_CREATOR: false, jobType: 2, isFans: 2, @@ -245,9 +245,9 @@ export default { that.detailRes = res.record; let policyStr; if (that.isFans == 2) { - policyStr = "1. 佣金:" + (res.record.returnFeeType !== "" ? that.G.setReturnFee(res.record.returnFee, res.record.returnFeeType) : "详询客服") + " \n\n" + "2. 佣金详情:" + (res.record.returnFeeDesp || "详询客服") + " \n\n" + "3. 薪资待遇:" + (res.record.salaryDetail || "详询客服") + "\n\n"; + policyStr = "1. 佣金:" + (res.record.returnFeeType !== "" ? that.G.setReturnFee(res.record.returnFee, res.record.returnFeeType) : "费用待定") + " \n\n" + "2. 佣金详情:" + (res.record.returnFeeDesp || "费用待定") + " \n\n" + "3. 薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n"; } else { - policyStr = "薪资待遇:" + (res.record.salaryDetail || "详询客服") + "\n\n"; + policyStr = "薪资待遇:" + (res.record.salaryDetail || "-") + "\n\n"; } console.log("政策列表:", res); that.setFormList(policyStr); @@ -303,19 +303,21 @@ export default { suffix: "icon-dizhi1", }, - { - icon: "", - label: "财务结算", - result: "", - path: "", - value: policyStr || "-", - tip: "slot-caiwu", - require: false, - customRequire: false, - type: "slot", - pColumn: 12, - from: "slot-caiwu", - }, + that.updateInfo.jobId + ? { + icon: "", + label: "项目政策", + result: "", + path: "", + value: policyStr || "-", + tip: "slot-caiwu", + require: false, + customRequire: false, + type: "slot", + pColumn: 12, + from: "slot-caiwu", + } + : null, ]; } else { that.jobData = [ @@ -323,7 +325,7 @@ export default { icon: "", label: "报名职位", result: that.updateInfo.jobName, - path: '', + path: "", placeholder: "请选择报名职位", fontColor: that.updateInfo.jobName == "请选择报名职位" ? "g_c_9" : "g_c_3", tip: "applia-job", @@ -344,19 +346,21 @@ export default { pColumn: 12, from: "reservation-time", }, - { - icon: "", - label: "财务结算", - result: "", - path: "", - value: policyStr || "-", - tip: "slot-caiwu", - require: false, - customRequire: false, - type: "slot", - pColumn: 12, - from: "slot-caiwu", - }, + that.updateInfo.jobId + ? { + icon: "", + label: "项目政策", + result: "", + path: "", + value: policyStr || "-", + tip: "slot-caiwu", + require: false, + customRequire: false, + type: "slot", + pColumn: 12, + from: "slot-caiwu", + } + : null, ]; } diff --git a/root/person/orderEdit.vue b/root/person/orderEdit.vue index e3f4465..126c69a 100644 --- a/root/person/orderEdit.vue +++ b/root/person/orderEdit.vue @@ -129,7 +129,7 @@ export default { }, data() { return { - readed:false, + readed: false, isAdmin: uni.getStorageSync("apply-userinfo").admin, userInfo: uni.getStorageSync("apply-userinfo"), teamSetShow: false, @@ -147,7 +147,7 @@ export default { }, onShow() { console.log("企业资料 show"); - this.getNum() + this.getNum(); }, created() { var that = this; @@ -177,11 +177,11 @@ export default { // } }, methods: { - getNum(){ + getNum() { let that = this; - that.G.Get(that.api.person_applyNum,{},(res)=>{ + that.G.Get(that.api.person_applyNum, {}, (res) => { that.readed = res; - }) + }); }, save() { let that = this; @@ -228,7 +228,7 @@ export default { }); } that.resetInfo(); - that.getNum() + that.getNum(); }); }, resetInfo() { @@ -237,8 +237,8 @@ export default { { icon: "", label: "企业头像", - value: that.info.logo, - path: "/root/person/agencyAvatar?label=企业头像&fieldName=logo&value=" + that.info.logo, + value: that.info.logo || "https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/storeDefault.jpg", + path: "/root/person/agencyAvatar?label=企业头像&fieldName=logo&value=" + that.info.logo || "https://matripe-cms.oss-cn-beijing.aliyuncs.com/ibocai/storeDefault.jpg", tip: "avatar", type: "text", fontSize: "16px", @@ -365,10 +365,10 @@ export default { // }); // } }, - goMarge(){ + goMarge() { uni.navigateTo({ - url:'/root/person/marge' - }) + url: "/root/person/marge", + }); }, teamSet() { this.teamSetShow = true; diff --git a/utils/common.js b/utils/common.js index 7ebe5e9..8fc14f1 100644 --- a/utils/common.js +++ b/utils/common.js @@ -7,9 +7,9 @@ let data = { localBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/APP/", // app图片前缀 cdnBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/", // cdn图片公共前缀路径 v3BaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/v3/", // cdn图片公共前缀路径 - fadanBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/", + fadanBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/", loginText: '请登录', - coziID:'7537572244600471579', + coziID: '7537572244600471579', // #ifdef MP-WEIXIN version: uni.getAccountInfoSync().miniProgram.version || "1.0.16", // #endif @@ -1263,9 +1263,13 @@ let data = { calculateTotalWidth (ctx, segments) { let totalWidth = 0; segments.forEach((segment) => { - ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`; - totalWidth += ((ctx.measureText(segment.content).width) + (segment.space || 0)); + console.log('segment',segment); + if (segment) { + ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`; + totalWidth += ((ctx.measureText(segment.content).width) + (segment.space || 0)); + } }); + return totalWidth; }, // 绘制单行居中的拼接文本 @@ -1282,17 +1286,20 @@ let data = { // 绘制拼接文本 let currentX = startX; textSegments.forEach((segment) => { - ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`; - ctx.fillStyle = segment.color; + if (segment) { + ctx.font = `${segment.fontWeight} ${segment.fontSize}px Arial`; + ctx.fillStyle = segment.color; - // 文本基线设为中间,使垂直方向也居中 - // ctx.textBaseline = "middle"; + // 文本基线设为中间,使垂直方向也居中 + // ctx.textBaseline = "middle"; - // 绘制当前文本片段 - ctx.fillText(segment.content, currentX, centerY); + // 绘制当前文本片段 + ctx.fillText(segment.content, currentX, centerY); + + // 更新X坐标,为下一段文本做准备, 文本长度为1的时候,使用字体大小 + currentX += ((ctx.measureText(segment.content).width) + (segment.space || 0)); + } - // 更新X坐标,为下一段文本做准备, 文本长度为1的时候,使用字体大小 - currentX += ((ctx.measureText(segment.content).width) + (segment.space || 0)); }); }, /**