|
@@ -18,6 +18,7 @@ import {onMounted} from "vue";
|
|
|
|
|
|
const router = useRouter();
|
|
|
const useUser = useUserStore();
|
|
|
+const env = import.meta.env.VITE_APP_ENV;
|
|
|
|
|
|
const handleJump = (path: string, role: string) => {
|
|
|
useUser.setRoles(role);
|
|
@@ -25,6 +26,10 @@ const handleJump = (path: string, role: string) => {
|
|
|
}
|
|
|
|
|
|
onMounted(() => {
|
|
|
+ console.log('env:', env);
|
|
|
+ if(env === 'development') {
|
|
|
+ localStorage.setItem('Admin-Token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiZXhwIjoyMDM5Njk2ODMzfQ.Rhd38oo_S1odjg0xnT4n31cCWCAAPXGb8y_V2XcgqzQ');
|
|
|
+ }
|
|
|
useUser.setRoles('');
|
|
|
localStorage.setItem('role', '');
|
|
|
})
|