init: 项目初始化提交
Some checks failed
CI / Test (ubuntu-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
CI / Lint (ubuntu-latest) (push) Has been cancelled
CI / Lint (windows-latest) (push) Has been cancelled
CI / Check (ubuntu-latest) (push) Has been cancelled
CI / Check (windows-latest) (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Deploy Website on push / Deploy Push Playground Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Docs Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Antd Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Element Ftp (push) Has been cancelled
Deploy Website on push / Deploy Push Naive Ftp (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
CI / CI OK (push) Has been cancelled
Deploy Website on push / Rerun on failure (push) Has been cancelled

This commit is contained in:
2025-05-27 18:35:06 +08:00
commit d3609c21c0
1430 changed files with 122218 additions and 0 deletions

View File

@@ -0,0 +1,67 @@
import type { Recordable } from '@vben/types';
import { requestClient } from '#/api/request';
export namespace PromotionLinkApi {
export interface PromotionLinkItem {
id: number;
name: string;
url: string;
create_time: string;
}
export interface PromotionLink {
total: number;
items: PromotionLinkItem[];
}
}
/**
* 获取推广链接列表数据
*/
async function getPromotionLinkList(params: Recordable<any>) {
return requestClient.get<PromotionLinkApi.PromotionLink>(
'/promotion/link/list',
{
params,
},
);
}
/**
* 创建推广链接
* @param data 推广链接数据
*/
async function createPromotionLink(
data: Omit<PromotionLinkApi.PromotionLinkItem, 'id'>,
) {
return requestClient.post('/promotion/link/create', data);
}
/**
* 更新推广链接
*
* @param id 推广链接 ID
* @param data 推广链接数据
*/
async function updatePromotionLink(
id: string,
data: Omit<PromotionLinkApi.PromotionLinkItem, 'id'>,
) {
return requestClient.put(`/promotion/link/update/${id}`, data);
}
/**
* 删除推广链接
* @param id 推广链接 ID
*/
async function deletePromotionLink(id: string) {
return requestClient.delete(`/promotion/link/delete/${id}`);
}
export {
createPromotionLink,
deletePromotionLink,
getPromotionLinkList,
updatePromotionLink,
};