Files
cody-crm/frontend/packages/lib-shared/api/modules/sys.ts
wangziqi 72e2110987
Some checks failed
Synchronize to Gitee / repo-sync (push) Has been cancelled
Typos Checking / Spell Check with Typos (push) Has been cancelled
chore: initial commit
2026-06-23 11:56:23 +08:00

20 lines
568 B
TypeScript

import type { CordysAxios } from '@lib/shared/api/http/Axios';
import { LocaleChangeUrl, VersionUrl } from '@lib/shared/api/requrls/sys';
import type { SystemVersion } from '@lib/shared/models/common';
export default function useSysApi(CDR: CordysAxios) {
// 获取系统版本信息
function getSystemVersion() {
return CDR.get<SystemVersion>({ url: VersionUrl });
}
function changeLocaleBackEnd(language: string) {
return CDR.post({ url: LocaleChangeUrl, data: { language } });
}
return {
getSystemVersion,
changeLocaleBackEnd,
};
}