f
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 (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
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
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 (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
Lock Threads / action (push) Has been cancelled
Issue Close Require / close-issues (push) Has been cancelled
Close stale issues / stale (push) Has been cancelled
This commit is contained in:
@@ -4,9 +4,11 @@ import { requestClient } from '#/api/request';
|
||||
|
||||
export namespace FeatureApi {
|
||||
export interface FeatureItem {
|
||||
id: number;
|
||||
id: string;
|
||||
api_id: string;
|
||||
name: string;
|
||||
whitelist_price: number;
|
||||
cost_price: number;
|
||||
create_time: string;
|
||||
update_time: string;
|
||||
}
|
||||
@@ -19,11 +21,15 @@ export namespace FeatureApi {
|
||||
export interface CreateFeatureRequest {
|
||||
api_id: string;
|
||||
name: string;
|
||||
whitelist_price?: number;
|
||||
cost_price?: number;
|
||||
}
|
||||
|
||||
export interface UpdateFeatureRequest {
|
||||
api_id?: string;
|
||||
name?: string;
|
||||
whitelist_price?: number;
|
||||
cost_price?: number;
|
||||
}
|
||||
|
||||
export interface FeatureExampleItem {
|
||||
@@ -36,7 +42,7 @@ export namespace FeatureApi {
|
||||
}
|
||||
|
||||
export interface ConfigFeatureExampleRequest {
|
||||
feature_id: number;
|
||||
feature_id: string;
|
||||
data: string;
|
||||
}
|
||||
|
||||
@@ -45,12 +51,12 @@ export namespace FeatureApi {
|
||||
}
|
||||
|
||||
export interface GetFeatureExampleRequest {
|
||||
feature_id: number;
|
||||
feature_id: string;
|
||||
}
|
||||
|
||||
export interface GetFeatureExampleResponse {
|
||||
id: number;
|
||||
feature_id: number;
|
||||
id: string;
|
||||
feature_id: string;
|
||||
api_id: string;
|
||||
data: string;
|
||||
create_time: string;
|
||||
@@ -71,7 +77,7 @@ async function getFeatureList(params: Recordable<any>) {
|
||||
* 获取模块详情
|
||||
* @param id 模块ID
|
||||
*/
|
||||
async function getFeatureDetail(id: number) {
|
||||
async function getFeatureDetail(id: string) {
|
||||
return requestClient.get<FeatureApi.FeatureItem>(`/feature/detail/${id}`);
|
||||
}
|
||||
|
||||
@@ -80,7 +86,7 @@ async function getFeatureDetail(id: number) {
|
||||
* @param data 模块数据
|
||||
*/
|
||||
async function createFeature(data: FeatureApi.CreateFeatureRequest) {
|
||||
return requestClient.post<{ id: number }>('/feature/create', data);
|
||||
return requestClient.post<{ id: string }>('/feature/create', data);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -89,7 +95,7 @@ async function createFeature(data: FeatureApi.CreateFeatureRequest) {
|
||||
* @param data 模块数据
|
||||
*/
|
||||
async function updateFeature(
|
||||
id: number,
|
||||
id: string,
|
||||
data: FeatureApi.UpdateFeatureRequest,
|
||||
) {
|
||||
return requestClient.put<{ success: boolean }>(`/feature/update/${id}`, data);
|
||||
@@ -99,7 +105,7 @@ async function updateFeature(
|
||||
* 删除模块
|
||||
* @param id 模块ID
|
||||
*/
|
||||
async function deleteFeature(id: number) {
|
||||
async function deleteFeature(id: string) {
|
||||
return requestClient.delete<{ success: boolean }>(`/feature/delete/${id}`);
|
||||
}
|
||||
|
||||
@@ -120,7 +126,7 @@ async function configFeatureExample(
|
||||
* 获取功能示例数据
|
||||
* @param featureId 功能ID
|
||||
*/
|
||||
async function getFeatureExample(featureId: number) {
|
||||
async function getFeatureExample(featureId: string) {
|
||||
return requestClient.get<FeatureApi.GetFeatureExampleResponse>(
|
||||
`/feature/example/${featureId}`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user