2023-06-10 20:57:16 +08:00
|
|
|
import request from '@/config/axios'
|
|
|
|
|
|
|
|
export interface SignInConfigVO {
|
|
|
|
id: number
|
2023-08-09 16:14:00 +08:00
|
|
|
day: number | null
|
|
|
|
point: number | null
|
2023-08-19 14:10:11 +08:00
|
|
|
enable: boolean | null
|
2023-06-10 20:57:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 查询积分签到规则列表
|
2023-08-09 16:14:00 +08:00
|
|
|
export const getSignInConfigPage = async () => {
|
2023-08-19 14:10:11 +08:00
|
|
|
return await request.get({ url: `/member/point/sign-in-config/list` })
|
2023-06-10 20:57:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 查询积分签到规则详情
|
|
|
|
export const getSignInConfig = async (id: number) => {
|
2023-08-19 14:10:11 +08:00
|
|
|
return await request.get({ url: `/member/point/sign-in-config/get?id=` + id })
|
2023-06-10 20:57:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 新增积分签到规则
|
|
|
|
export const createSignInConfig = async (data: SignInConfigVO) => {
|
2023-08-19 14:10:11 +08:00
|
|
|
return await request.post({ url: `/member/point/sign-in-config/create`, data })
|
2023-06-10 20:57:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 修改积分签到规则
|
|
|
|
export const updateSignInConfig = async (data: SignInConfigVO) => {
|
2023-08-19 14:10:11 +08:00
|
|
|
return await request.put({ url: `/member/point/sign-in-config/update`, data })
|
2023-06-10 20:57:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// 删除积分签到规则
|
|
|
|
export const deleteSignInConfig = async (id: number) => {
|
2023-08-19 14:10:11 +08:00
|
|
|
return await request.delete({ url: `/member/point/sign-in-config/delete?id=` + id })
|
2023-06-10 20:57:16 +08:00
|
|
|
}
|