diff --git a/App.vue b/App.vue index 66babae..650edd8 100644 --- a/App.vue +++ b/App.vue @@ -37,6 +37,13 @@ export default { that.G.watchUserPage(args.url); }, }); + + uni.$on("isGlogin", function (data) { + // console.log("app.vue 接收", data); + if (uni.getStorageSync("apply-token")) { + that.initWyyx(); + } + }); }, onShow: function (options) { let that = this; @@ -84,13 +91,6 @@ export default { }, 15 * 1000); } - uni.$on("isGlogin", function (data) { - // console.log("app.vue 接收", data); - if (uni.getStorageSync("apply-uid")) { - that.initWyyx(); - } - }); - // 应用从后台返回时检查连接 if (uni.getStorageSync("apply-token")) { // console.log("app.vue 检查IM连接状态"); diff --git a/components/list/apply.vue b/components/list/apply.vue index 9105a04..af869e3 100644 --- a/components/list/apply.vue +++ b/components/list/apply.vue @@ -11,14 +11,15 @@ + - - + + diff --git a/main.js b/main.js index 93ffe62..3545176 100644 --- a/main.js +++ b/main.js @@ -54,6 +54,7 @@ export function createApp () { return new Promise((resolve, reject) => { G.Get('/checkToken', '', (res) => { uni.setStorageSync("apply-userinfo", res) + uni.setStorageSync("apply-uid", res.id) uni.setStorageSync('apply-userinfo-copy', JSON.stringify(res)); uni.setStorageSync("apply-agencyId", res.user.agencyId); // 单独存储 -- 代理id,方便获取 uni.setStorageSync("apply-supplierAccount", res.supplierAccount); // 单独存储 -- 是否是发单号,方便获取 0.不是发单号 1.是发单号 diff --git a/pages/NEUIKit/utils/msg.ts b/pages/NEUIKit/utils/msg.ts index 771834f..3ee2307 100644 --- a/pages/NEUIKit/utils/msg.ts +++ b/pages/NEUIKit/utils/msg.ts @@ -76,16 +76,16 @@ export const setTabUnread = (val): void => { // console.log('store?.conversationStore.totalUnreadCount', store?.conversationStore.totalUnreadCount); uni.$emit('newMessage', { count: store?.conversationStore.totalUnreadCount, type: 'message' }) uni.setStorageSync("chat_info", { count: store?.conversationStore.totalUnreadCount, type: 'message' }); - // if (unread === 0) { - // uni.hideTabBarRedDot({ - // //隐藏数字 - // index: 3, //tabbar下标 - // }) - // } else { - // uni.showTabBarRedDot({ - // index: 3, //tabbar下标 - // }) - // } + if (unread === 0) { + uni.hideTabBarRedDot({ + //隐藏数字 + index: 1, //tabbar下标 + }) + } else { + uni.showTabBarRedDot({ + index: 1, //tabbar下标 + }) + } } export const setContactTabUnread = (): void => { @@ -103,7 +103,7 @@ export const setContactTabUnread = (): void => { // 不是首页和聊天页,不需要设置tabbar的badge return } - const unread = uni.$UIKitStore?.sysMsgStore?.getTotalUnreadMsgsCount() + // const unread = uni.$UIKitStore?.sysMsgStore?.getTotalUnreadMsgsCount() // if (unread === 0) { // uni.hideTabBarRedDot({ // //隐藏数字 diff --git a/pages/home/order.vue b/pages/home/order.vue index 518b691..acff6b7 100644 --- a/pages/home/order.vue +++ b/pages/home/order.vue @@ -1,5 +1,13 @@