|
@@ -15,7 +15,7 @@
|
|
|
import {useRouter} from "vue-router";
|
|
|
import useUserStore from "@/store/modules/user";
|
|
|
import {getInfo} from "@/api/login"
|
|
|
-import {onMounted, ref} from "vue";
|
|
|
+import {onMounted, nextTick, ref} from "vue";
|
|
|
const router = useRouter();
|
|
|
const useUser = useUserStore();
|
|
|
const env = import.meta.env.VITE_APP_ENV;
|
|
@@ -34,6 +34,9 @@ onMounted(() => {
|
|
|
{
|
|
|
localStorage.setItem('Admin-Token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiZXhwIjoyMDM5Njk2ODMzfQ.Rhd38oo_S1odjg0xnT4n31cCWCAAPXGb8y_V2XcgqzQ');
|
|
|
}
|
|
|
+})
|
|
|
+
|
|
|
+nextTick(()=>{
|
|
|
getInfo().then((res)=>{
|
|
|
const roles = res.data.roles;
|
|
|
console.log('roles', roles);
|