enc-framework
Version:
enc-framework 核心组件.
51 lines (46 loc) • 1.58 kB
JavaScript
/**
* Created by wl on 2018/11/12.
*/
import AjmHttp from 'enc-framework/core/utils/ajm-http';
import AjmConfig from 'enc-framework/core/utils/ajm-config';
// http请求对象
let $http = new AjmHttp({
contextPath: AjmConfig.get("MANAGER_CONTEXT_PATH")
}).getHttpClient();
// 工具服务
let dashboardService = {
//查找用户区块列表
findUserBlockList(params){
if(!params){
params = {};
}
return $http.get('/api/block/findUserBlockList', params).then(res => res.data);
},
//保存用户区块
saveOrUpdateUserBlock(params){
if(!params){
params = {};
}
return $http.post('/api/block/saveOrUpdateUserBlock', params).then(res => res.data);
},
//删除用户区块
deleteUserBlockById(blockId){
return $http.get('/api/block/deleteUserBlockById/' + blockId).then(res => res.data);
},
//更新用户区块排序
updateBlockOrder(params){
if(!params){
params = {};
}
return $http.post('/api/block/updateUserBlockSeqList', params).then(res => res.data);
},
//查询所有模块列表
findModuleList(){
return $http.get('/api/module/findModuleList').then(res => res.data);
},
//根据模块id查询区块列表/api/block/findBlockListByModuleId/{moduleId}
findBlockListByModuleId(moduleId){
return $http.get('/api/block/findBlockListByModuleId/' + moduleId).then(res => res.data);
},
};
export default dashboardService;