gaoluyang
6 天以前 7a0ffb0048adeda9ebfbca1d0b525eb224c173e3
src/pages/login.vue
@@ -101,7 +101,8 @@
}
function getUserLoginFacotryList() {
   userLoginFacotryList({userName:loginForm.value.username}).then(res => {
   if(loginForm.value.username){
      userLoginFacotryList({userName:loginForm.value.username}).then(res => {
         // 检查res.data是否为数组
         if (res.data && Array.isArray(res.data)) {
            // 重新组装数据格式:deptId变成id,deptName变成name
@@ -117,6 +118,9 @@
         modal.msgError('获取公司列表失败:', error)
         factoryList.value = []
      })
   }else {
      factoryList.value = []
   }
}
async function handleLogin() {