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 @@