处理小红点

cyl/master-im
jscyl13849007907 5 months ago
parent d49175772a
commit 2903af3fff

@ -269,12 +269,12 @@ export default {
console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) {
uni.setTabBarBadge({
index: 1,
index: 3,
text: String(res.approvePassHasNotRed),
});
} else {
uni.removeTabBarBadge({
index: 1,
index: 3,
});
}
});

@ -85,21 +85,6 @@ export const setTabUnread = (val): void => {
index: 3, //tabbar下标
})
}
/**
* tabbar
if (unread === 0) {
uni.removeTabBarBadge({
//隐藏数字
index: 0, //tabbar下标
})
} else {
uni.setTabBarBadge({
//显示数字
index: 0, //tabbar下标
text: unread > 99 ? '99+' : unread.toString(), //显示的数字
})
}
*/
}
export const setContactTabUnread = (): void => {

@ -485,16 +485,6 @@ export default {
type: 2,
},
(res) => {
// if (res.total > 0) {
// uni.setTabBarBadge({
// index: 2,
// text: String(res.total),
// });
// } else {
// uni.removeTabBarBadge({
// index: 2,
// });
// }
that.waitNum_ups = res.total;
that.getDetail();
}
@ -762,13 +752,13 @@ export default {
console.log("获取待处理数量:", res);
if (res.approvePassHasNotRed > 0) {
uni.setTabBarBadge({
index: 1,
index: 3,
text: String(res.approvePassHasNotRed),
});
that.readed = false;
} else {
uni.removeTabBarBadge({
index: 1,
index: 3,
});
that.readed = true;
}

@ -73,28 +73,13 @@ export const setTabUnread = (): void => {
if (unread === 0) {
uni.hideTabBarRedDot({
//隐藏数字
index: 3, //tabbar下标
index: 2, //tabbar下标
})
} else {
uni.showTabBarRedDot({
index: 3, //tabbar下标
})
}
/**
* tabbar
if (unread === 0) {
uni.removeTabBarBadge({
//隐藏数字
index: 0, //tabbar下标
})
} else {
uni.setTabBarBadge({
//显示数字
index: 0, //tabbar下标
text: unread > 99 ? '99+' : unread.toString(), //显示的数字
index: 2, //tabbar下标
})
}
*/
}
export const setContactTabUnread = (): void => {

Loading…
Cancel
Save