|
@@ -71,6 +71,7 @@
|
|
import type { LoginData } from '@/api/types/user';
|
|
import type { LoginData } from '@/api/types/user';
|
|
import { FormRules, OptionListItem } from '@/types/global';
|
|
import { FormRules, OptionListItem } from '@/types/global';
|
|
import { objAssign } from '@/utils/utils';
|
|
import { objAssign } from '@/utils/utils';
|
|
|
|
+ import { getOrgCodeFromDomain } from '@/constants/app';
|
|
|
|
|
|
defineOptions({
|
|
defineOptions({
|
|
name: 'Login',
|
|
name: 'Login',
|
|
@@ -118,7 +119,8 @@
|
|
const schools = ref<OptionListItem[]>([]);
|
|
const schools = ref<OptionListItem[]>([]);
|
|
async function getSchools() {
|
|
async function getSchools() {
|
|
if (!appStore.domain) return;
|
|
if (!appStore.domain) return;
|
|
- const resData = await schoolList();
|
|
|
|
|
|
+ const code = getOrgCodeFromDomain(appStore.domain);
|
|
|
|
+ const resData = await schoolList(code);
|
|
schools.value = (resData || []).map((item) => {
|
|
schools.value = (resData || []).map((item) => {
|
|
return { value: item.code, label: item.name };
|
|
return { value: item.code, label: item.name };
|
|
});
|
|
});
|