33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
|
|
import http from "@/api/http";
|
||
|
|
import type { ReportReminderConfig, ReportReminderTestPayload, WecomAppConfig, WecomConfigStatus } from "./types";
|
||
|
|
|
||
|
|
export async function getWecomAppConfig(tenantId?: number) {
|
||
|
|
const resp = await http.get("/sys/api/admin/wecom-app-config", { params: { tenantId } });
|
||
|
|
return resp.data.data as WecomAppConfig;
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function updateWecomAppConfig(payload: WecomAppConfig) {
|
||
|
|
const resp = await http.put("/sys/api/admin/wecom-app-config", payload);
|
||
|
|
return resp.data.data as boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function getReportReminderConfig(tenantId?: number) {
|
||
|
|
const resp = await http.get("/sys/api/admin/report-reminder-config", { params: { tenantId } });
|
||
|
|
return resp.data.data as ReportReminderConfig;
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function updateReportReminderConfig(payload: ReportReminderConfig) {
|
||
|
|
const resp = await http.put("/sys/api/admin/report-reminder-config", payload);
|
||
|
|
return resp.data.data as boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function testReportReminderConfig(payload: ReportReminderTestPayload) {
|
||
|
|
const resp = await http.post("/sys/api/admin/report-reminder-config/test", payload);
|
||
|
|
return resp.data.data as boolean;
|
||
|
|
}
|
||
|
|
|
||
|
|
export async function getWecomConfigStatus(tenantId?: number) {
|
||
|
|
const resp = await http.get("/sys/api/admin/wecom-config-status", { params: { tenantId } });
|
||
|
|
return resp.data.data as WecomConfigStatus;
|
||
|
|
}
|