提交 9bbe5d9f authored 作者: vipcxj's avatar vipcxj

新增模块管理相关rest api

上级 14ae8259
import request from '../utils/request';
import post from '../utils/post';
import config from '../utils/config';
export async function fetchMenus() {
......@@ -10,5 +11,36 @@ export async function fetchModuleInfos() {
}
export async function fetchModuleLayout(name) {
return request(`${config.apiContextPath}/api/module/user/${name}/layout`);
return request(`${config.apiContextPath}/api/module/user/${encodeURIComponent(name)}/layout`);
}
export const adminApi = {
async allInfoes(dmPath) {
return request(`${config.apiContextPath}/api/module/admin/info`, { dmPath });
},
async getInfo(name, dmPath) {
return request(`${config.apiContextPath}/api/module/admin/${encodeURIComponent(name)}/info`, { dmPath });
},
async getConfigure(name, dmPath) {
return request(`${config.apiContextPath}/api/module/admin/${encodeURIComponent(name)}/configure`, { dmPath });
},
async getPlainConfigure(name, dmPath) {
return request(`${config.apiContextPath}/api/module/admin/${encodeURIComponent(name)}/plainConfigure`, { dmPath });
},
async setConfigure(name, configure, dmPath) {
return post(`${config.apiContextPath}/api/module/admin/${encodeURIComponent(name)}/configure`, { dmPath, configure });
},
async getPlainConfigures(dmPath) {
return request(`${config.apiContextPath}/api/module/admin/plainConfigures`, { dmPath });
},
async setConfigures(configures, dmPath) {
return post(`${config.apiContextPath}/api/module/admin/configures`, { dmPath, configure: configures });
},
async getDocument(name, dmPath) {
return request(`${config.apiContextPath}/api/module/admin/${encodeURIComponent(name)}/document`, { dmPath });
},
async setDocument(name, document, dmPath) {
return post(`${config.apiContextPath}/api/module/admin/${encodeURIComponent(name)}/document`, { dmPath, document });
},
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论