chore: init theme (#14508)

* chore: init theme

* chore: update faas config
This commit is contained in:
iamkun
2019-02-28 16:00:59 +08:00
committed by Zhi Cun
parent 2604c6192f
commit febdd3bbb4
63 changed files with 5552 additions and 805 deletions

View File

@@ -0,0 +1,20 @@
import Element from 'main/index.js';
import { post, get } from './ajax';
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/'
};
const host = hostList[process.env.FAAS_ENV] || hostList.production;
export const getVars = () => {
return get(`${host}getVariable?version=${version}`);
};
export const updateVars = (data, cb) => {
return post(`${host}updateVariable?version=${version}`, data, cb);
};