|
@@ -13,6 +13,7 @@
|
|
|
<img src="@/pages/images/btn_xx_xz.png" v-if="currentRoute == 'pages/views/information/information'">
|
|
|
<img src="@/pages/images/btn_xx_zc.png" v-else>
|
|
|
<view :class="currentRoute == 'pages/information/information'?'primary':''">消息</view>
|
|
|
+ <view class="tips-box" v-if="totalCount>0"></view>
|
|
|
</view>
|
|
|
<view class="null-box"></view>
|
|
|
<view class="tba-bar-min-box" @click="tabBarGoPage(3)">
|
|
@@ -27,8 +28,8 @@
|
|
|
|
|
|
<script>
|
|
|
import {
|
|
|
-
|
|
|
- } from '@/api/apiDemo/index.js'
|
|
|
+ systemNoticeGetNoticeCount
|
|
|
+ } from '@/pages/api/index.js'
|
|
|
export default {
|
|
|
name: 'tabBar',
|
|
|
data() {
|
|
@@ -57,14 +58,13 @@
|
|
|
onShow() {
|
|
|
},
|
|
|
mounted() {
|
|
|
-
|
|
|
- this.totalCount = uni.getStorageSync('totalCount')
|
|
|
// 获取当前路由
|
|
|
let pages = getCurrentPages();
|
|
|
let page = pages[pages.length - 1];
|
|
|
this.currentRoute = page.route;
|
|
|
// 获取当前角色
|
|
|
this.userType = uni.getStorageSync('userType');
|
|
|
+ this.systemNoticeGetNoticeCount();
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
@@ -90,6 +90,14 @@
|
|
|
}
|
|
|
|
|
|
},
|
|
|
+ async systemNoticeGetNoticeCount(){
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await systemNoticeGetNoticeCount();
|
|
|
+ if(data.code == 200){
|
|
|
+ this.$set(this,'totalCount',data.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -128,18 +136,15 @@
|
|
|
color: #666666;
|
|
|
}
|
|
|
|
|
|
- .tip {
|
|
|
- display inline-block;
|
|
|
- background: #EF0909;
|
|
|
- border-radius 50%;
|
|
|
+ .tips-box {
|
|
|
position: absolute;
|
|
|
- font-size 24rpx;
|
|
|
- line-height 24rpx;
|
|
|
- color #fff;
|
|
|
top: 10rpx;
|
|
|
left: 44rpx;
|
|
|
- padding: 6rpx 10rpx;
|
|
|
- box-sizing border-box;
|
|
|
+ display inline-block;
|
|
|
+ background: #fa5151;
|
|
|
+ border-radius 50%;
|
|
|
+ width:20rpx;
|
|
|
+ height:20rpx;
|
|
|
}
|
|
|
}
|
|
|
}
|