|
|
@@ -123,12 +123,12 @@ async function login() {
|
|
|
});
|
|
|
|
|
|
if (data.result.isSuperuser == 1) {
|
|
|
- comoanyModalVisable.value = true;
|
|
|
cache.value = data.result;
|
|
|
- store.dispatch(
|
|
|
+ await store.dispatch(
|
|
|
"getShippingCompanySelect",
|
|
|
data.result.loginAccountId
|
|
|
);
|
|
|
+ selectCompany(store.state.companySelect[0]);
|
|
|
} else {
|
|
|
store.commit("login", data.result);
|
|
|
}
|
|
|
@@ -150,6 +150,7 @@ function selectCompany(e) {
|
|
|
localStorage.loginAccountId = e.key;
|
|
|
localStorage.currentCompany = JSON.stringify(e);
|
|
|
store.state.loginAccountId = e.key;
|
|
|
+ store.state.currentCompany = e;
|
|
|
store.commit("login", cache.value);
|
|
|
}
|
|
|
|