@@ -126,6 +128,7 @@ export default {
// path += (path.indexOf("?") >= 0 ? "&" : "?") + "agencyUserId=" + app.globalData.loginUserInfo.id;
// }
if (this.checkedList.length == 0) {
+ console.log("unpass");
throw Error;
} else {
return {
@@ -135,14 +138,17 @@ export default {
arr.push(item.id);
});
this.getCanvas(this.shareJobBaseImg, "setJob").then((res) => {
- console.log(res);
+ console.log("this.shareJobBaseImg", res);
uni.hideLoading();
+ // setTimeout(() => {
resolve({
title: "你想找的厂都有,立即查看",
imageUrl: res.tempFilePath,
path: `/root/home/shareList?scene=i=${arr.join("_")},u=${this.userInfo.agencyId}_${this.userInfo.id}`,
// path: '/pages/shareList/index'
});
+ // }, 100);
+
// return
});
}),
@@ -227,7 +233,7 @@ export default {
checkedList: [],
posterShow: false,
navInfo: {},
- shareJobBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/poster0106.png", // 分享职位基础图片
+ shareJobBaseImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/1shoudan/poster0106_1.png", // 分享职位基础图片
sharelImg: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/2023-09-01/7ca85384-9f22-474d-893f-092b61de684d_share.png", // 分享职位基础图片
currCode: "",
posterImg: "", // 海报图片
@@ -582,7 +588,7 @@ export default {
.select("#canvasId")
.fields({ node: true, size: true })
.exec((res) => {
- console.log(res);
+ console.log("getCanvas", res);
const canvas = res[0].node;
const ctx = canvas.getContext("2d");
new Promise(function (resolve) {
@@ -590,6 +596,7 @@ export default {
uni.getImageInfo({
src: sharelImg, // 网络图片
success(res) {
+ console.log("getImageInfo", res);
console.log(res);
var width = res.width;
var height = res.height;
@@ -619,6 +626,7 @@ export default {
uni.canvasToTempFilePath({
canvas: canvas1,
success(res) {
+ console.log("setShareJobImg", res);
console.log(res);
resolve(res);
},
@@ -801,6 +809,9 @@ export default {
*/
setShareJobImg(ctx, canvas, funObj) {
let that = this;
+ uni.showLoading({
+ title: "生成中...",
+ });
return new Promise((imgres) => {
// ctx.arcTo()
let baseTop, logoLeft, titleSize, ageTop, salaryClassifyValueLeft, salaryClassifyValueTop, monthlyPaySize, roundRectHeight, fubiaotiTop;
@@ -814,27 +825,27 @@ export default {
salaryClassifyValueTop = 10;
monthlyPaySize = 32;
console.log(123);
- try {
- that.checkedList.forEach((item, index) => {
- if (index <= 2) {
- let labelLeft = 0;
- console.log("item1", item);
- that.G.roundRect1(ctx, 32, baseTop - 60 + baseMiddle * index, 776, roundRectHeight, 24, "#fff");
- that.G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800, 20, "#333", titleSize, "500"); // 岗位标题
- // 薪资位置更新(保留副本)
- // that.G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, salaryClassifyValueLeft + 500, baseTop - 10 + salaryClassifyValueTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
- that.G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, canvas.width - ctx.measureText(item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue).width - 40 , baseTop + ageTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
- // setTimeout(() => {
- // that.G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
- // }, 0);
- that.G.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 省市
- that.G.fillTextLineBreak(ctx, "丨" + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 年龄
- }
- });
- imgres(canvas);
- } catch (error) {
- console.log('error',error);
- }
+ try {
+ that.checkedList.forEach((item, index) => {
+ if (index <= 2) {
+ let labelLeft = 0;
+ console.log("item1", item);
+ that.G.roundRect1(ctx, 32, baseTop - 60 + baseMiddle * index, 776, roundRectHeight, 24, "#fff");
+ that.G.fillTextLineBreak(ctx, item.jobName, logoLeft, baseTop + baseMiddle * index, 800, 20, "#333", titleSize, "500"); // 岗位标题
+ // 薪资位置更新(保留副本)
+ // that.G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, salaryClassifyValueLeft + 500, baseTop - 10 + salaryClassifyValueTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
+ that.G.fillTextLineBreak(ctx, item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue, canvas.width - ctx.measureText(item.cus_price == "月薪" ? item.monthlyPay : item.salaryClassifyValue).width - 40, baseTop + ageTop + baseMiddle * index, 400, 20, "#ff4400", titleSize - 4, "600"); // 时薪
+ // setTimeout(() => {
+ // that.G.fillTextLineBreak(ctx, item.monthlyPay, salaryClassifyValueLeft + ctx.measureText(item.salaryClassifyValue + " ").width, baseTop + salaryClassifyValueTop + baseMiddle * index, 400 , 20, "#ff4400", monthlyPaySize, "400"); // 月工资
+ // }, 0);
+ that.G.fillTextLineBreak(ctx, item.district, logoLeft, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 省市
+ that.G.fillTextLineBreak(ctx, "丨" + item.age, logoLeft + ctx.measureText(item.district).width, baseTop + ageTop + baseMiddle * index, 500, 20, "#999", monthlyPaySize); // 年龄
+ }
+ });
+ imgres(canvas);
+ } catch (error) {
+ console.log("error", error);
+ }
// setTimeout(() => {
// },500);
});
diff --git a/root/home/shareList.vue b/root/home/shareList.vue
index c8f50d4..af056e8 100644
--- a/root/home/shareList.vue
+++ b/root/home/shareList.vue
@@ -1,7 +1,7 @@
- 关注该代理可查看其佣金, 点击直接关注
+ 关注该发单号可查看其佣金, 点击直接关注
diff --git a/root/person/loginIndex.vue b/root/person/loginIndex.vue
index 46c7de1..e4067a9 100644
--- a/root/person/loginIndex.vue
+++ b/root/person/loginIndex.vue
@@ -327,7 +327,8 @@ export default {
url: that.path,
});
}
- if ($data.agencyStatus == 1) {
+ if ($data.agencyId) {
+ // if ($data.agencyStatus == 1) {
that.G.Get(that.api.login_agencyInfo, {}, (aRes) => {
console.log("获取团队信息:", aRes);
uni.setStorageSync("agencyInfo", aRes.agency); // 1是创建者 2是普通成员
From 847ece53b372667ce838877ab893237d5ee42616 Mon Sep 17 00:00:00 2001
From: wangxia <779219182@qq.com>
Date: Fri, 15 Aug 2025 15:30:50 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E7=9B=91=E5=90=AC=E7=94=A8=E6=88=B7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
App.vue | 36 +++++++++++++++++++-----------------
components/list/job.vue | 2 +-
components/panel/fixed.vue | 5 +++--
pages/person/index.vue | 28 +++++++++++++++++-----------
root/bind/myMain.vue | 42 +++++++++++++++++++++++++++++-------------
root/components/applyFlow.vue | 24 +++++++++++++++++++-----
root/detail/userShare.vue | 1 +
root/person/change.vue | 30 +++++++++++++++++-------------
8 files changed, 106 insertions(+), 62 deletions(-)
diff --git a/App.vue b/App.vue
index f42a097..c8a0cb6 100644
--- a/App.vue
+++ b/App.vue
@@ -143,7 +143,7 @@ export default {
appkey: opts.appkey,
needReconnect: true,
// "reconnectionAttempts": 5,
- debugLevel: "debug",
+ debugLevel: "error",
apiVersion: "v2",
enableV2CloudConversation: true,
},
@@ -304,22 +304,24 @@ export default {
if (uni.getStorageSync("apply-token")) {
that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
console.log("获取待处理数量:", res);
- if (res.approvePassHasNotRed > 0) {
- uni.setTabBarBadge({
- index: 2,
- text: String(res.approvePassHasNotRed),
- fail(err) {
- console.log("err", err);
- },
- });
- } else {
- uni.removeTabBarBadge({
- index: 2,
- fail(err) {
- console.log("err", err);
- },
- });
- }
+ that.G.Get(that.api.person_applyNum, {}, (applyNum) => {
+ if (res.approvePassHasNotRed + applyNum > 0) {
+ uni.setTabBarBadge({
+ index: 2,
+ text: String(res.approvePassHasNotRed+ applyNum),
+ fail(err) {
+ console.log("err", err);
+ },
+ });
+ } else {
+ uni.removeTabBarBadge({
+ index: 2,
+ fail(err) {
+ console.log("err", err);
+ },
+ });
+ }
+ });
});
}
},
diff --git a/components/list/job.vue b/components/list/job.vue
index 9c2d2c9..f5d55e0 100644
--- a/components/list/job.vue
+++ b/components/list/job.vue
@@ -21,7 +21,7 @@
-
+
diff --git a/components/panel/fixed.vue b/components/panel/fixed.vue
index 894fb61..7b00a25 100644
--- a/components/panel/fixed.vue
+++ b/components/panel/fixed.vue
@@ -15,10 +15,11 @@
left: 0;
background-color: #fff;
padding-top: 12px;
- padding-bottom: constant(safe-area-inset-bottom); /*兼容 IOS<11.2*/
- padding-bottom: env(safe-area-inset-bottom); /*兼容 IOS>11.2*/
+ padding-bottom: calc(constant(safe-area-inset-bottom)); /*兼容 IOS<11.2*/
+ padding-bottom: calc(env(safe-area-inset-bottom)); /*兼容 IOS>11.2*/
min-height:72px;
border-top: 1rpx solid #eee;
z-index: 999;
+ box-sizing: border-box;
}
\ No newline at end of file
diff --git a/pages/person/index.vue b/pages/person/index.vue
index 504602d..2c9b49e 100644
--- a/pages/person/index.vue
+++ b/pages/person/index.vue
@@ -176,7 +176,6 @@ export default {
scrollTop: 0,
defaultTop: 0,
pageSpeed: -1,
- isLogin: null,
localBaseImg: this.G.store().localBaseImg,
cdnBaseImg: this.G.store().cdnBaseImg,
showDot: true, // 小红点是否显示
@@ -347,7 +346,7 @@ export default {
that.isCreator = uni.getStorageSync("IS_CREATOR") == 1 ? true : false;
that.agencyInfo = uni.getStorageSync("agencyInfo");
if (uni.getStorageSync("apply-userinfo").agencyId) {
- // if (uni.getStorageSync("apply-userinfo").agencyStatus == 1) {
+ // if (uni.getStorageSync("apply-userinfo").agencyStatus == 1) {
this.getCompanyInfo();
}
});
@@ -781,21 +780,28 @@ export default {
that.G.Get(that.api.bind_getApplyNum, {}, (res) => {
console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) {
- uni.setTabBarBadge({
- index: 2,
- text: String(res.approvePassHasNotRed),
- });
that.readed = false;
} else {
- try {
+ that.readed = true;
+ }
+ that.G.Get(that.api.person_applyNum, {}, (applyNum) => {
+ if (res.approvePassHasNotRed + applyNum > 0) {
+ uni.setTabBarBadge({
+ index: 2,
+ text: String(res.approvePassHasNotRed + applyNum),
+ fail(err) {
+ console.log("err", err);
+ },
+ });
+ } else {
uni.removeTabBarBadge({
index: 2,
+ fail(err) {
+ console.log("err", err);
+ },
});
- } catch (error) {
- console.log("当前页面不是 TabBar 页面,无法移除 badge");
}
- that.readed = true;
- }
+ });
});
},
goOrder(e) {
diff --git a/root/bind/myMain.vue b/root/bind/myMain.vue
index 193f9b3..88259b3 100644
--- a/root/bind/myMain.vue
+++ b/root/bind/myMain.vue
@@ -371,25 +371,25 @@ export default {
// 二维码右下角的
that.G.roundRect1(ctx, (mycenter - 600) / 2 + 470, qrTop + 475, 136, 136, 80, baseColor);
// 绘制关注发单号文字
- that.G.fillTextLineBreak(ctx, "扫一扫关注我的发单号", (mycenter - "扫一扫关注我的发单号".length * 54) / 2 + 40, canvas.height - 515, "扫一扫关注我的发单号".length * 54, 58, "#333", 54, 600); // 总职位
+ that.G.fillTextLineBreak(ctx, "扫一扫关注我的发单号", (mycenter - "扫一扫关注我的发单号".length * 54) / 2 , canvas.height - 515, "扫一扫关注我的发单号".length * 54, 58, that.isLightColor(baseColor) ? '#333' : '#fff', 54, 600); // 总职位
that.G.drawCenteredText(ctx, mycenter, canvas.height - 300, [{ content: "该图片请不要发给工友", color: "#d30000", fontWeight: 500, fontSize: 72 }]);
that.G.drawCenteredText(ctx, mycenter, canvas.height - 200, [{ content: "关注后能直接看到单子的代理费/佣金", color: "#333", fontWeight: 500, fontSize: 48 }]);
// 绘制头像背景色
that.G.roundRect_yuan(ctx, (mycenter - 360) / 2, 110, 360, "#ffffff");
- uni.getImageInfo({
- src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png", // 手机图标图片
- success(res) {
- const img = canvas.createImage();
- console.log("res333", res);
- img.src = res.path;
- img.onload = () => {
- that.G.roundRect(ctx, img, (mycenter - 800) / 2 + 100, canvas.height - 565, 70, 70, 0);
+ // uni.getImageInfo({
+ // src: "https://matripe-cms.oss-cn-beijing.aliyuncs.com/dailibaoming/phone.png", // 手机图标图片
+ // success(res) {
+ // const img = canvas.createImage();
+ // console.log("res333", res);
+ // img.src = res.path;
+ // img.onload = () => {
+ // that.G.roundRect(ctx, img, (mycenter - 800) / 2 + 100, canvas.height - 565, 70, 70, 0);
resolve(true);
- };
- },
- });
+ // };
+ // },
+ // });
};
},
fail(err) {
@@ -469,6 +469,22 @@ export default {
},
});
},
+ // 判断颜色是浅色还是深色
+ isLightColor(hexColor, threshold = 180) {
+ hexColor = hexColor.replace("#", "");
+
+ if (hexColor.length === 3) {
+ hexColor = hexColor[0] + hexColor[0] + hexColor[1] + hexColor[1] + hexColor[2] + hexColor[2];
+ }
+
+ const r = parseInt(hexColor.substring(0, 2), 16);
+ const g = parseInt(hexColor.substring(2, 4), 16);
+ const b = parseInt(hexColor.substring(4, 6), 16);
+
+ const brightness = (r * 299 + g * 587 + b * 114) / 1000;
+
+ return brightness > threshold;
+ },
// 设置分享布局
setShareJobImg(ctx, canvas, mycenter, funObj) {
let that = this;
@@ -514,7 +530,7 @@ export default {
{ content: "粉丝", color: "#666", fontWeight: 500, fontSize: 56, space: 40 },
];
that.G.drawCenteredText(ctx, mycenter + 20, 745, textSegments);
- imgres(canvas);
+ imgres(canvas);
};
},
fail(err) {},
diff --git a/root/components/applyFlow.vue b/root/components/applyFlow.vue
index d6a9946..32eaa66 100644
--- a/root/components/applyFlow.vue
+++ b/root/components/applyFlow.vue
@@ -23,7 +23,7 @@
报名助手温馨提示
-
@@ -154,7 +154,19 @@ export default {
// 计算属性
computed: {},
// 侦听器
- watch: {},
+ watch: {
+ joinTeamConfirm(newVal) {
+ if (newVal) {
+ this.teamInfo = {};
+ this.chooseTeam = {};
+ }
+ },
+ submitConfirm(newVal) {
+ if (newVal) {
+ this.agencyInfo.fullName = "";
+ }
+ },
+ },
created() {
console.log("alsdfjlasdjfl;askdfjo");
},
@@ -211,9 +223,11 @@ export default {
content: "您已发起申请,审核通过即可加入该团队",
success: (res) => {
if (res.confirm) {
- uni.switchTab({
- url: "/pages/home/index",
- });
+ if (that.navNewPage) {
+ uni.switchTab({
+ url: "/pages/home/index",
+ });
+ }
}
},
});
diff --git a/root/detail/userShare.vue b/root/detail/userShare.vue
index 4bb5d2e..6176955 100644
--- a/root/detail/userShare.vue
+++ b/root/detail/userShare.vue
@@ -248,6 +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');
} else {
this.uid = options.id;
this.isShowMore = options.isShowMore ? true : false;
diff --git a/root/person/change.vue b/root/person/change.vue
index fba559a..3bcc090 100644
--- a/root/person/change.vue
+++ b/root/person/change.vue
@@ -1,7 +1,19 @@
-
+ {{ info.label }}
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+ -->