|
|
@@ -77,6 +77,8 @@
|
|
|
|
|
|
import headImg from "@/static/images/mine/headImg.jpg"
|
|
|
import $tab from "@/plugins/tab.js"
|
|
|
+ import { getUnReadMessageNum } from '@/api/message';
|
|
|
+ import { getUnProcessNum } from '@/api/process';
|
|
|
import {
|
|
|
useUserStore
|
|
|
} from '@/store/user.js'
|
|
|
@@ -84,12 +86,40 @@
|
|
|
const userInfo = ref({})
|
|
|
onMounted(() => {
|
|
|
userInfo.value = userStore.user
|
|
|
- // console.log('userStore', userStore.user);
|
|
|
- // uni.setTabBarBadge({
|
|
|
- // index: 0,//tabbar的索引
|
|
|
- // text: String(2)//要添加的角标内容
|
|
|
- // })
|
|
|
+ showTarBarBadge();
|
|
|
})
|
|
|
+
|
|
|
+ function showTarBarBadge(){
|
|
|
+ let unReadMsgNum=0;
|
|
|
+ let unProcessNum=0;
|
|
|
+ getUnProcessNum(userStore.user.useId,"").then(res=>{
|
|
|
+ unProcessNum=parseInt(res.returnParams.total, 10);
|
|
|
+ console.log('unProcessNum',res.returnParams.total);
|
|
|
+ if(unProcessNum==0){
|
|
|
+ uni.removeTabBarBadge({
|
|
|
+ index:1
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ uni.setTabBarBadge({
|
|
|
+ index: 1,
|
|
|
+ text: String(unProcessNum)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ getUnReadMessageNum(userStore.user.useId).then(res=>{
|
|
|
+ unReadMsgNum=parseInt(res.returnParams, 10)+unProcessNum;
|
|
|
+ if(unReadMsgNum==0){
|
|
|
+ uni.removeTabBarBadge({
|
|
|
+ index:0
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ uni.setTabBarBadge({
|
|
|
+ index: 0,
|
|
|
+ text: String(unReadMsgNum)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
// 部门数组
|
|
|
const array = ref(['研发部', '业务部', '法务部']);
|
|
|
const index = ref(0);
|
|
|
@@ -148,15 +178,15 @@
|
|
|
.user-info {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- padding: 1rem 4rem;
|
|
|
+ padding: 1rem 4rem;
|
|
|
border-bottom: 1rpx solid #666;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
|
|
|
.avatar {
|
|
|
- width: 200rpx;
|
|
|
- height: 200rpx;
|
|
|
+ width: 6.25rem;
|
|
|
+ height: 6.25rem;
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
|
|
|
@@ -166,43 +196,43 @@
|
|
|
}
|
|
|
|
|
|
.name {
|
|
|
- padding: 15rpx 0;
|
|
|
+ padding: 0.5rem 0;
|
|
|
color: #333;
|
|
|
- font-size: 17px;
|
|
|
+ font-size: 1.1rem;
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.function-list {
|
|
|
- margin-bottom: 60rpx;
|
|
|
+ margin-bottom: 2rem;
|
|
|
}
|
|
|
|
|
|
.function-item {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- padding: 20rpx;
|
|
|
+ padding: 0.75rem;
|
|
|
background-color: white;
|
|
|
border-radius: 10rpx;
|
|
|
- margin-bottom: 20rpx;
|
|
|
+ margin-bottom: 0.75rem;
|
|
|
border-bottom: 1px solid gainsboro;
|
|
|
}
|
|
|
|
|
|
|
|
|
.title {
|
|
|
flex-grow: 1;
|
|
|
- font-size: 15px;
|
|
|
+ font-size: 1rem;
|
|
|
}
|
|
|
|
|
|
.desc {
|
|
|
color: #777;
|
|
|
- margin-right: 20rpx;
|
|
|
+ margin-right: 0.5rem;
|
|
|
}
|
|
|
|
|
|
.select1 {
|
|
|
display: inline-block;
|
|
|
width: 50%;
|
|
|
- margin-top: 10rpx;
|
|
|
+ margin-top: 0.3rem;
|
|
|
}
|
|
|
|
|
|
.headImg {
|
|
|
@@ -217,7 +247,7 @@
|
|
|
|
|
|
::v-deep .uni-list-cell-left {
|
|
|
padding: 0 0;
|
|
|
- font-size: 17px;
|
|
|
+ font-size: 1.1rem;
|
|
|
color: #333;
|
|
|
flex: none;
|
|
|
}
|
|
|
@@ -227,11 +257,11 @@
|
|
|
}
|
|
|
|
|
|
::v-deep .uni-input {
|
|
|
- padding: 15rpx 8rpx;
|
|
|
+ padding: 0.5rem 0.25rem;
|
|
|
text-decoration: underline;
|
|
|
/* 给文字添加下划线 */
|
|
|
color: blue;
|
|
|
- font-size: 17px;
|
|
|
+ font-size: 1.1rem;
|
|
|
background-color: #f5f5f5;
|
|
|
// text-decoration-color: blue;
|
|
|
}
|
|
|
@@ -241,16 +271,16 @@
|
|
|
.uni-list-cell-right {
|
|
|
flex: none;
|
|
|
}
|
|
|
-
|
|
|
- ::v-deep .uni-card{
|
|
|
+
|
|
|
+ ::v-deep .uni-card {
|
|
|
background-color: #f5f5f5 !important;
|
|
|
}
|
|
|
-
|
|
|
- ::v-deep .uni-card--shadow{
|
|
|
+
|
|
|
+ ::v-deep .uni-card--shadow {
|
|
|
box-shadow: none !important;
|
|
|
}
|
|
|
-
|
|
|
- ::v-deep .uni-card--border{
|
|
|
+
|
|
|
+ ::v-deep .uni-card--border {
|
|
|
border: none !important;
|
|
|
}
|
|
|
</style>
|