Browse Source

调整企业微信底部状态栏没有的问题

Lijy 2 years ago
parent
commit
7c74010ca0

+ 50 - 41
fhKeeper/formulahousekeeper/timesheet_h5/src/components/Footer.vue

@@ -1,30 +1,32 @@
 <template>
-    <ul class="footer flex jc-sa w100pc fixed bott0 bg-fff aic footer">
-        <li class="item">
-            <router-link to="/index" class="flex2 aic f20 yellow" active-class="active">
-                <i class="icon-home iconfont f18 text"></i>
-                <p class="mt-5 f12 text">首页</p>
-            </router-link>
-        </li>
-        <li class="item" v-if="reportsCompany || this.user.manageDeptId != 0 || reportsDept">
-            <router-link to="/count" class="flex2 aic f20 text" active-class="active">
-                <van-icon class="text" name="bar-chart-o" />
-                <p class="mt-5 text f12">填报统计</p>
-            </router-link>
-        </li>
-        <li class="item" v-if="cost">
-            <router-link to="/cost" class="flex2 aic f20 text" active-class="active">
-                <van-icon class="text" name="after-sale" />
-                <p class="mt-5 text f12">成本统计</p>
-            </router-link>
-        </li>
-        <li class="item">
-            <router-link to="/my" class="flex2 aic f20 text" active-class="active">
-                <van-icon class="text" name="user-o"></van-icon>
-                <p class="mt-5 text f12">我的</p>
-            </router-link>
-        </li>
-  </ul>
+    <div>
+        <ul class="footer flex jc-sa w100pc fixed bott0 bg-fff aic footer">
+            <li class="item">
+                <router-link to="/index" class="flex2 aic f20 yellow" active-class="active">
+                    <i class="icon-home iconfont f18 text"></i>
+                    <p class="mt-5 f12 text">首页</p>
+                </router-link>
+            </li>
+            <li class="item" v-if="reportsCompany || this.user.manageDeptId != 0 || reportsDept">
+                <router-link to="/count" class="flex2 aic f20 text" active-class="active">
+                    <van-icon class="text" name="bar-chart-o" />
+                    <p class="mt-5 text f12">填报统计</p>
+                </router-link>
+            </li>
+            <li class="item" v-if="cost">
+                <router-link to="/cost" class="flex2 aic f20 text" active-class="active">
+                    <van-icon class="text" name="after-sale" />
+                    <p class="mt-5 text f12">成本统计</p>
+                </router-link>
+            </li>
+            <li class="item">
+                <router-link to="/my" class="flex2 aic f20 text" active-class="active">
+                    <van-icon class="text" name="user-o"></van-icon>
+                    <p class="mt-5 text f12">我的</p>
+                </router-link>
+            </li>
+    </ul>
+  </div>
 </template>
 
 <script>
@@ -38,23 +40,29 @@
             }
         },
         mounted() {
-            this.reportsCompany = false
-            this.reportsDept = false
-            this.cost = false
-            for(let i in this.user.functionList){
-                if(this.user.functionList[i].name == '查看全公司工时'){
-                    this.reportsCompany = true
-                }
-                if(this.user.functionList[i].name == '查看本部门工时'){
-                    this.reportsDept = true
+            this.dealWith()
+        },
+        methods: {
+            dealWith() {
+                this.user = JSON.parse(localStorage.userInfo)
+                this.reportsCompany = false
+                this.reportsDept = false
+                this.cost = false
+                for(let i in this.user.functionList){
+                    if(this.user.functionList[i].name == '查看全公司工时'){
+                        this.reportsCompany = true
+                    }
+                    if(this.user.functionList[i].name == '查看本部门工时'){
+                        this.reportsDept = true
+                    }
                 }
-            }
-            for(let i in this.user.moduleList){
-                if(this.user.moduleList[i].name == '工时成本统计'){
-                    this.cost = true
+                for(let i in this.user.moduleList){
+                    if(this.user.moduleList[i].name == '工时成本统计'){
+                        this.cost = true
+                    }
                 }
             }
-        },
+        }
     };
 </script>
 
@@ -65,7 +73,8 @@
         position: fixed;
         bottom: 0;
         width: 100%;
-        bottom: 0;
+        left: 0;
+        z-index: 10;
         .text {
             color: #797d82;
         }

+ 5 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -18,7 +18,7 @@
             体验报表统计等更多功能,尽在PC端<br>
             网页用户访问http://worktime.ttkuaiban.com,钉钉用户直接从钉钉PC端进入工时管家
         </div>
-        <Footer page="index"></Footer>
+        <Footer ref="child" :key="key"></Footer>
     </div>
 </template>
 <script>
@@ -37,6 +37,7 @@
                     // require('../../assets/img/index/banner_3.png'),
                 ],
                 routers: [],
+                key: 0
             };
         },
         created() {
@@ -224,8 +225,11 @@
                     } else {
                         localStorage.userInfo = JSON.stringify(res.data);
                         this.user = res.data;
+                        this.$refs.child.dealWith()
+                        this.key++
                         this.getModule()
                         this.getMessage();
+                        this.$forceUpdate()
                         // this.bindIfNessary();
                     } 
                 }).catch(err=> {