9
This commit is contained in:
@@ -7,8 +7,8 @@
|
||||
:thumbSize="thumbSize"
|
||||
showArrow
|
||||
to="/pages/workbench/friend-circle/friend-circle">
|
||||
<view slot="footer" v-if="newCircleInfo&&newCircleInfo.userHeadImg.length>0">
|
||||
<u-avatar :src="newCircleInfo.userHeadImg" mode="square" :size="70"></u-avatar>
|
||||
<view slot="footer" v-if="last_unread_item&&last_unread_item.avatar.length>0">
|
||||
<u-avatar :src="last_unread_item.avatar" mode="square" :size="70"></u-avatar>
|
||||
<u-badge :is-dot="true" type="error" :offset="[20,60]"></u-badge>
|
||||
</view>
|
||||
</uni-list-item>
|
||||
@@ -26,38 +26,25 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getFriendCircleInfo } from "@/api/login";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
thumbSize:"base",
|
||||
newCircleInfo: {
|
||||
userHeadImg:"",
|
||||
count:0
|
||||
},
|
||||
thumbSize:"base"
|
||||
};
|
||||
},
|
||||
onShow: function() {
|
||||
this.changeDefaultAvatar(1,10);
|
||||
let unreadCount= 1;
|
||||
//this.vuex_friendCircleUnreadCount+"";
|
||||
//this.localGroupApi.setTabBarBadge(2,unreadCount);
|
||||
},
|
||||
methods: {
|
||||
changeDefaultAvatar:function(min,max){
|
||||
let that=this;
|
||||
getFriendCircleInfo().then(res => {
|
||||
if(res.code==200){
|
||||
console.log("查询朋友圈更新情况",res.data);
|
||||
if(res.data&&res.data.length>0){
|
||||
that.newCircleInfo=res.data;
|
||||
}else{
|
||||
that.newCircleInfo=null;
|
||||
}
|
||||
}
|
||||
})
|
||||
computed:{
|
||||
circleUnreadCount() {
|
||||
return this.$store.getters.storeCircleUnreadCount;
|
||||
},
|
||||
|
||||
last_unread_item() {
|
||||
return this.$store.getters.storeCircleLastUnreadItem;
|
||||
},
|
||||
},
|
||||
onShow: function() {
|
||||
let unreadCount= 1;
|
||||
this.$store.dispatch('circle/getFriendCircleInfo');
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user