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