소스 검색

no message

libushang 9 달 전
부모
커밋
2d2bdf86ae
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5 2
      src/views/index.vue

+ 5 - 2
src/views/index.vue

@@ -33,10 +33,13 @@ onMounted(() => {
   // if(env === 'development') 
   {
     localStorage.setItem('Admin-Token', 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIiwiZXhwIjoyMDM5Njk2ODMzfQ.Rhd38oo_S1odjg0xnT4n31cCWCAAPXGb8y_V2XcgqzQ');
+    setTimeout(()=> {
+      getUserInfo();
+    }, 500);
   }
 })
 
-nextTick(()=>{
+const getUserInfo = () => {
   getInfo().then((res)=>{
     const roles = res.data.roles;
     console.log('roles', roles);
@@ -58,7 +61,7 @@ nextTick(()=>{
       handleJump('WorkerIndex', 'worker');
     }
   })
-})
+}
 </script>
 
 <style lang="scss" scoped>