Commit 012e6455 authored by 郭志伟's avatar 郭志伟

fix(ui): 问题修复

parent c9a5faae
...@@ -5,7 +5,8 @@ import { isWechat } from '@/service/utils.service'; ...@@ -5,7 +5,8 @@ import { isWechat } from '@/service/utils.service';
import initService from '@/service/init.service'; import initService from '@/service/init.service';
export default class App { export default class App {
config: any; config: any;
constructor(config) {
aysnc; constructor(config) {
this.config = config; this.config = config;
} }
...@@ -16,7 +17,6 @@ export default class App { ...@@ -16,7 +17,6 @@ export default class App {
} }
return this.client(); return this.client();
} }
create(initState) { create(initState) {
const { entry, createStore, createRouter } = this.config; const { entry, createStore, createRouter } = this.config;
// console.log('initState', initState); // console.log('initState', initState);
...@@ -38,15 +38,17 @@ export default class App { ...@@ -38,15 +38,17 @@ export default class App {
}; };
} }
async setWxConfig() { setWxConfig() {
if (!isWechat) { return; } if (!isWechat) { return; }
const wx = require('weixin-js-sdk'); api.getWxConfig().then(data => {
const [res] = await api.getWxConfig(); const [res] = data;
wx.config({ const wx = require('weixin-js-sdk');
debug: false, wx.config({
jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'], // 必填,需要使用的JS接口列表 debug: true,
openTagList: ['wx-open-launch-weapp', 'wx-open-launch-app'], jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'], // 必填,需要使用的JS接口列表
...res openTagList: ['wx-open-launch-weapp', 'wx-open-launch-app'],
...res
});
}); });
} }
......
...@@ -8,6 +8,7 @@ export function initSa(router) { ...@@ -8,6 +8,7 @@ export function initSa(router) {
const activityId = window.location.pathname.split('/')?.[2] || ''; const activityId = window.location.pathname.split('/')?.[2] || '';
const vccChannel = getParameterByName('vccChannel') || getParameterByName('registerFrom'); const vccChannel = getParameterByName('vccChannel') || getParameterByName('registerFrom');
const sonVccChannel = getParameterByName('sonVccChannel'); const sonVccChannel = getParameterByName('sonVccChannel');
const tenantId = getParameterByName('tenantId') || config.yxmTenantId;
sa.init({ sa.init({
server_url: config.shenceUrl, server_url: config.shenceUrl,
heatmap: { heatmap: {
...@@ -18,7 +19,7 @@ export function initSa(router) { ...@@ -18,7 +19,7 @@ export function initSa(router) {
}, },
// 判断外层是否有 App 的 SDK ,如果有的话,会往 App 的 SDK 发数据。如果没有,就正常发送数据。 // 判断外层是否有 App 的 SDK ,如果有的话,会往 App 的 SDK 发数据。如果没有,就正常发送数据。
use_app_track: true, use_app_track: true,
show_log: process.env.NODE_ENV !== 'development' && config.test, show_log: config.test,
app_js_bridge: true, app_js_bridge: true,
batch_send: true, batch_send: true,
}); });
...@@ -27,7 +28,8 @@ export function initSa(router) { ...@@ -27,7 +28,8 @@ export function initSa(router) {
platformType: isWxMp ? 'MP' : isApp ? 'APP' : 'H5', platformType: isWxMp ? 'MP' : isApp ? 'APP' : 'H5',
activity_id: activityId, activity_id: activityId,
parent_channel_id: vccChannel || '', parent_channel_id: vccChannel || '',
channel_id: sonVccChannel || '' channel_id: sonVccChannel || '',
tenantId,
}); });
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