更新说明:\n1. 新增用户端与管理员端 Passkey 登录/注册/设备管理(最多3台,支持设备备注、删除设备)。\n2. 修复 Passkey 注册与登录流程中的浏览器/证书/CSRF相关问题,增强错误提示。\n3. 前台登录页改为独立入口,首屏仅加载必要资源,其他页面按需加载。\n4. 系统配置页改为静默获取金山文档状态,避免首屏阻塞,并优化状态展示为“检测中/已登录/未登录/异常”。\n5. 补充后端接口与页面渲染适配,修复多入口下样式依赖注入问题。\n6. 同步更新前后台构建产物与相关静态资源。
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
import { publicApi } from './http'
|
|
|
|
export async function fetchSchedules(params = {}) {
|
|
const { data } = await publicApi.get('/schedules', { params })
|
|
return data
|
|
}
|
|
|
|
export async function createSchedule(payload) {
|
|
const { data } = await publicApi.post('/schedules', payload)
|
|
return data
|
|
}
|
|
|
|
export async function updateSchedule(scheduleId, payload) {
|
|
const { data } = await publicApi.put(`/schedules/${scheduleId}`, payload)
|
|
return data
|
|
}
|
|
|
|
export async function deleteSchedule(scheduleId) {
|
|
const { data } = await publicApi.delete(`/schedules/${scheduleId}`)
|
|
return data
|
|
}
|
|
|
|
export async function toggleSchedule(scheduleId, payload) {
|
|
const { data } = await publicApi.post(`/schedules/${scheduleId}/toggle`, payload)
|
|
return data
|
|
}
|
|
|
|
export async function runScheduleNow(scheduleId) {
|
|
const { data } = await publicApi.post(`/schedules/${scheduleId}/run`, {})
|
|
return data
|
|
}
|
|
|
|
export async function fetchScheduleLogs(scheduleId, params = {}) {
|
|
const { data } = await publicApi.get(`/schedules/${scheduleId}/logs`, { params })
|
|
return data
|
|
}
|
|
|
|
export async function clearScheduleLogs(scheduleId) {
|
|
const { data } = await publicApi.delete(`/schedules/${scheduleId}/logs`)
|
|
return data
|
|
}
|