Chore: update api host (#15784)

This commit is contained in:
iamkun
2019-05-30 19:49:23 +08:00
committed by luckyCao
parent f6bab114e3
commit edfc978628
2 changed files with 8 additions and 3 deletions

View File

@@ -6,7 +6,8 @@ const { version } = Element;
const hostList = {
local: 'http://localhost:3008/',
alpha: 'https://ssr.alpha.elenet.me/element-theme-server/',
production: 'https://ssr.elenet.me/element-theme-server/'
production: 'https://ssr.ele.me/element-theme-server/',
productionEle: 'https://ssr.elenet.me/element-theme-server/'
};
const host = hostList[process.env.FAAS_ENV] || hostList.production;
@@ -15,6 +16,10 @@ export const getVars = () => {
return get(`${host}getVariable?version=${version}`);
};
export const getTestEle = () => {
return get(`${hostList.productionEle}getVariable?version=${version}`);
};
export const updateVars = (data, cb) => {
return post(`${host}updateVariable?version=${version}`, data, cb);
};