浏览代码

Chore: Mark ali inner user's access (#16609)

* Chore: update theme inner api

* Chore: update theme inner api

* Chore: text

* Chore: fix

* Chore: fix
iamkun 6 年之前
父节点
当前提交
e13de1688b
共有 2 个文件被更改,包括 16 次插入2 次删除
  1. 12 2
      examples/components/header.vue
  2. 4 0
      examples/components/theme/loader/api.js

+ 12 - 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 { getTestEle } from './theme/loader/api.js';
+  import { getTestEle, getTestAli } from './theme/loader/api.js';
   import bus from '../bus';
   import { ACTION_USER_CONFIG_UPDATE } from './theme/constant.js';
 
@@ -428,9 +428,19 @@
       getTestEle()
         .then(() => {
           this.$isEle = true;
-          ga('send', 'event', 'DocView', 'Inner');
+          ga('send', 'event', 'DocView', 'Ele', 'Inner');
         })
         .catch((err) => {
+          ga('send', 'event', 'DocView', 'Ele', 'Outer');
+          console.error(err);
+        });
+      getTestAli()
+        .then(() => {
+          this.$isEle = true;
+          ga('send', 'event', 'DocView', 'Ali', 'Inner');
+        })
+        .catch((err) => {
+          ga('send', 'event', 'DocView', 'Ali', 'Outer');
           console.error(err);
         });
     },

+ 4 - 0
examples/components/theme/loader/api.js

@@ -19,6 +19,10 @@ export const getTestEle = () => {
   return get(`${hostList.alpha}getVariable`);
 };
 
+export const getTestAli = () => {
+  return get(`https://private-alipayobjects.alipay.com/alipay-rmsdeploy-image/rmsportal/VmvVUItLdPNqKlNGuRHi.png?t=${Date.now()}`);
+};
+
 export const updateVars = (data, cb) => {
   return post(`${host}updateVariable?version=${version}`, data, cb);
 };