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

fix(ui): 问题修复

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