mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-11-04 12:18:43 +08:00 
			
		
		
		
	登录界面:姐姐点击登录后界面疯狂闪动的问题
This commit is contained in:
		@@ -230,6 +230,7 @@ const getCookie = () => {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					const loading = ref() // ElLoading.service 返回的实例
 | 
				
			||||||
// 登录
 | 
					// 登录
 | 
				
			||||||
const handleLogin = async (params) => {
 | 
					const handleLogin = async (params) => {
 | 
				
			||||||
  loginLoading.value = true
 | 
					  loginLoading.value = true
 | 
				
			||||||
@@ -244,7 +245,7 @@ const handleLogin = async (params) => {
 | 
				
			|||||||
    if (!res) {
 | 
					    if (!res) {
 | 
				
			||||||
      return
 | 
					      return
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    ElLoading.service({
 | 
					    loading.value = ElLoading.service({
 | 
				
			||||||
      lock: true,
 | 
					      lock: true,
 | 
				
			||||||
      text: '正在加载系统中...',
 | 
					      text: '正在加载系统中...',
 | 
				
			||||||
      background: 'rgba(0, 0, 0, 0.7)'
 | 
					      background: 'rgba(0, 0, 0, 0.7)'
 | 
				
			||||||
@@ -264,13 +265,9 @@ const handleLogin = async (params) => {
 | 
				
			|||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      push({ path: redirect.value || permissionStore.addRouters[0].path })
 | 
					      push({ path: redirect.value || permissionStore.addRouters[0].path })
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  } catch {
 | 
					 | 
				
			||||||
    loginLoading.value = false
 | 
					 | 
				
			||||||
  } finally {
 | 
					  } finally {
 | 
				
			||||||
    setTimeout(() => {
 | 
					    loginLoading.value = false
 | 
				
			||||||
      const loadingInstance = ElLoading.service()
 | 
					    loading.value.close()
 | 
				
			||||||
      loadingInstance.close()
 | 
					 | 
				
			||||||
    }, 400)
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user