소스 검색

Chore: update api host (#15784)

iamkun 6 년 전
부모
커밋
edfc978628
2개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제
  1. 2 2
      examples/components/header.vue
  2. 6 1
      examples/components/theme/loader/api.js

+ 2 - 2
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');

+ 6 - 1
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);
 };