Files
im/pages/workbench/index/index.vue
T

73 lines
2.5 KiB
Vue
Raw Normal View History

2025-11-07 09:56:20 +08:00
<template>
2025-11-25 05:36:02 +08:00
<view class="content">
2025-11-27 07:40:32 +08:00
<uni-nav-bar title="发现" background-color="transparent"></uni-nav-bar>
<uni-list>
<uni-list-item title="朋友圈"
thumb="/static/images/workbench/01.png"
: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>
<u-badge :is-dot="true" type="error" :offset="[20,60]"></u-badge>
</view>
</uni-list-item>
</uni-list>
<u-gap :height="10"></u-gap>
<uni-list>
<uni-list-item title="扫一扫" thumb="/static/images/workbench/03.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="摇一摇" thumb="/static/images/workbench/05.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="看一看" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="听一听" thumb="/static/images/workbench/06.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="附近" thumb="/static/images/workbench/08.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
<uni-list-item title="购物" thumb="/static/images/workbench/09.png" :thumbSize="thumbSize" to="/pages/workbench/friend-circle/friend-circle" showArrow></uni-list-item>
</uni-list>
2025-11-25 05:36:02 +08:00
</view>
2025-11-07 09:56:20 +08:00
</template>
<script>
2025-11-27 07:40:32 +08:00
import {getFriendCircleInfo } from "@/api/login";
2025-11-25 05:36:02 +08:00
export default {
data() {
return {
2025-11-27 07:40:32 +08:00
thumbSize:"base",
2025-11-25 05:36:02 +08:00
newCircleInfo: {
2025-11-27 07:40:32 +08:00
userHeadImg:"",
count:0
2025-11-25 05:36:02 +08:00
},
};
},
onShow: function() {
this.changeDefaultAvatar(1,10);
2025-11-27 07:40:32 +08:00
let unreadCount= 1;
//this.vuex_friendCircleUnreadCount+"";
//this.localGroupApi.setTabBarBadge(2,unreadCount);
2025-11-25 05:36:02 +08:00
},
methods: {
changeDefaultAvatar:function(min,max){
let that=this;
2025-11-27 07:40:32 +08:00
getFriendCircleInfo().then(res => {
2025-11-25 05:36:02 +08:00
if(res.code==200){
2025-11-27 07:40:32 +08:00
console.log("查询朋友圈更新情况",res.data);
2025-11-25 05:36:02 +08:00
if(res.data&&res.data.length>0){
2025-11-27 07:40:32 +08:00
that.newCircleInfo=res.data;
2025-11-25 05:36:02 +08:00
}else{
that.newCircleInfo=null;
}
}
})
},
}
};
2025-11-07 09:56:20 +08:00
</script>
2025-11-25 05:36:02 +08:00
<style lang="scss" scoped>
2025-11-27 07:40:32 +08:00
.content {padding-top: 36rpx;}
2025-11-25 05:36:02 +08:00
</style>
<style>
page {
2025-11-27 07:40:32 +08:00
background-color: #ececec !important;
2025-11-25 05:36:02 +08:00
}
</style>