Commit 0d944462 authored by 罗林杰's avatar 罗林杰

修改消息未读

parent fbe8bbf2
...@@ -210,3 +210,10 @@ export function addMemTraffic(data) { ...@@ -210,3 +210,10 @@ export function addMemTraffic(data) {
data: data data: data
}) })
} }
// 留言未读数
export function noReadMessageAllCount() {
return request({
url: '/app/memLeaveMessage/noReadMessageAllCount',
method: 'get',
})
}
...@@ -141,6 +141,7 @@ ...@@ -141,6 +141,7 @@
<view class="box-bottom-right-name"> <view class="box-bottom-right-name">
{{item.desc}} {{item.desc}}
</view> </view>
<u-badge v-if="item.name == '我的留言'" type="error" max="99" :value="noReadMessageAllCount"></u-badge>
<image :src="baseUrl+'/common/right.png'" class="box-bottom-right-img" mode="aspectFill"></image> <image :src="baseUrl+'/common/right.png'" class="box-bottom-right-img" mode="aspectFill"></image>
</view> </view>
</view> </view>
...@@ -170,7 +171,7 @@ ...@@ -170,7 +171,7 @@
</template> </template>
<script> <script>
import {setUserProfile} from '../../api/login/index' import {setUserProfile} from '../../api/login/index'
import {userDetail} from "../../api/user"; import {noReadMessageAllCount, userDetail} from "../../api/user";
import {articleList, getOssUrl} from "../../api/article"; import {articleList, getOssUrl} from "../../api/article";
export default { export default {
data() { data() {
...@@ -188,6 +189,7 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -188,6 +189,7 @@ import {articleList, getOssUrl} from "../../api/article";
userInfo:{},//用户信息 userInfo:{},//用户信息
token:'',//token token:'',//token
articleInfo:{}, articleInfo:{},
noReadMessageAllCount:'',
info:{}, info:{},
button: [ button: [
{ {
...@@ -242,6 +244,7 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -242,6 +244,7 @@ import {articleList, getOssUrl} from "../../api/article";
this.articleImg = [] this.articleImg = []
this.getUserDetail() this.getUserDetail()
this.getArticleList() this.getArticleList()
this.getnoReadMessageAllCount()
}, },
methods: { methods: {
//获取用户详情信息 //获取用户详情信息
...@@ -418,6 +421,11 @@ import {articleList, getOssUrl} from "../../api/article"; ...@@ -418,6 +421,11 @@ import {articleList, getOssUrl} from "../../api/article";
}) })
} else if (i == 5) {} } else if (i == 5) {}
}, },
getnoReadMessageAllCount(){
noReadMessageAllCount().then(res=>{
this.noReadMessageAllCount = res.data.data
})
},
//登录 //登录
login() { login() {
uni.navigateTo({ uni.navigateTo({
......
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
<view class="recommendation-card" @click="gotoBusinessDetail(item)"> <view class="recommendation-card" @click="gotoBusinessDetail(item)">
<view class="card-image"style="justify-content: left;display: flex"> <view class="card-image"style="justify-content: left;display: flex">
<image class="img" :src="item.avatar"/> <image class="img" :src="item.avatar"/>
<view style="margin-top: 20rpx;">
<u-badge :isDot="item.noReadCount != 0" type="error"></u-badge>
</view>
<view style="margin-left: 20rpx;margin-top: 20rpx;font-weight: 400;font-size: 32rpx"> <view style="margin-left: 20rpx;margin-top: 20rpx;font-weight: 400;font-size: 32rpx">
{{ item.memNickName }} {{ item.memNickName }}
<view class="message"> <view class="message">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment