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') ...@@ -19,11 +19,11 @@ if (process.env.SENTRY_ENV !== 'test' && process.env.NODE_ENV === 'production')
.install(); .install();
} }
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))+.*$/; const isSafari = /^.*((iPhone)|(iPad)|(Safari))+.*$/;
......
...@@ -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(() => {
......
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