Merge branch 'glms/feature/1.4.2' of http://git.yiliantech.com/gitlab/otc-dev/zszq-trs into glms/feature/1.4.2
This commit is contained in:
@@ -18,10 +18,9 @@
|
||||
@RenderSection("CSS", false)
|
||||
|
||||
<script src="~/statics/bundles/jquery.js?v=@(HtmlUtil.JsVersion)"></script>
|
||||
<script src="/BonreeSDK_JS_2.5.1_min.esm.js" type="module"></script>
|
||||
|
||||
<script>
|
||||
(function () {
|
||||
<script type="module">
|
||||
(async function () {
|
||||
const bonreeConfig = {
|
||||
appId: "@Configuration["Tracking:bonree:appId"]",
|
||||
uploadAddrHttp: "@Configuration["Tracking:bonree:uploadAddrHttp"]",
|
||||
@@ -43,7 +42,13 @@
|
||||
console.warn('Bonree appId or uploadAddrHttp or uploadAddrHttps missing, skip init');
|
||||
return;
|
||||
}
|
||||
window.BonreeAgent.BonreeStart(config);
|
||||
const BonreeModule = await import('/BonreeSDK_JS_2.5.1_min.esm.js');
|
||||
const BonreeAgent = BonreeModule.BonreeAgent || window.BonreeAgent;
|
||||
if (!BonreeAgent || !BonreeAgent.BonreeStart) {
|
||||
console.warn('BonreeAgent or BonreeAgent.BonreeStart missing, skip init');
|
||||
return;
|
||||
}
|
||||
BonreeAgent.BonreeStart(config);
|
||||
window.bonreeApplyUser = function (userId, userName) {
|
||||
if (!userId || !window.bonreeJsBridge) return;
|
||||
window.bonreeJsBridge.setUserID(userId);
|
||||
@@ -52,7 +57,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
if ('@CurUser?.UserId') {
|
||||
if ('@CurUser.OaAccount') {
|
||||
window.bonreeApplyUser('@CurUser.OaAccount', '@CurUser.UserName');
|
||||
}
|
||||
} catch (e) {
|
||||
@@ -108,16 +113,16 @@
|
||||
show_log: false
|
||||
});
|
||||
|
||||
sensors.quick('autoTrack');
|
||||
|
||||
sensors.registerPage({
|
||||
platform_type: sensorsConfig._platformType || 'onederiv',
|
||||
systemVersion: sensorsConfig._systemVersion,
|
||||
techStack: sensorsConfig._techStack
|
||||
});
|
||||
|
||||
if ('@CurUser?.UserId' && sensors.login) {
|
||||
sensors.login('@CurUser.UserId');
|
||||
sensors.quick('autoTrack');
|
||||
|
||||
if ('@CurUser?.OaAccount' && sensors.login) {
|
||||
sensors.login('@CurUser.OaAccount');
|
||||
sensors.setProfile({ userId: '@CurUser.OaAccount', name: '@CurUser.UserName' });
|
||||
}
|
||||
|
||||
@@ -125,7 +130,7 @@
|
||||
(function () {
|
||||
try {
|
||||
var diag = {
|
||||
uid: '@CurUser?.UserId' || 'NULL',
|
||||
uid: '@CurUser?.OaAccount' || 'NULL',
|
||||
platform: sensorsConfig._platformType || 'onederiv',
|
||||
ua: (navigator.userAgent || '').substring(0, 50) || 'NULL',
|
||||
url: location.href
|
||||
|
||||
Reference in New Issue
Block a user