diff --git a/src/pages/news/visitor.wpy b/src/pages/news/visitor.wpy index 4c37a6c..198d280 100644 --- a/src/pages/news/visitor.wpy +++ b/src/pages/news/visitor.wpy @@ -86,6 +86,7 @@ page { margin-left: 16rpx; .u_vclst_name { + max-width:200rpx; font-size: 32rpx; font-weight: bold; color: #333333; @@ -294,7 +295,7 @@ page { - {{item.nickname}} + {{item.nickname}} diff --git a/src/pages/tabBar/home.wpy b/src/pages/tabBar/home.wpy index c8ab24b..158500f 100644 --- a/src/pages/tabBar/home.wpy +++ b/src/pages/tabBar/home.wpy @@ -642,7 +642,11 @@ wepy.page({ }, onShow() { let vm = this + console.log('222') vm.getTimeFn() + if (wx.getStorageSync('logoutCode')) { + wx.redirectTo({url: '/pages/users/logoutDefault'}) + } }, onLoad() { let vm = this diff --git a/src/pages/tabBar/user.wpy b/src/pages/tabBar/user.wpy index c29c3e2..d3031e8 100644 --- a/src/pages/tabBar/user.wpy +++ b/src/pages/tabBar/user.wpy @@ -401,7 +401,7 @@ // } async function timi(res) { - // await vm.getNewCount() + await vm.getNewCount() await vm.initPageData() await vm.getIsBaseInfo() } @@ -441,10 +441,7 @@ }, onLoad(e) { - // this.realityState = wx.getStorageSync('realityState') || 0 - // if (this.realityState == 99) { - // // this.taskList[1].title = '完成实名认证' - // } + }, onPullDownRefresh() { @@ -457,59 +454,32 @@ }, methods: { - // getorderDetail() { - // let that = this - // that.spellGroupList = [] - // that.$get({url: `${service.host}/groups`}).then(({code, data}) => { - // data.forEach((item) => { - // that.spellGroupList.push({ - // pic: item.pic, - // id: item.m_order_id, - // need_count: item.need_count, - // time: item.deadline.split(' ')[1] - // }) - // }) - // }) - // }, getNewCount() { - this.$get({ - url: `${service.host}/new/message/count` - }).then(({ - code, - data - }) => { - let { - new_count, order_count - } = data - this.spriteList[1].count = data.order_count - let groupCountList = wx.getStorageSync('teamsSessionsCount') || [] - let groupCount = 0 - if (groupCountList.length > 0) { - for (let i = 0; i < groupCountList.length; i++) { - groupCount += groupCountList[i].unread + let vm = this + vm.$get({url: `${service.host}/notice/count`}).then(({code, data}) => { + if (code === 0) { + let {notice_count} = data + let groupCountList = wx.getStorageSync('teamsSessionsCount') || [] + let groupCount = 0 + if (groupCountList.length > 0) { + for (let i = 0; i < groupCountList.length; i++) { + groupCount += groupCountList[i].unread + } + } + if ((notice_count + groupCount) > 0) { + wx.setTabBarBadge({ + index: 2, + text: `${notice_count + groupCount}` + }) + } else { + wx.removeTabBarBadge({ + index: 2 + }) } } - if ((new_count + groupCount) > 0) { - wx.setTabBarBadge({ - index: 3, - text: `${new_count + groupCount}` - }) - } else { - wx.removeTabBarBadge({ - index: 3 - }) - } - if (order_count > 0) { - wx.setTabBarBadge({ - index: 4, - text: `${order_count}` - }) - } else { - wx.removeTabBarBadge({ - index: 4 - }) - } + }).catch(err => { + console.log(err) }) }, @@ -523,6 +493,10 @@ getApp().$wepy.$options.globalData.is_base_info = is_base_profile if (!wx.getStorageSync('mobile')) { vm.isShowIphoneBtn = true + } + if (!is_base_profile) { + vm.loginShow = true + return } if (!data.is_complete_profile) { this.modalName = 'ModalEdit' diff --git a/src/pages/tabBar/welcome.wpy b/src/pages/tabBar/welcome.wpy index e86a42c..8d6239a 100644 --- a/src/pages/tabBar/welcome.wpy +++ b/src/pages/tabBar/welcome.wpy @@ -43,6 +43,7 @@ wepy.page({ onShow() { setTimeout(() => { if (wx.getStorageSync('logoutCode')) { + wx.redirectTo({url: '/pages/users/logoutDefault'}) return } wx.switchTab({url: `/pages/tabBar/home`}) diff --git a/src/pages/users/exclusiveService.wpy b/src/pages/users/exclusiveService.wpy index 799cd42..ac60825 100644 --- a/src/pages/users/exclusiveService.wpy +++ b/src/pages/users/exclusiveService.wpy @@ -19,7 +19,7 @@ - + 联系专属客服 -