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 @@
-
-
+
diff --git a/pages/workBench/index.vue b/pages/workBench/index.vue index f1d2768..1397013 100644 --- a/pages/workBench/index.vue +++ b/pages/workBench/index.vue @@ -48,7 +48,7 @@ - + @@ -322,26 +322,21 @@ export default { }, getNum() { let that = this; - that.G.Get( - that.api.bind_getWaitNum + "/" + 1, - { - }, - (res) => { - console.log("获取待处理数量:", res); - if (res.unread > 0) { - uni.setTabBarBadge({ - index: 1, - text: String(res.unread), - }); - that.readed = false; - } else { - uni.removeTabBarBadge({ - index: 1, - }); - that.readed = true; - } + that.G.Get(that.api.bind_getApplyNum + "/" + 1, {}, (res) => { + console.log("获取待处理数量:", res); + if (res.approvePassHasNotRed > 0) { + uni.setTabBarBadge({ + index: 1, + text: String(res.approvePassHasNotRed), + }); + that.readed = false; + } else { + uni.removeTabBarBadge({ + index: 1, + }); + that.readed = true; } - ); + }); }, goLogin() { diff --git a/root/home/editTownsman.vue b/root/home/editTownsman.vue index 8806a17..380ab92 100644 --- a/root/home/editTownsman.vue +++ b/root/home/editTownsman.vue @@ -1,7 +1,7 @@ diff --git a/root/home/quickApplication.vue b/root/home/quickApplication.vue index 63c2fdc..b63be04 100644 --- a/root/home/quickApplication.vue +++ b/root/home/quickApplication.vue @@ -51,7 +51,7 @@ - + @@ -111,7 +111,7 @@ export default { } else if (data.info.index) { that.persenInfo[data.info.index] = data.info; } else { - // that.persenInfo[that.persenInfo.length] = { ...data.info, index: that.persenInfo.length }; + that.persenInfo[that.persenInfo.length] = { ...data.info, index: that.persenInfo.length }; } that.$forceUpdate(); }); @@ -464,7 +464,7 @@ export default { title: "报名成功", duration: 2000, }); - that.persenInfo = []; + // that.persenInfo = []; // that.$forceUpdate(); setTimeout(() => {