|
@@ -10,6 +10,7 @@ import routes from "./routes/routes";
|
|
import "font-awesome/css/font-awesome.min.css";
|
|
import "font-awesome/css/font-awesome.min.css";
|
|
import "@/utils/dialog.js";
|
|
import "@/utils/dialog.js";
|
|
import "@/utils/option-scroll.js";
|
|
import "@/utils/option-scroll.js";
|
|
|
|
+import "@/utils/buttonPermission.js";
|
|
import { mixins } from "@/mixins";
|
|
import { mixins } from "@/mixins";
|
|
Vue.mixin(mixins);
|
|
Vue.mixin(mixins);
|
|
|
|
|
|
@@ -125,7 +126,7 @@ export const store = new Vuex.Store({
|
|
});
|
|
});
|
|
|
|
|
|
import { getUserUuid } from "./api/api";
|
|
import { getUserUuid } from "./api/api";
|
|
-router.beforeEach((to, from, next) => {
|
|
|
|
|
|
+router.beforeEach(async(to, from, next) => {
|
|
// 判断本地是否有uuid
|
|
// 判断本地是否有uuid
|
|
const uuid = localStorage.getItem("uuid");
|
|
const uuid = localStorage.getItem("uuid");
|
|
if (!uuid) {
|
|
if (!uuid) {
|
|
@@ -161,6 +162,8 @@ router.beforeEach((to, from, next) => {
|
|
if (window._hmt) {
|
|
if (window._hmt) {
|
|
window._hmt.push(["_trackPageview", "/#" + to.fullPath]);
|
|
window._hmt.push(["_trackPageview", "/#" + to.fullPath]);
|
|
}
|
|
}
|
|
|
|
+ //获取权限按钮
|
|
|
|
+ await store.dispatch('getPermissionButtons')
|
|
next();
|
|
next();
|
|
} else {
|
|
} else {
|
|
next({ path: "/404" });
|
|
next({ path: "/404" });
|