All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.front.api.ts.ftl Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
import {get, postJ} from "@/request";
import {I${modelName}} from "@/apis/${pathName}/types";
import {IPageRes} from "@/apis/page";

/**
* 获取列表
*/
export const get${modelName}PageApi = (param: I${modelName}) => get>("/${folderName}/${apiPathName}/query", param)
<#if webGeneratorVo.isSqlSentence==1>
<#if webGeneratorVo.pageAttribute?contains("add")>
/**
* 添加
*/
export const create${modelName}Api = (data: I${modelName}) => postJ("/${folderName}/${apiPathName}/create", data)

<#if webGeneratorVo.pageAttribute?contains("update")>
/**
* 修改
*/
export const modify${modelName}Api = (data: I${modelName}) => postJ("/${folderName}/${apiPathName}/modify", data)

<#if webGeneratorVo.pageAttribute?contains("delete")>
/**
* 删除
* @param id
*/
export const remove${modelName}Api = (id: string) => get("/${folderName}/${apiPathName}/remove/" + id)

/**
* 查询详情
* @param id
*/
export const get${modelName}DetailApi = (id: string) => get("/${folderName}/${apiPathName}/detail/" + id)





© 2015 - 2024 Weber Informatics LLC | Privacy Policy