Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Update inner network check #16700

Merged
merged 1 commit into from
Jul 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions examples/components/header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@
import compoLang from '../i18n/component.json';
import Element from 'main/index.js';
import themeLoader from './theme/loader';
import { getTestEle, getTestAli } 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';

Expand Down Expand Up @@ -434,15 +434,17 @@
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);
});

const testInnerImg = new Image();
testInnerImg.onload = () => {
this.$isEle = true;
ga('send', 'event', 'DocView', 'Ali', 'Inner');
};
testInnerImg.onerror = (err) => {
ga('send', 'event', 'DocView', 'Ali', 'Outer');
console.error(err);
};
testInnerImg.src = `https://private-alipayobjects.alipay.com/alipay-rmsdeploy-image/rmsportal/VmvVUItLdPNqKlNGuRHi.png?t=${Date.now()}`;
},
methods: {
switchVersion(version) {
Expand Down
4 changes: 0 additions & 4 deletions examples/components/theme/loader/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ 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);
};