接入博睿和神策平台;均使用本地导入
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
@{
|
||||
@inject Microsoft.Extensions.Configuration.IConfiguration Configuration
|
||||
@{
|
||||
Layout = null;
|
||||
|
||||
var bonreeManageProd = Configuration["Tracking:Bonree:Manage:ProdAppId"] ?? "";
|
||||
var bonreeTradeProd = Configuration["Tracking:Bonree:Trade:ProdAppId"] ?? "";
|
||||
var bonreeManageTest = Configuration["Tracking:Bonree:Manage:TestAppId"] ?? "";
|
||||
var bonreeTradeTest = Configuration["Tracking:Bonree:Trade:TestAppId"] ?? "";
|
||||
|
||||
var bonreeUploadProdHttp = Configuration["Tracking:Bonree:Upload:ProdHttp"] ?? "http://apm.glms.com.cn/upload/RUM/upload";
|
||||
var bonreeUploadProdHttps = Configuration["Tracking:Bonree:Upload:ProdHttps"] ?? "https://apm.glms.com.cn/upload/RUM/upload";
|
||||
var bonreeUploadTestHttp = Configuration["Tracking:Bonree:Upload:TestHttp"] ?? "http://test-apmweb.mszq.com:58896/RUM/upload";
|
||||
var bonreeUploadTestHttps = Configuration["Tracking:Bonree:Upload:TestHttps"] ?? "https://test-apmweb.mszq.com:58896/RUM/upload";
|
||||
|
||||
}
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-cn">
|
||||
@@ -19,17 +31,25 @@
|
||||
<script src="~/statics/bundles/jquery.js?v=@(HtmlUtil.JsVersion)"></script>
|
||||
|
||||
<script type="module">
|
||||
import { BonreeStart } from '/BonreeSDK_JS_2.5.1_min.esm';
|
||||
import { BonreeStart } from '/BonreeSDK_JS_2.5.1_min.esm.js';
|
||||
|
||||
(function () {
|
||||
const isProd = window.location.hostname.indexOf("mszq.com") > -1 && window.location.hostname.indexOf("test") === -1;
|
||||
const isTrader = window.location.hostname.indexOf("trade") > -1 || window.location.pathname.toLowerCase().indexOf("trade") > -1;
|
||||
|
||||
const manageAppIdProd = "@bonreeManageProd";
|
||||
const tradeAppIdProd = "@bonreeTradeProd";
|
||||
const manageAppIdTest = "@bonreeManageTest";
|
||||
const tradeAppIdTest = "@bonreeTradeTest";
|
||||
|
||||
const appId = isProd
|
||||
? (isTrader ? tradeAppIdProd : manageAppIdProd)
|
||||
: (isTrader ? tradeAppIdTest : manageAppIdTest);
|
||||
|
||||
const config = {
|
||||
// 管理端 appId(生产:9efad93bf1a640079c8e5a724a6b5cdf)
|
||||
// 如有测试 appId,请替换下方非生产值。
|
||||
appId: isProd ? "9efad93bf1a640079c8e5a724a6b5cdf" : "9efad93bf1a640079c8e5a724a6b5cdf",
|
||||
uploadAddrHttp: isProd ? "http://apm.glms.com.cn/upload/RUM/upload" : "http://test-apmweb.mszq.com:58896/RUM/upload",
|
||||
uploadAddrHttps: isProd ? "https://apm.glms.com.cn/upload/RUM/upload" : "https://test-apmweb.mszq.com:58896/RUM/upload",
|
||||
appId: appId,
|
||||
uploadAddrHttp: isProd ? "@bonreeUploadProdHttp" : "@bonreeUploadTestHttp",
|
||||
uploadAddrHttps: isProd ? "@bonreeUploadProdHttps" : "@bonreeUploadTestHttps",
|
||||
useXHR: true,
|
||||
cycleTime: 60,
|
||||
maxSize: 60,
|
||||
@@ -37,6 +57,10 @@
|
||||
};
|
||||
|
||||
try {
|
||||
if (!config.appId) {
|
||||
console && console.warn && console.warn('Bonree appId missing, skip init');
|
||||
return;
|
||||
}
|
||||
BonreeStart(config);
|
||||
window.bonreeApplyUser = function (userId, userName) {
|
||||
if (!userId || !window.bonreeJsBridge) return;
|
||||
@@ -51,13 +75,39 @@
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script src="https://cdn.jsdelivr.net/npm/sa-sdk-javascript@1.26.13/sensorsdata.min.js"></script>
|
||||
<script src="~/sensorsdata.min.js?v=@(HtmlUtil.JsVersion)"></script>
|
||||
<script>
|
||||
// SDK 默认暴露 window.sensorsDataAnalytic201505,这里做一次别名兼容,确保调试台可直接使用 sensors
|
||||
(function ensureSensorsAlias() {
|
||||
var setAlias = function () {
|
||||
if (window.sensors) { return true; }
|
||||
if (window.sensorsDataAnalytic201505) {
|
||||
window.sensors = window.sensorsDataAnalytic201505;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
if (setAlias()) { return; }
|
||||
|
||||
var aliasTimer = setInterval(function () {
|
||||
if (setAlias()) {
|
||||
clearInterval(aliasTimer);
|
||||
}
|
||||
}, 50);
|
||||
|
||||
setTimeout(function () {
|
||||
clearInterval(aliasTimer);
|
||||
}, 5000);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
if (!window.sensors) { return; }
|
||||
|
||||
var isProd = window.location.hostname.indexOf("mszq.com") > -1 && window.location.hostname.indexOf("test") === -1;
|
||||
var isTrader = window.location.hostname.indexOf("trade") > -1 || window.location.pathname.toLowerCase().indexOf("trade") > -1;
|
||||
var serverUrl = isProd ? "https://scdata.mszq.com/sa?project=default" : "https://scdata-test.mszq.com/sa?project=default";
|
||||
|
||||
sensors.init({
|
||||
@@ -80,7 +130,7 @@
|
||||
sensors.quick('autoTrack');
|
||||
|
||||
sensors.registerPage({
|
||||
product_type: 'onederiv',
|
||||
product_type: isTrader ? 'onederiv-trader' : 'onederiv',
|
||||
systemVersion: '',
|
||||
techStack: ''
|
||||
});
|
||||
|
||||
@@ -86,6 +86,24 @@
|
||||
"auth_url": "http://192.168.2.96:10117/sso/login", //SSO授权地址
|
||||
"callback_url": "http://localhost:49462/Account/Callback", //回调处理地址
|
||||
"get_user_url": "http://192.168.2.96:10117/sso/getSsoUser" //获取用户信息接口地址
|
||||
},
|
||||
"Tracking": {
|
||||
"Bonree": {
|
||||
"Manage": {
|
||||
"ProdAppId": "9efad93bf1a640079c8e5a724a6b5cdf",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Trade": {
|
||||
"ProdAppId": "3d99c953b49e478e9d67ea641b8565aa",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Upload": {
|
||||
"ProdHttp": "http://apm.glms.com.cn/upload/RUM/upload",
|
||||
"ProdHttps": "https://apm.glms.com.cn/upload/RUM/upload",
|
||||
"TestHttp": "http://test-apmweb.mszq.com:58896/RUM/upload",
|
||||
"TestHttps": "https://test-apmweb.mszq.com:58896/RUM/upload"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,5 +4,23 @@
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"Tracking": {
|
||||
"Bonree": {
|
||||
"Manage": {
|
||||
"ProdAppId": "9efad93bf1a640079c8e5a724a6b5cdf",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Trade": {
|
||||
"ProdAppId": "3d99c953b49e478e9d67ea641b8565aa",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Upload": {
|
||||
"ProdHttp": "http://apm.glms.com.cn/upload/RUM/upload",
|
||||
"ProdHttps": "https://apm.glms.com.cn/upload/RUM/upload",
|
||||
"TestHttp": "http://test-apmweb.mszq.com:58896/RUM/upload",
|
||||
"TestHttps": "https://test-apmweb.mszq.com:58896/RUM/upload"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,5 +81,23 @@
|
||||
"ObjectClass": "ZSZQ_CWYSPJYQRSDZWF", //OA文件类别
|
||||
"Urgent": 1, //紧急程度,1一般 2紧急 3加急
|
||||
"Issend": 0 //流程是否自动发送,0不发送,1自动发送下一步
|
||||
},
|
||||
"Tracking": {
|
||||
"Bonree": {
|
||||
"Manage": {
|
||||
"ProdAppId": "9efad93bf1a640079c8e5a724a6b5cdf",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Trade": {
|
||||
"ProdAppId": "3d99c953b49e478e9d67ea641b8565aa",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Upload": {
|
||||
"ProdHttp": "http://apm.glms.com.cn/upload/RUM/upload",
|
||||
"ProdHttps": "https://apm.glms.com.cn/upload/RUM/upload",
|
||||
"TestHttp": "http://test-apmweb.mszq.com:58896/RUM/upload",
|
||||
"TestHttps": "https://test-apmweb.mszq.com:58896/RUM/upload"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,5 +82,23 @@
|
||||
"ObjectClass": "ZSZQ_CWYSPJYQRSDZWF", //OA文件类别
|
||||
"Urgent": 1, //紧急程度,1一般 2紧急 3加急
|
||||
"Issend": 0 //流程是否自动发送,0不发送,1自动发送下一步
|
||||
},
|
||||
"Tracking": {
|
||||
"Bonree": {
|
||||
"Manage": {
|
||||
"ProdAppId": "9efad93bf1a640079c8e5a724a6b5cdf",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Trade": {
|
||||
"ProdAppId": "3d99c953b49e478e9d67ea641b8565aa",
|
||||
"TestAppId": ""
|
||||
},
|
||||
"Upload": {
|
||||
"ProdHttp": "http://apm.glms.com.cn/upload/RUM/upload",
|
||||
"ProdHttps": "https://apm.glms.com.cn/upload/RUM/upload",
|
||||
"TestHttp": "http://test-apmweb.mszq.com:58896/RUM/upload",
|
||||
"TestHttps": "https://test-apmweb.mszq.com:58896/RUM/upload"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+6
File diff suppressed because one or more lines are too long
Generated
+18
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "zszq-trs",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"sa-sdk-javascript": "^1.24.14"
|
||||
}
|
||||
},
|
||||
"node_modules/sa-sdk-javascript": {
|
||||
"version": "1.24.14",
|
||||
"resolved": "https://registry.npmmirror.com/sa-sdk-javascript/-/sa-sdk-javascript-1.24.14.tgz",
|
||||
"integrity": "sha512-Dsz2lB/pchh7gxxHoI3SmtKOf4WT5IhfM2zIXIaY+xG0IPytgeHkZjlGpHUqNFVZFg2QOJFvjQevoodquu8tvw==",
|
||||
"license": "Apache-2.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"sa-sdk-javascript": "^1.24.14"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user