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

fix: 移除vconsole, sa全局添加渠道号

parent 092d2126
......@@ -19,11 +19,11 @@ if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production')
.install();
}
if (EASY_ENV_IS_BROWSER && process.env.SENTRY_ENV === 'test' || process.env.NODE_ENV !== 'production') {
// ! 上线后务必取掉;
const vConsole = require('vconsole');
new vConsole();
}
// if (EASY_ENV_IS_BROWSER && process.env.SENTRY_ENV === 'test' || process.env.NODE_ENV !== 'production') {
// // ! 上线后务必取掉;
// const vConsole = require('vconsole');
// new vConsole();
// }
if (EASY_ENV_IS_BROWSER) {
const isSafari = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
......
......@@ -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(() => {
......
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