From ae53783f9b5793427e6021c8b9ad4ca51c9d30b9 Mon Sep 17 00:00:00 2001 From: wangxia <779219182@qq.com> Date: Tue, 17 Jun 2025 10:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=80=81=E4=B9=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- App.vue | 29 ++++++++++++----------------- api/bind.js | 1 + main.js | 1 + pages/home/index.vue | 3 +-- pages/workBench/index.vue | 35 +++++++++++++++-------------------- root/home/editTownsman.vue | 37 +++++++++++++++++++++---------------- root/home/quickApplication.vue | 6 +++--- 7 files changed, 54 insertions(+), 58 deletions(-) diff --git a/App.vue b/App.vue index ea3fe5c..dca0be2 100644 --- a/App.vue +++ b/App.vue @@ -51,24 +51,19 @@ export default { checkNum() { let that = this; if (uni.getStorageSync("apply-token")) { - that.G.Get( - that.api.bind_getWaitNum + "/" + 1, - { - }, - (res) => { - console.log("获取待处理数量:", res); - if (res.unread > 0) { - uni.setTabBarBadge({ - index: 1, - text: String(res.unread), - }); - } else { - uni.removeTabBarBadge({ - index: 1, - }); - } + that.G.Get(that.api.bind_getApplyNum, {}, (res) => { + console.log("获取待处理数量:", res); + if (res.approvePassHasNotRed > 0) { + uni.setTabBarBadge({ + index: 1, + text: String(res.approvePassHasNotRed), + }); + } else { + uni.removeTabBarBadge({ + index: 1, + }); } - ); + }); } }, }, diff --git a/api/bind.js b/api/bind.js index 9bc95e1..0f24dde 100644 --- a/api/bind.js +++ b/api/bind.js @@ -7,6 +7,7 @@ let bindInfo = { bind_recordSubmit:"/assistant/circle/agency/apply/agree",// 通过申请提交事件 bind_enterpriseDetail:"/assistant/circle/agency/detail",// 企业详情 bind_getWaitNum:"/assistant/circle/agency/countPending",// 获取统计处理中的数量 + bind_getApplyNum:"/assistant/circle/agency/countHasNotReadNum",// 获取通过未读的关注数 bind_isSee:"/assistant/circle/agency/himSee",// 让不让他看 bind_getGroupDetail:"/assistant/circle/agency/info",// 团队详情 bind_list:"/assistant/circle/agency/list",// 上下游列表 diff --git a/main.js b/main.js index 1a4e5fc..dd4464e 100644 --- a/main.js +++ b/main.js @@ -164,6 +164,7 @@ export function createApp () { /* 上传图片 */ uploadImgByCamera (callback = () => { }, type = 'default', $num = 1, $sourceType = ['camera']) { + var that = this; G.uploadImage($num, (imgRes) => { console.log('imgRes', imgRes); uni.showLoading({ diff --git a/pages/home/index.vue b/pages/home/index.vue index cef82c2..bf1d801 100644 --- a/pages/home/index.vue +++ b/pages/home/index.vue @@ -19,8 +19,7 @@