You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
657 B
26 lines
657 B
import { requestClient } from '#/api/request';
|
|
|
|
/**
|
|
* 获取系统支持的时区列表
|
|
*/
|
|
export async function getTimezoneOptionsApi() {
|
|
return await requestClient.get<
|
|
{
|
|
label: string;
|
|
value: string;
|
|
}[]
|
|
>('/timezone/getTimezoneOptions');
|
|
}
|
|
/**
|
|
* 获取用户时区
|
|
*/
|
|
export async function getTimezoneApi(): Promise<null | string | undefined> {
|
|
return requestClient.get<null | string | undefined>('/timezone/getTimezone');
|
|
}
|
|
/**
|
|
* 设置用户时区
|
|
* @param timezone 时区
|
|
*/
|
|
export async function setTimezoneApi(timezone: string): Promise<void> {
|
|
return requestClient.post('/timezone/setTimezone', { timezone });
|
|
}
|
|
|