diff --git a/src/pages/login/index.vue b/src/pages/login/index.vue index 3cdb1b3..e208bf1 100644 --- a/src/pages/login/index.vue +++ b/src/pages/login/index.vue @@ -59,7 +59,9 @@ const onSubmitLogin = async () => { const { data: result } = await appLoginAPI(loginForm) memberStore.setToken(result.access_token) const userResult = await getUserInfoAPI() - const { data: comResult } = await getCompanyListAPI() + const { data: res } = await getCompanyListAPI() + const comResult = res.filter((e) => e.isShow) + // console.log('🚀 ~ onSubmitLogin ~ comResult:', comResult) const userCompanyList = comResult.filter((e) => e.companyId == userResult.user.companyId) memberStore.setUserInfo(userResult.user) memberStore.setCompanyList(comResult) @@ -98,7 +100,9 @@ onMounted(async () => { memberStore.setToken(result.access_token) const userResult = await getUserInfoAPI() - const { data: comResult } = await getCompanyListAPI() + const { data: res } = await getCompanyListAPI() + const comResult = res.filter((e) => e.isShow) + // console.log('🚀 ~ onMounted ~ comResult:', comResult) const userCompanyList = comResult.filter( (e) => e.companyId == userResult.user.companyId, )