ttk-app-core
Version:
enterprise develop framework
43 lines (38 loc) • 2.07 kB
JavaScript
/**
* webapi.js 封装app所需的所有web请求
* 供app测试使用,app加入网站后webpai应该由网站通过config,提供给每个app
*/
import { fetch, fetchCors } from 'edf-utils'
export default {
user: {
create: (option) => fetch.post('/v1/edf/user/create', option),
existsMobile: (mobile) => fetch.post('/v1/edf/user/existsMobile', { mobile })
},
captcha: {
fetch: (mobile) => fetch.post('/v1/edf/captcha/fetch', mobile),
validate: (captcha) => fetch.post('/v1/edf/captcha/validate', captcha)
},
sysOrg: {
update: (option) => fetch.post('/v1/edf/org/update', option),
findById: (option) => fetch.post('/v1/edf/org/findById', option)
},
enumDetail: {
findByEnumId: (enumId) => fetch.post('/v1/edf/enumDetail/findByEnumId', enumId)
},
enableDate: {
getServerDate: () => fetch.post('/v1/edf/org/getSystemDate'),
},
tplus: {
// test: (option,options) => fetchCors.post('http://172.16.30.201:8867/common/hello', option,options),//T+测试
save: (url, params, options) => fetchCors.post(url, params, options),//保存到t+
Dbtest: (url, params, options) => fetchCors.post(url, params, options),
//query: (url,option, options) => fetchCors.post('/common/config/Query', option, options),//查询T+配置
accountBooks: (url, params, options) => fetchCors.post(url, params, options),
configSave: (option) => fetch.post('/v1/edf/linkConfig/save', option),//保存到配置
configDelete: (option) => fetch.post('/v1/edf/linkConfig/delete', option),//删除配置
configQuery: (option) => fetch.post('/v1/edf/linkConfig/query', option),//查询配置
configExist: (option) => fetch.post('/v1/edf/linkConfig/exist', option),//是否有配置
updateBatchByparamKey: (option) => fetch.post('/v1/edf/orgparameter/updateBatchByparamKey', option),
queryedf: (option) => fetch.post('/v1/edf/orgparameter/query', option),
}
}