|
@@ -41,7 +41,7 @@ Component({
|
|
|
iconA: '/static/tabbar-icon/message-a.png',
|
|
|
text: '消息',
|
|
|
url: '/pages/tabbar-pages/message/index',
|
|
|
- fcount: ""
|
|
|
+ fcount: '0'
|
|
|
},
|
|
|
{
|
|
|
icon: '/static/tabbar-icon/user.png',
|
|
@@ -98,15 +98,10 @@ Component({
|
|
|
"method": "unReadMessageCount",
|
|
|
"content": {}
|
|
|
}).then(res => {
|
|
|
- console.log(res)
|
|
|
if (res.msg != '成功') console.log('未读消息数量查询失败')
|
|
|
- if (res.data[0].fcount == 0) return this.setData({
|
|
|
- "tabbarList[3].fcount": ""
|
|
|
- })
|
|
|
- this.setData({
|
|
|
- "tabbarList[3].fcount": res.data[0].fcount
|
|
|
- })
|
|
|
+ const fcount = (res.data[0].fcount == 0) ? '' : res.data[0].fcount;
|
|
|
+ getApp().globalData.msgFcount = fcount;
|
|
|
})
|
|
|
}
|
|
|
- }
|
|
|
+ },
|
|
|
})
|