update 微标数接口
This commit is contained in:
parent
1c5e1b5d8a
commit
e36267066f
@ -274,7 +274,7 @@ scroll-view {
|
|||||||
<image v-else class="ui-img2_gif" src="{{item.is_like ? gifurl : 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'}}"></image>
|
<image v-else class="ui-img2_gif" src="{{item.is_like ? gifurl : 'https://images.ufutx.com/202106/07/b227f3ecf9cbd080fb814450b667b5ce.gif'}}"></image>
|
||||||
{{ item.liker_count }}
|
{{ item.liker_count }}
|
||||||
</view>
|
</view>
|
||||||
<view class="~ui-pl-6 ~ui-pr-6" style="margin-right: -6rpx">
|
<view class="~ui-pl-20 ~ui-pr-6" style="margin-right: -20rpx">
|
||||||
<image class="ui-cuIcon-moreandroid" src="https://image.fulllinkai.com/202409/05/fdb58839d1909d75f636941d6aea6cb5.png" mode="widthFix" @tap.stop="changeOperation(item, index)"></image>
|
<image class="ui-cuIcon-moreandroid" src="https://image.fulllinkai.com/202409/05/fdb58839d1909d75f636941d6aea6cb5.png" mode="widthFix" @tap.stop="changeOperation(item, index)"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@ -10,7 +10,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
// 跳转事件校验是否已经完善注册资料
|
// 跳转事件校验是否已经完善注册资料
|
||||||
$signInVerify() {
|
$signInVerify() {
|
||||||
return wx.getStorageSync('userInfo')
|
return wx.getStorageSync('userInfo').is_base_profile
|
||||||
},
|
},
|
||||||
$callPhone(mobile) {
|
$callPhone(mobile) {
|
||||||
wx.makePhoneCall({
|
wx.makePhoneCall({
|
||||||
|
|||||||
@ -309,7 +309,10 @@ wepy.page({
|
|||||||
let vm = this
|
let vm = this
|
||||||
vm.$get({url: `${service.host}/notice/count`}).then(({code, data}) => {
|
vm.$get({url: `${service.host}/notice/count`}).then(({code, data}) => {
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
let {new_count} = data
|
vm.menuList[0].count = data.system_count
|
||||||
|
vm.menuList[1].count = data.friend_count
|
||||||
|
vm.menuList[2].count = data.follow_count + data.visit_count
|
||||||
|
let {notice_count} = data
|
||||||
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
||||||
let groupCount = 0
|
let groupCount = 0
|
||||||
if (groupCountList.length > 0) {
|
if (groupCountList.length > 0) {
|
||||||
@ -317,10 +320,10 @@ wepy.page({
|
|||||||
groupCount += groupCountList[i].unread
|
groupCount += groupCountList[i].unread
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((new_count + groupCount) > 0) {
|
if ((notice_count + groupCount) > 0) {
|
||||||
wx.setTabBarBadge({
|
wx.setTabBarBadge({
|
||||||
index: 0,
|
index: 0,
|
||||||
text: `${new_count + groupCount}`
|
text: `${notice_count + groupCount}`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.removeTabBarBadge({
|
wx.removeTabBarBadge({
|
||||||
|
|||||||
@ -83,20 +83,20 @@ const IM = (account, token) => {
|
|||||||
notiTypeData = wx.getStorageSync('nuteNotList').find((item) => item.teamId == e.to)
|
notiTypeData = wx.getStorageSync('nuteNotList').find((item) => item.teamId == e.to)
|
||||||
}
|
}
|
||||||
// 如果是开启了免打扰的群消息,自动调用群消息已读接口
|
// 如果是开启了免打扰的群消息,自动调用群消息已读接口
|
||||||
if (notiTypeData.muteTeam) {
|
// if (notiTypeData.muteTeam) {
|
||||||
wx.request({
|
// wx.request({
|
||||||
url: `${service.host}/chat/group/read`,
|
// url: `${service.host}/chat/group/read`,
|
||||||
header: {
|
// header: {
|
||||||
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
// 'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
// 'X-Requested-With': 'XMLHttpRequest'
|
||||||
},
|
// },
|
||||||
method: 'post',
|
// method: 'post',
|
||||||
data: {team_id: notiTypeData.teamId},
|
// data: {team_id: notiTypeData.teamId},
|
||||||
success: ({data}) => {
|
// success: ({data}) => {
|
||||||
console.log(data, '已读')
|
// console.log(data, '已读')
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
if (e.scene == 'team') {
|
if (e.scene == 'team') {
|
||||||
// 判断是否是@功能
|
// 判断是否是@功能
|
||||||
if (e.apns) {
|
if (e.apns) {
|
||||||
@ -130,15 +130,15 @@ const IM = (account, token) => {
|
|||||||
}
|
}
|
||||||
if (currentPage.route == 'pages/tabBar/home') {
|
if (currentPage.route == 'pages/tabBar/home') {
|
||||||
wx.request({
|
wx.request({
|
||||||
url: `${service.host}/new/message/count`,
|
url: `${service.host}/notice/count`,
|
||||||
header: {
|
header: {
|
||||||
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
'Authorization': 'Bearer ' + wx.getStorageSync('token'),
|
||||||
'X-Requested-With': 'XMLHttpRequest'
|
'X-Requested-With': 'XMLHttpRequest'
|
||||||
},
|
},
|
||||||
method: 'get',
|
method: 'get',
|
||||||
success: ({data}) => {
|
success: ({data}) => {
|
||||||
let { new_count } = data.data
|
let { notice_count } = data.data
|
||||||
console.log(new_count, '新的未读数')
|
console.log(notice_count, '新的未读数')
|
||||||
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
let groupCountList = wx.getStorageSync('teamsSessionsCount') || []
|
||||||
let groupCount = 0
|
let groupCount = 0
|
||||||
if (groupCountList.length > 0) {
|
if (groupCountList.length > 0) {
|
||||||
@ -146,10 +146,10 @@ const IM = (account, token) => {
|
|||||||
groupCount += groupCountList[i].unread
|
groupCount += groupCountList[i].unread
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((new_count + groupCount) > 0) {
|
if ((notice_count + groupCount) > 0) {
|
||||||
wx.setTabBarBadge({
|
wx.setTabBarBadge({
|
||||||
index: 0,
|
index: 0,
|
||||||
text: `${new_count + groupCount}`
|
text: `${notice_count + groupCount}`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.removeTabBarBadge({
|
wx.removeTabBarBadge({
|
||||||
|
|||||||
@ -53,11 +53,12 @@ const wx_login = () => {
|
|||||||
wx.setStorageSync('user_id', data.user.id) // 用户id
|
wx.setStorageSync('user_id', data.user.id) // 用户id
|
||||||
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
wx.setStorageSync('mobile', data.user.mobile) // 用户手机号
|
||||||
let userInfo = {
|
let userInfo = {
|
||||||
|
is_moment_admin: data.is_moment_admin,
|
||||||
|
is_base_profile: data.is_base_profile,
|
||||||
name: data.user.nickname,
|
name: data.user.nickname,
|
||||||
avatar: data.user.photo || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png',
|
avatar: data.user.photo || 'https://image.fulllinkai.com/202203/09/cc1c73eb1a4941fef25a15cd1ff2f9df.png',
|
||||||
showId: data.user.id,
|
showId: data.user.id,
|
||||||
is_real_approved: data.user.is_real_approved,
|
is_real_approved: data.user.is_real_approved,
|
||||||
is_base_profile: data.user.is_base_profile,
|
|
||||||
rank_id: data.user.rank_id,
|
rank_id: data.user.rank_id,
|
||||||
sex: data.user.sex,
|
sex: data.user.sex,
|
||||||
id: data.user.id,
|
id: data.user.id,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user