From edfc97862895474df7507e519cefd10f1268b6c0 Mon Sep 17 00:00:00 2001 From: iamkun Date: Thu, 30 May 2019 19:49:23 +0800 Subject: [PATCH] Chore: update api host (#15784) --- examples/components/header.vue | 4 ++-- examples/components/theme/loader/api.js | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/examples/components/header.vue b/examples/components/header.vue index 7a154be8d..31349bbf6 100644 --- a/examples/components/header.vue +++ b/examples/components/header.vue @@ -380,7 +380,7 @@ import compoLang from '../i18n/component.json'; import Element from 'main/index.js'; import themeLoader from './theme/loader'; - import { getVars } from './theme/loader/api.js'; + import { getTestEle } from './theme/loader/api.js'; import bus from '../bus'; import { ACTION_USER_CONFIG_UPDATE } from './theme/constant.js'; @@ -425,7 +425,7 @@ } }, mounted() { - getVars() + getTestEle() .then(() => { this.$isEle = true; ga('send', 'event', 'DocView', 'Inner'); diff --git a/examples/components/theme/loader/api.js b/examples/components/theme/loader/api.js index 73f61b245..9f31d3999 100644 --- a/examples/components/theme/loader/api.js +++ b/examples/components/theme/loader/api.js @@ -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); };