刘洋 7 месяцев назад
Родитель
Сommit
e32dad52cd
2 измененных файлов с 10 добавлено и 2 удалено
  1. 9 2
      src/layouts/bottomTabBar.vue
  2. 1 0
      src/pages/applyResult.vue

+ 9 - 2
src/layouts/bottomTabBar.vue

@@ -29,10 +29,17 @@ import tab2Active from "../assets/imgs/tab2_active.png";
 import tab3 from "../assets/imgs/tab3.png";
 import tab3Active from "../assets/imgs/tab3_active.png";
 import { getStuInfo } from "@/api/user";
+import bus from "@/utils/bus";
 const active = ref(0);
 const showMiddle = ref(false);
-getStuInfo().then((res) => {
-  showMiddle.value = res?.selfApplyEnable;
+const getRole = () => {
+  getStuInfo().then((res) => {
+    showMiddle.value = res?.selfApplyEnable;
+  });
+};
+getRole();
+bus.on("updateBottomBar", () => {
+  getRole();
 });
 </script>
 <style lang="" scoped></style>

+ 1 - 0
src/pages/applyResult.vue

@@ -42,6 +42,7 @@ const continueApply = () => {
       bus.emit("continueApply");
     } else {
       router.replace({ name: "Index" });
+      bus.emit("updateBottomBar");
     }
   });
 };