更新密码找回uniapp
This commit is contained in:
1 parent
7f9a66da0f
commit
3fdda89833
1304 files changed
+3503
-26132
No files matched your search
@@ -56,9 +56,6 @@ export function normalizeSchedule(item) {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取日程列表
|
||||
*/
|
||||
export async function fetchSchedules(params = {}) {
|
||||
const data = await request({
|
||||
url: '/api/schedule/list',
|
||||
@@ -73,17 +70,11 @@ export async function fetchSchedules(params = {}) {
|
||||
return { list, total: data.total || 0 }
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单条日程
|
||||
*/
|
||||
export async function getSchedule(id) {
|
||||
const data = await request({ url: `/api/schedule/${id}` })
|
||||
return data ? normalizeSchedule(data) : null
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建日程
|
||||
*/
|
||||
export async function createSchedule(data) {
|
||||
const channels = (data.remindChannels || []).map(ch => {
|
||||
if (ch === 'app') return 'SITE_MSG'
|
||||
@@ -104,9 +95,6 @@ export async function createSchedule(data) {
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新日程
|
||||
*/
|
||||
export async function updateSchedule(id, data) {
|
||||
const channels = (data.remindChannels || []).map(ch => {
|
||||
if (ch === 'app') return 'SITE_MSG'
|
||||
@@ -126,17 +114,11 @@ export async function updateSchedule(id, data) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除日程
|
||||
*/
|
||||
export async function deleteSchedule(id) {
|
||||
await request({ url: `/api/schedule/${id}`, method: 'DELETE' })
|
||||
return true
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换完成状态
|
||||
*/
|
||||
export async function toggleScheduleComplete(id) {
|
||||
const res = await request({
|
||||
url: `/api/schedule/${id}/toggle`,
|
||||
|
||||
Reference in new issue
Block a user