|
@@ -17,7 +17,7 @@
|
|
|
}
|
|
|
</style>
|
|
|
|
|
|
-<div id="tabMesg" v-cloak>
|
|
|
+<div id="tabMesg" v-cloak v-if="tabShow">
|
|
|
<van-tabbar v-model="tabActive" active-color="#2ABED1" inactive-color="#171826">
|
|
|
<van-tabbar-item @click="routeHref(index)" v-for="(item, index) in tabList" :key="index" :badge="index === 2 ? getMsgCount : ''">
|
|
|
<span>{item.label}</span>
|
|
@@ -37,11 +37,12 @@
|
|
|
var isPageHide = false;
|
|
|
window.addEventListener('pageshow', function () {
|
|
|
if (isPageHide) {
|
|
|
- location.reload();
|
|
|
+ location.reload();
|
|
|
}
|
|
|
});
|
|
|
window.addEventListener('pagehide', function () {
|
|
|
isPageHide = true;
|
|
|
+ vm.tabsCount()
|
|
|
});
|
|
|
}
|
|
|
var vm = new Vue({
|
|
@@ -51,6 +52,7 @@
|
|
|
return {
|
|
|
tabActive: 0,
|
|
|
counts: 0,
|
|
|
+ tabShow: true,
|
|
|
tabList: [
|
|
|
{
|
|
|
label: '首页',
|
|
@@ -90,10 +92,13 @@
|
|
|
var uMsg = Number(getQueryString('msg') || this.getURLIndex())
|
|
|
this.tabActive = uMsg
|
|
|
this.tabsCount()
|
|
|
+ const tabShow = location.pathname
|
|
|
+ if (location.pathname == '/weixin/frontPage/messageCenter/sess/detail') {
|
|
|
+ this.tabShow = false
|
|
|
+ } else {
|
|
|
+ this.tabShow = true
|
|
|
+ }
|
|
|
},
|
|
|
- mounted() {
|
|
|
- backRefresh()
|
|
|
- },
|
|
|
computed: {
|
|
|
getMsgCount: function () {
|
|
|
return this.counts ? (this.counts > 99 ? '99+' : this.counts) : ''
|
|
@@ -124,11 +129,10 @@
|
|
|
})
|
|
|
},
|
|
|
tabsCount() {
|
|
|
- console.log('1212')
|
|
|
const _this = this
|
|
|
$.ajax({
|
|
|
type:'GET',
|
|
|
- url:'/jymessageCenter/getCount',
|
|
|
+ url:'/jymessageCenter/getCount?t=' + Date.now(),
|
|
|
data: {},
|
|
|
success:function (res) {
|
|
|
if (res && res.status == 1 && res.data && res.data.count) {
|