Commit e204c17b authored by 郭志伟's avatar 郭志伟

Merge branch 'feat/h5-polyfill' into 'master'

Feat/h5 polyfill

See merge request !19
parents c7b51f46 ae61ee5a
import { Controller, Context } from 'egg';
import * as path from 'path';
export default class ActivityController extends Controller {
public async home(ctx: Context) {
......
0b54b6896ca0bdaa53b9b4e49c403f30
\ No newline at end of file
......@@ -20,12 +20,20 @@ if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production')
}
// if (EASY_ENV_IS_BROWSER && process.env.SENTRY_ENV === 'test' || process.env.NODE_ENV !== 'production') {
// ! 上线后务必取掉
// const vConsole = require('vconsole');
// new vConsole();
// // ! 上线后务必取掉;
// const vConsole = require('vconsole');
// new vConsole();
// }
if (EASY_ENV_IS_BROWSER) {
const isSafari = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
if (isSafari.test(navigator.userAgent)) {
window.onpageshow = function(e) {
if (e.persisted || (window.performance && window.performance.navigation.type == 2)) {
window.location.reload();
}
};
}
Vue.use(lazyload);
const saDirective = new SaDirective();
Vue.directive('track', saDirective.directive);
......
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'http';
import apolloSsr from '../../../config/apollo.ssr.json';
const protocol = EASY_ENV_IS_BROWSER ? window.location.protocol : 'https';
export default {
// apiHost: `http://localhost:7001/`,
// apiHost: `http://192.168.28.199:7001/`,
apiHost: 'https://quantum-blocks-vcc2.liangkebang.net',
const hostMap = {
apiHost: `${protocol}//quantum-blocks-test1.liangkebang.net`,
shenceUrl: `${protocol}//bn.xyqb.com/sa?project=default`,
// opapiHost: `https://opapi-vcc2.liangkebang.net`,
kdspHost: 'https://kdsp-api-vcc2.liangkebang.net',
test: true
};
if (EASY_ENV_IS_BROWSER) {
const apolloWin = window.apollo || window.__INITIAL_STATE__.apollo;
if (apolloWin) {
for (const key in apolloWin) {
if (apolloWin[key]) {
hostMap[key] = apolloWin[key];
}
}
}
}
if (EASY_ENV_IS_NODE) {
if (apolloSsr) {
for (const key in apolloSsr) {
if (apolloSsr[key]) {
hostMap[key] = apolloSsr[key];
}
}
}
}
export default hostMap;
......@@ -10,6 +10,7 @@
.freedom {
height: 100%;
width: 100%;
header {
width: 100%;
height: 48px;
......@@ -17,11 +18,14 @@
text-align: center;
border-bottom: 1px solid #f0f0f0;
}
&-body {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
z-index: 1;
&_full {
height: calc(100% - 48px);
}
......
......@@ -23,6 +23,7 @@ export default class TransformStyleMixin extends Vue {
style.backgroundImage = `url(${style.backgroundImage})`;
}
}
style.zIndex = 2;
return style;
}
......
......@@ -2,10 +2,13 @@ import Vue from 'vue';
import sa from 'sa-sdk-javascript';
import config from '@/config';
import Storage from '@/service/localStorage.service';
import { getParameterByName } from '@/service/utils.service';
export function initSa(router) {
console.log('initSa', EASY_ENV_IS_BROWSER, config, window.location.pathname);
const activity_id = window.location.pathname.split('/')?.[2] || '';
const vccChannel = getParameterByName('vccChannel') || getParameterByName('registerFrom');
const sonVccChannel = getParameterByName('sonVccChannel');
sa.init({
server_url: config.shenceUrl,
heatmap: {
......@@ -22,7 +25,9 @@ export function initSa(router) {
// 添加公共属性
sa.registerPage({
platformType: 'H5',
activity_id
activity_id,
vccChannel,
sonVccChannel
});
router.afterEach(() => {
Vue.nextTick(() => {
......
{
"api": {
"apiHost": "https://quantum-blocks-vcc2.liangkebang.net",
"apiHost": "https://quantum-blocks-test1.liangkebang.net",
"h5Host": "https://quantum-h5-test1.liangkebang.net",
"opapiHost": "https://opapi-test1.liangkebang.net",
"passportHost": "https://passportapi-test1.liangkebang.net",
......@@ -16,8 +16,8 @@
}
},
"redis": {
"port": 31565,
"host": "172.17.5.13",
"port": 31400,
"host": "172.17.5.17",
"password": "",
"db": 0
},
......
......@@ -7,7 +7,8 @@ export default (appInfo: EggAppConfig) => {
config.siteFile = {
'/favicon.ico': fs.readFileSync(path.join(appInfo.baseDir, 'app/web/asset/images/favicon.ico')),
'/FZz8NUb3x0.txt': fs.readFileSync(path.join(appInfo.baseDir, 'app/web/asset/FZz8NUb3x0.txt'))
'/FZz8NUb3x0.txt': fs.readFileSync(path.join(appInfo.baseDir, 'app/web/asset/FZz8NUb3x0.txt')),
'/Ra6UCOeIhV.txt': fs.readFileSync(path.join(appInfo.baseDir, 'app/web/asset/Ra6UCOeIhV.txt'))
};
config.view = {
......
......@@ -1648,9 +1648,9 @@
"integrity": "sha512-uOCUKu5mvX3PWee+7ZFXQSNIR1V5SN2JVE2yANmW9/wQOgpEct291gXGok8VMw0009HlTWB4JATURPwyOP2DFg=="
},
"@qg/cherry-ui": {
"version": "2.20.19",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-2.20.19.tgz",
"integrity": "sha512-lC4VNODjwwwm+NuaiZGlwi+Q9hiQ8KP7zV9Z8ZFDtOX8Mnfrak7BrMgxUxS94zOJM7Yzxks6lyNFc3l2YdPIVg==",
"version": "2.20.20",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcherry-ui/-/cherry-ui-2.20.20.tgz",
"integrity": "sha512-gTSydwNq6lhMgBvYzGMO8cfM+45JN8LNaTAvPobjyUNJ+bY6JFM4kE7ZZeRs9gUsaVRhDOY15U8SUP7GgvxouA==",
"requires": {
"@popperjs/core": "^2.5.4",
"vue-lazyload": "^1.3.3",
......@@ -1658,12 +1658,12 @@
}
},
"@qg/citrus-ui": {
"version": "0.1.5",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.1.5.tgz",
"integrity": "sha512-o6NEwASXYE38LHv0KCvedvJT/GYDDv45toMicsCJJUy34nHRphTRD1bLEkfqSsYlNrGBZ2fu6A9BW0v/o1cCRA==",
"version": "0.1.10",
"resolved": "http://npmprivate.quantgroups.com/@qg%2fcitrus-ui/-/citrus-ui-0.1.10.tgz",
"integrity": "sha512-aK3zz9HBzMZDPfYbYfx5q2cq6Hm4Yj1FjsxXMJDPMPGebBOmgpeIsaEVZQjdRbpcLU9VcqVmS4ByTCE8jXO2Hw==",
"requires": {
"@better-scroll/core": "^2.1.1",
"@qg/cherry-ui": "^2.20.19",
"@qg/cherry-ui": "^2.20.20",
"@qg/js-bridge": "^1.1.11",
"axios": "^0.21.1",
"intersection-observer": "^0.12.0",
......@@ -20870,9 +20870,9 @@
"integrity": "sha1-8z/pz7Urv9UgqhgyO8ZdsRCht2w="
},
"rollup": {
"version": "2.50.1",
"resolved": "http://npmprivate.quantgroups.com/rollup/-/rollup-2.50.1.tgz",
"integrity": "sha512-3MQhSdGpms4xjYrtR3WNHMT+VrWWM4oqUxUC770MmLo1FWFR2pr/OL81HSPC/ifmiu0uMFk0qPGLmjkSMRIESw==",
"version": "2.51.0",
"resolved": "http://npmprivate.quantgroups.com/rollup/-/rollup-2.51.0.tgz",
"integrity": "sha512-ITLt9sScNCBVspSHauw/W49lEZ0vjN8LyCzSNsNaqT67vTss2lYEfOyxltX8hjrhr1l/rQwmZ2wazzEqhZ/fUg==",
"requires": {
"fsevents": "~2.3.1"
},
......@@ -20949,9 +20949,9 @@
}
},
"sa-sdk-javascript": {
"version": "1.17.1",
"resolved": "http://npmprivate.quantgroups.com/sa-sdk-javascript/-/sa-sdk-javascript-1.17.1.tgz",
"integrity": "sha512-UyQtN2Aj9FRS/Q/G75Ue1ig0Fdv1P5pmGu/NUGEBvsVWfXFCgm2rRIqInLq9IVBhXdlQZtNSNfNiKPV1bSE6Ww=="
"version": "1.17.2",
"resolved": "http://npmprivate.quantgroups.com/sa-sdk-javascript/-/sa-sdk-javascript-1.17.2.tgz",
"integrity": "sha512-Nvfy3OTF0x5vTkhW/131u4V+nVaRBz0dL5JjPC4tdR16CXEW8zzii0cj+CR8FeUZ9+DYUJHz8Owb5Dlbix6iOw=="
},
"safe-buffer": {
"version": "5.2.1",
......@@ -24410,9 +24410,9 @@
"dev": true
},
"webpack-sentry-plugin": {
"version": "1.16.0",
"resolved": "http://npmprivate.quantgroups.com/webpack-sentry-plugin/-/webpack-sentry-plugin-1.16.0.tgz",
"integrity": "sha512-sXWPa1iWb+VihBi0JfhiWDrGkyihHKx12fFL1E67NpOsYVFyNwj/sUHGiciEim1CHYzDz0usjbSuY6oIRVct4A==",
"version": "2.0.3",
"resolved": "http://npmprivate.quantgroups.com/webpack-sentry-plugin/-/webpack-sentry-plugin-2.0.3.tgz",
"integrity": "sha512-tRwgC7R+/BM0Sm7rJu0+laWNybFrQsI7uucZxJ4uO/D6x6dPl0loBfGiPS58iWO/pG8lp1JSPjryzGwoTp0FzQ==",
"dev": true,
"requires": {
"es6-promise-pool": "^2.5.0",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment