调试未读人数

This commit is contained in:
qiaomu 2024-04-09 11:32:54 +08:00
parent ba1817583d
commit e3390db414
3 changed files with 16 additions and 3 deletions

View File

@ -56,7 +56,7 @@ Page({
return false; return false;
} }
this.init() this.init()
getDot(); this.getUnReadNumber()
}, },
async init() { async init() {
const result = await getUserInfo(); const result = await getUserInfo();
@ -67,6 +67,17 @@ Page({
this.setData({ user: result.data }) this.setData({ user: result.data })
wx.setStorageSync('user', result.data) wx.setStorageSync('user', result.data)
}, },
async getUnReadNumber() {
const dot = await getDot();
this.setData({
dot
})
},
bindTenement() {
wx.navigateTo({
url: '/pages/handleLogin/index',
})
},
connect() { connect() {
Dialog.alert({ Dialog.alert({
title: '提示', title: '提示',

View File

@ -7,14 +7,15 @@
<van-cell title="联系客服" value="" is-link bind:tap="connect" /> <van-cell title="联系客服" value="" is-link bind:tap="connect" />
<van-cell wx:if="{{!!user.isAdmin}}" title="二维码" value="" is-link bind:click="jumpToQrCode" /> <van-cell wx:if="{{!!user.isAdmin}}" title="二维码" value="" is-link bind:click="jumpToQrCode" />
<van-cell is-link bind:click="jumpToMember" > <van-cell wx:if="{{!!user.isAdmin}}" is-link bind:click="jumpToMember">
<view slot="title"> <view slot="title">
<view class="cellWrapper"> <view class="cellWrapper">
<view class="text"> 成员管理 </view> <view class="text"> 成员管理 </view>
<dot number="{{100}}" /> <dot wx:if="{{dot > 0}}" number="{{dot}}" />
</view> </view>
</view> </view>
</van-cell> </van-cell>
<van-cell title="绑定企业" value="" is-link bind:tap="bindTenement" />
<!-- </van-cell-group> --> <!-- </van-cell-group> -->
<!-- <van-cell-group title=" "> <!-- <van-cell-group title=" ">
<van-cell title="单元格" value="内容" is-link /> <van-cell title="单元格" value="内容" is-link />

View File

@ -20,4 +20,5 @@ export const getDot = async () => {
index: 1, index: 1,
}) })
} }
return data;
} }