Merge branch 'master' of https://git.yunzer.cn/yunzerwebsite/yunzerwebsiteallinone
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/** 提醒列表 */
|
||||
export function getReminderList(params) {
|
||||
return request({
|
||||
url: "/platform/reminder/list",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 提醒详情 */
|
||||
export function getReminderDetail(id) {
|
||||
return request({
|
||||
url: `/platform/reminder/${id}`,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
/** 新增提醒 */
|
||||
export function createReminder(data) {
|
||||
return request({
|
||||
url: "/platform/reminder",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 更新提醒 */
|
||||
export function updateReminder(id, data) {
|
||||
return request({
|
||||
url: `/platform/reminder/${id}`,
|
||||
method: "put",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除提醒 */
|
||||
export function deleteReminder(id) {
|
||||
return request({
|
||||
url: `/platform/reminder/${id}`,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
/** 批量删除提醒 */
|
||||
export function batchDeleteReminder(ids) {
|
||||
return request({
|
||||
url: "/platform/reminder/batchDelete",
|
||||
method: "post",
|
||||
data: { ids },
|
||||
});
|
||||
}
|
||||
|
||||
/** 测试提醒渠道 */
|
||||
export function testReminder(data) {
|
||||
return request({
|
||||
url: "/platform/reminder/test",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 结束提醒 */
|
||||
export function finishReminder(id) {
|
||||
return request({
|
||||
url: `/platform/reminder/${id}/finish`,
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
/** 获取站内信配置 */
|
||||
export function getSiteReminderConfig() {
|
||||
return request({
|
||||
url: "/platform/sitereminder/config",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
/** 保存站内信配置 */
|
||||
export function saveSiteReminderConfig(data) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/config",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 发送站内信 */
|
||||
export function sendSiteReminder(data) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/send",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取我的消息列表 */
|
||||
export function getMySiteReminders(params) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/myList",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 标记消息为已读 */
|
||||
export function readSiteReminder(id) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/read",
|
||||
method: "post",
|
||||
data: { id },
|
||||
});
|
||||
}
|
||||
|
||||
/** 一键全部已读 */
|
||||
export function readAllSiteReminders() {
|
||||
return request({
|
||||
url: "/platform/sitereminder/readall",
|
||||
method: "post",
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除消息 */
|
||||
export function deleteSiteReminder(id) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/delete",
|
||||
method: "post",
|
||||
data: { id },
|
||||
});
|
||||
}
|
||||
|
||||
/** 获取已发送的站内信列表(按 batch_id 分组) */
|
||||
export function getSentSiteReminders(params) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/sentList",
|
||||
method: "get",
|
||||
params,
|
||||
});
|
||||
}
|
||||
|
||||
/** 编辑/更新已发送的站内信 */
|
||||
export function updateSentSiteReminder(data) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/updateSent",
|
||||
method: "post",
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除已发送的站内信批次 */
|
||||
export function deleteSentSiteReminderBatch(batch_id) {
|
||||
return request({
|
||||
url: "/platform/sitereminder/deleteSent",
|
||||
method: "post",
|
||||
data: { batch_id },
|
||||
});
|
||||
}
|
||||
@@ -150,4 +150,41 @@ export function saveStorageConfig(data) {
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取 Bark 配置
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function getBarkConfig() {
|
||||
return request({
|
||||
url: "/platform/bark/info",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存 Bark 配置
|
||||
* @param {Object} data 要保存的数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function saveBarkConfig(data) {
|
||||
return request({
|
||||
url: "/platform/bark/editinfo",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送测试 Bark 推送
|
||||
* @param {Object} data 测试数据
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function sendTestBark(data) {
|
||||
return request({
|
||||
url: "/platform/bark/sendtest",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user