wotokol-edm 1.1.71 → 1.1.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/wotokol-edm.common.js +175 -169
- package/wotokol-edm.common.js.gz +0 -0
- package/wotokol-edm.umd.js +175 -169
- package/wotokol-edm.umd.js.gz +0 -0
- package/wotokol-edm.umd.min.js +20 -20
- package/wotokol-edm.umd.min.js.gz +0 -0
package/package.json
CHANGED
package/wotokol-edm.common.js
CHANGED
|
@@ -91142,174 +91142,6 @@ var lib = __webpack_require__(6153);
|
|
|
91142
91142
|
|
|
91143
91143
|
/* harmony default export */ var skywalking_client_js = (ClientMonitor);
|
|
91144
91144
|
|
|
91145
|
-
;// ./src/utils/skyWalking.js
|
|
91146
|
-
|
|
91147
|
-
|
|
91148
|
-
//注册skywalking
|
|
91149
|
-
if (({"NODE_ENV":"production","BASE_URL":"/"}).VUE_APP_ENV !== 'dev') {
|
|
91150
|
-
skywalking_client_js.register({
|
|
91151
|
-
service: 'wotohubService',
|
|
91152
|
-
//应用名称
|
|
91153
|
-
serviceVersion: '10.1.0',
|
|
91154
|
-
//应用版本号
|
|
91155
|
-
traceSDKInternal: true,
|
|
91156
|
-
//追踪sdk
|
|
91157
|
-
pagePath: location.href,
|
|
91158
|
-
//当前路由地址
|
|
91159
|
-
useFmp: true,
|
|
91160
|
-
//use first meaningful paint
|
|
91161
|
-
collector: location.origin,
|
|
91162
|
-
// report serve
|
|
91163
|
-
jsErrors: true,
|
|
91164
|
-
// vue, js and promise errors
|
|
91165
|
-
apiErrors: true,
|
|
91166
|
-
resourceErrors: true,
|
|
91167
|
-
autoTracePerf: true,
|
|
91168
|
-
// trace performance detail
|
|
91169
|
-
enableSPA: true,
|
|
91170
|
-
detailMode: true,
|
|
91171
|
-
noTraceOrigins: [],
|
|
91172
|
-
vue: (external_commonjs_vue_commonjs2_vue_root_Vue_default()) //vue实例
|
|
91173
|
-
});
|
|
91174
|
-
}
|
|
91175
|
-
//上报错误信息方法
|
|
91176
|
-
function reportFrameErrors(error) {
|
|
91177
|
-
if (({"NODE_ENV":"production","BASE_URL":"/"}).VUE_APP_ENV !== 'dev') {
|
|
91178
|
-
skywalking_client_js.reportFrameErrors({
|
|
91179
|
-
service: 'wotohubService',
|
|
91180
|
-
//应用名称
|
|
91181
|
-
serviceVersion: '10.1.0',
|
|
91182
|
-
//应用版本号
|
|
91183
|
-
traceSDKInternal: true,
|
|
91184
|
-
//追踪sdk
|
|
91185
|
-
pagePath: location.href,
|
|
91186
|
-
//当前路由地址
|
|
91187
|
-
useFmp: true,
|
|
91188
|
-
//use first meaningful paint
|
|
91189
|
-
collector: location.origin,
|
|
91190
|
-
// report serve
|
|
91191
|
-
jsErrors: true,
|
|
91192
|
-
// vue, js and promise errors
|
|
91193
|
-
apiErrors: true,
|
|
91194
|
-
resourceErrors: true,
|
|
91195
|
-
autoTracePerf: true,
|
|
91196
|
-
// trace performance detail
|
|
91197
|
-
enableSPA: true,
|
|
91198
|
-
detailMode: true,
|
|
91199
|
-
noTraceOrigins: [],
|
|
91200
|
-
traceTimeInterval: 60000,
|
|
91201
|
-
// 1min
|
|
91202
|
-
vue: (external_commonjs_vue_commonjs2_vue_root_Vue_default()) //vue实例
|
|
91203
|
-
}, error);
|
|
91204
|
-
}
|
|
91205
|
-
}
|
|
91206
|
-
|
|
91207
|
-
//上报错误信息方法
|
|
91208
|
-
function setPerformance() {
|
|
91209
|
-
if (({"NODE_ENV":"production","BASE_URL":"/"}).VUE_APP_ENV !== 'dev') {
|
|
91210
|
-
//路由上报到skywalking
|
|
91211
|
-
ClientMonitor.setPerformance({
|
|
91212
|
-
service: 'wotohubService',
|
|
91213
|
-
//应用名称
|
|
91214
|
-
serviceVersion: '10.1.0',
|
|
91215
|
-
//应用版本号
|
|
91216
|
-
traceSDKInternal: true,
|
|
91217
|
-
//追踪sdk
|
|
91218
|
-
pagePath: location.href,
|
|
91219
|
-
//当前路由地址
|
|
91220
|
-
useFmp: true,
|
|
91221
|
-
//use first meaningful paint
|
|
91222
|
-
collector: location.origin,
|
|
91223
|
-
// report serve
|
|
91224
|
-
jsErrors: true,
|
|
91225
|
-
// vue, js and promise errors
|
|
91226
|
-
apiErrors: true,
|
|
91227
|
-
resourceErrors: true,
|
|
91228
|
-
autoTracePerf: true,
|
|
91229
|
-
// trace performance detail
|
|
91230
|
-
enableSPA: true,
|
|
91231
|
-
detailMode: true,
|
|
91232
|
-
noTraceOrigins: [],
|
|
91233
|
-
traceTimeInterval: 60000,
|
|
91234
|
-
// 1min
|
|
91235
|
-
vue: Vue //vue实例
|
|
91236
|
-
});
|
|
91237
|
-
}
|
|
91238
|
-
}
|
|
91239
|
-
;// ./src/utils/request-login.js
|
|
91240
|
-
|
|
91241
|
-
|
|
91242
|
-
|
|
91243
|
-
|
|
91244
|
-
|
|
91245
|
-
const service = lib_axios.create({
|
|
91246
|
-
baseURL: 'https://dss-apis.kuku.info'
|
|
91247
|
-
});
|
|
91248
|
-
service.interceptors.request.use(config => {
|
|
91249
|
-
// 过滤参数中的空值
|
|
91250
|
-
if (config.data) {
|
|
91251
|
-
for (const key in config.data) {
|
|
91252
|
-
if (isEmpty(config.data[key])) {
|
|
91253
|
-
delete config.data[key];
|
|
91254
|
-
}
|
|
91255
|
-
}
|
|
91256
|
-
}
|
|
91257
|
-
if (config.params) {
|
|
91258
|
-
for (const key in config.params) {
|
|
91259
|
-
if (isEmpty(config.params[key])) {
|
|
91260
|
-
delete config.params[key];
|
|
91261
|
-
}
|
|
91262
|
-
}
|
|
91263
|
-
}
|
|
91264
|
-
// 验证有无token
|
|
91265
|
-
if (store.getters.token) {
|
|
91266
|
-
config.headers['Authorization'] = 'Bearer ' + getToken();
|
|
91267
|
-
}
|
|
91268
|
-
return config;
|
|
91269
|
-
}, error => {
|
|
91270
|
-
return Promise.reject(error);
|
|
91271
|
-
});
|
|
91272
|
-
service.interceptors.response.use(response => {
|
|
91273
|
-
const res = response.data;
|
|
91274
|
-
try {
|
|
91275
|
-
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
91276
|
-
// 捕获code不为0的接口异常
|
|
91277
|
-
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
91278
|
-
const userId = userInfo.user_id ? userInfo.user_id + '_' : '';
|
|
91279
|
-
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
91280
|
-
}
|
|
91281
|
-
} catch (error) {
|
|
91282
|
-
// 处理错误的代码,例如打印错误信息
|
|
91283
|
-
console.error("An error occurred:", error);
|
|
91284
|
-
reportFrameErrors(error);
|
|
91285
|
-
}
|
|
91286
|
-
return Promise.resolve(res);
|
|
91287
|
-
}, error => {
|
|
91288
|
-
if (error.response.data.code === 100003) {
|
|
91289
|
-
(0,element_ui_common.Message)({
|
|
91290
|
-
message: error.response.data.message,
|
|
91291
|
-
type: 'error',
|
|
91292
|
-
duration: 5 * 1000
|
|
91293
|
-
});
|
|
91294
|
-
} else {
|
|
91295
|
-
(0,element_ui_common.Message)({
|
|
91296
|
-
message: error.response.data.message ? error.response.data.message : '网络错误,请稍后再试~',
|
|
91297
|
-
type: 'error',
|
|
91298
|
-
duration: 5 * 1000
|
|
91299
|
-
});
|
|
91300
|
-
}
|
|
91301
|
-
return Promise.reject(error);
|
|
91302
|
-
});
|
|
91303
|
-
/* harmony default export */ var request_login = (service);
|
|
91304
|
-
|
|
91305
|
-
/**
|
|
91306
|
-
* 非空判断
|
|
91307
|
-
* @param {*} obj
|
|
91308
|
-
* @returns
|
|
91309
|
-
*/
|
|
91310
|
-
function isEmpty(obj) {
|
|
91311
|
-
return typeof obj === 'undefined' || obj === null || obj === '';
|
|
91312
|
-
}
|
|
91313
91145
|
;// ./node_modules/jsencrypt/lib/lib/jsbn/util.js
|
|
91314
91146
|
var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
91315
91147
|
function int2char(n) {
|
|
@@ -97381,7 +97213,7 @@ function withUUID(app) {
|
|
|
97381
97213
|
* @param {*} obj
|
|
97382
97214
|
* @returns
|
|
97383
97215
|
*/
|
|
97384
|
-
function
|
|
97216
|
+
function isEmpty(obj) {
|
|
97385
97217
|
return typeof obj === 'undefined' || obj === null || obj === '';
|
|
97386
97218
|
}
|
|
97387
97219
|
|
|
@@ -97488,6 +97320,7 @@ function replaceNullWithEmptyMutate(obj) {
|
|
|
97488
97320
|
}
|
|
97489
97321
|
function initJavaService(env) {
|
|
97490
97322
|
defaultEnv = env;
|
|
97323
|
+
localStorage.setItem('EDMDefaultEnv', env);
|
|
97491
97324
|
if (env === "dev" || env === "development" || env === "test") {
|
|
97492
97325
|
baseUrl = "https://k8s-api.wotohub.com"; // https://pre-api.kuku.info
|
|
97493
97326
|
} else if (env === "pre") {
|
|
@@ -97679,6 +97512,177 @@ const uploadSingleFile = (url, data, fn) => {
|
|
|
97679
97512
|
|
|
97680
97513
|
// 返回结果同上
|
|
97681
97514
|
|
|
97515
|
+
;// ./src/utils/skyWalking.js
|
|
97516
|
+
|
|
97517
|
+
|
|
97518
|
+
|
|
97519
|
+
const currentEnv = localStorage.getItem("EDMDefaultEnv");
|
|
97520
|
+
|
|
97521
|
+
//注册skywalking
|
|
97522
|
+
if (currentEnv !== 'dev') {
|
|
97523
|
+
skywalking_client_js.register({
|
|
97524
|
+
service: 'wotohubService',
|
|
97525
|
+
//应用名称
|
|
97526
|
+
serviceVersion: '10.1.0',
|
|
97527
|
+
//应用版本号
|
|
97528
|
+
traceSDKInternal: true,
|
|
97529
|
+
//追踪sdk
|
|
97530
|
+
pagePath: location.href,
|
|
97531
|
+
//当前路由地址
|
|
97532
|
+
useFmp: true,
|
|
97533
|
+
//use first meaningful paint
|
|
97534
|
+
collector: location.origin,
|
|
97535
|
+
// report serve
|
|
97536
|
+
jsErrors: true,
|
|
97537
|
+
// vue, js and promise errors
|
|
97538
|
+
apiErrors: true,
|
|
97539
|
+
resourceErrors: true,
|
|
97540
|
+
autoTracePerf: true,
|
|
97541
|
+
// trace performance detail
|
|
97542
|
+
enableSPA: true,
|
|
97543
|
+
detailMode: true,
|
|
97544
|
+
noTraceOrigins: [],
|
|
97545
|
+
vue: (external_commonjs_vue_commonjs2_vue_root_Vue_default()) //vue实例
|
|
97546
|
+
});
|
|
97547
|
+
}
|
|
97548
|
+
//上报错误信息方法
|
|
97549
|
+
function reportFrameErrors(error) {
|
|
97550
|
+
if (currentEnv !== 'dev') {
|
|
97551
|
+
skywalking_client_js.reportFrameErrors({
|
|
97552
|
+
service: 'wotohubService',
|
|
97553
|
+
//应用名称
|
|
97554
|
+
serviceVersion: '10.1.0',
|
|
97555
|
+
//应用版本号
|
|
97556
|
+
traceSDKInternal: true,
|
|
97557
|
+
//追踪sdk
|
|
97558
|
+
pagePath: location.href,
|
|
97559
|
+
//当前路由地址
|
|
97560
|
+
useFmp: true,
|
|
97561
|
+
//use first meaningful paint
|
|
97562
|
+
collector: location.origin,
|
|
97563
|
+
// report serve
|
|
97564
|
+
jsErrors: true,
|
|
97565
|
+
// vue, js and promise errors
|
|
97566
|
+
apiErrors: true,
|
|
97567
|
+
resourceErrors: true,
|
|
97568
|
+
autoTracePerf: true,
|
|
97569
|
+
// trace performance detail
|
|
97570
|
+
enableSPA: true,
|
|
97571
|
+
detailMode: true,
|
|
97572
|
+
noTraceOrigins: [],
|
|
97573
|
+
traceTimeInterval: 60000,
|
|
97574
|
+
// 1min
|
|
97575
|
+
vue: (external_commonjs_vue_commonjs2_vue_root_Vue_default()) //vue实例
|
|
97576
|
+
}, error);
|
|
97577
|
+
}
|
|
97578
|
+
}
|
|
97579
|
+
|
|
97580
|
+
//上报错误信息方法
|
|
97581
|
+
function setPerformance() {
|
|
97582
|
+
if (currentEnv !== 'dev') {
|
|
97583
|
+
//路由上报到skywalking
|
|
97584
|
+
ClientMonitor.setPerformance({
|
|
97585
|
+
service: 'wotohubService',
|
|
97586
|
+
//应用名称
|
|
97587
|
+
serviceVersion: '10.1.0',
|
|
97588
|
+
//应用版本号
|
|
97589
|
+
traceSDKInternal: true,
|
|
97590
|
+
//追踪sdk
|
|
97591
|
+
pagePath: location.href,
|
|
97592
|
+
//当前路由地址
|
|
97593
|
+
useFmp: true,
|
|
97594
|
+
//use first meaningful paint
|
|
97595
|
+
collector: location.origin,
|
|
97596
|
+
// report serve
|
|
97597
|
+
jsErrors: true,
|
|
97598
|
+
// vue, js and promise errors
|
|
97599
|
+
apiErrors: true,
|
|
97600
|
+
resourceErrors: true,
|
|
97601
|
+
autoTracePerf: true,
|
|
97602
|
+
// trace performance detail
|
|
97603
|
+
enableSPA: true,
|
|
97604
|
+
detailMode: true,
|
|
97605
|
+
noTraceOrigins: [],
|
|
97606
|
+
traceTimeInterval: 60000,
|
|
97607
|
+
// 1min
|
|
97608
|
+
vue: Vue //vue实例
|
|
97609
|
+
});
|
|
97610
|
+
}
|
|
97611
|
+
}
|
|
97612
|
+
;// ./src/utils/request-login.js
|
|
97613
|
+
|
|
97614
|
+
|
|
97615
|
+
|
|
97616
|
+
|
|
97617
|
+
|
|
97618
|
+
const service = lib_axios.create({
|
|
97619
|
+
baseURL: 'https://dss-apis.kuku.info'
|
|
97620
|
+
});
|
|
97621
|
+
service.interceptors.request.use(config => {
|
|
97622
|
+
// 过滤参数中的空值
|
|
97623
|
+
if (config.data) {
|
|
97624
|
+
for (const key in config.data) {
|
|
97625
|
+
if (request_login_isEmpty(config.data[key])) {
|
|
97626
|
+
delete config.data[key];
|
|
97627
|
+
}
|
|
97628
|
+
}
|
|
97629
|
+
}
|
|
97630
|
+
if (config.params) {
|
|
97631
|
+
for (const key in config.params) {
|
|
97632
|
+
if (request_login_isEmpty(config.params[key])) {
|
|
97633
|
+
delete config.params[key];
|
|
97634
|
+
}
|
|
97635
|
+
}
|
|
97636
|
+
}
|
|
97637
|
+
// 验证有无token
|
|
97638
|
+
if (store.getters.token) {
|
|
97639
|
+
config.headers['Authorization'] = 'Bearer ' + getToken();
|
|
97640
|
+
}
|
|
97641
|
+
return config;
|
|
97642
|
+
}, error => {
|
|
97643
|
+
return Promise.reject(error);
|
|
97644
|
+
});
|
|
97645
|
+
service.interceptors.response.use(response => {
|
|
97646
|
+
const res = response.data;
|
|
97647
|
+
try {
|
|
97648
|
+
if (typeof response.data === 'object' && response.data.hasOwnProperty('code') && response.data.code != 0) {
|
|
97649
|
+
// 捕获code不为0的接口异常
|
|
97650
|
+
const userInfo = JSON.parse(localStorage.getItem("user_info") || '{}');
|
|
97651
|
+
const userId = userInfo.user_id ? userInfo.user_id + '_' : '';
|
|
97652
|
+
throw new Error(userId + response.request.responseURL + response.request.responseText || response.data.code);
|
|
97653
|
+
}
|
|
97654
|
+
} catch (error) {
|
|
97655
|
+
// 处理错误的代码,例如打印错误信息
|
|
97656
|
+
console.error("An error occurred:", error);
|
|
97657
|
+
reportFrameErrors(error);
|
|
97658
|
+
}
|
|
97659
|
+
return Promise.resolve(res);
|
|
97660
|
+
}, error => {
|
|
97661
|
+
if (error.response.data.code === 100003) {
|
|
97662
|
+
(0,element_ui_common.Message)({
|
|
97663
|
+
message: error.response.data.message,
|
|
97664
|
+
type: 'error',
|
|
97665
|
+
duration: 5 * 1000
|
|
97666
|
+
});
|
|
97667
|
+
} else {
|
|
97668
|
+
(0,element_ui_common.Message)({
|
|
97669
|
+
message: error.response.data.message ? error.response.data.message : '网络错误,请稍后再试~',
|
|
97670
|
+
type: 'error',
|
|
97671
|
+
duration: 5 * 1000
|
|
97672
|
+
});
|
|
97673
|
+
}
|
|
97674
|
+
return Promise.reject(error);
|
|
97675
|
+
});
|
|
97676
|
+
/* harmony default export */ var request_login = (service);
|
|
97677
|
+
|
|
97678
|
+
/**
|
|
97679
|
+
* 非空判断
|
|
97680
|
+
* @param {*} obj
|
|
97681
|
+
* @returns
|
|
97682
|
+
*/
|
|
97683
|
+
function request_login_isEmpty(obj) {
|
|
97684
|
+
return typeof obj === 'undefined' || obj === null || obj === '';
|
|
97685
|
+
}
|
|
97682
97686
|
;// ./src/api/test.js
|
|
97683
97687
|
/**
|
|
97684
97688
|
* 测试api
|
|
@@ -132281,6 +132285,7 @@ let baseHubUrl = '';
|
|
|
132281
132285
|
let request_test_defaultEnv = '';
|
|
132282
132286
|
function initHubService(env) {
|
|
132283
132287
|
request_test_defaultEnv = env;
|
|
132288
|
+
localStorage.setItem('EDMDefaultEnv', env);
|
|
132284
132289
|
if (env === 'dev' || env === 'development' || env === 'test') {
|
|
132285
132290
|
baseHubUrl = 'https://api.kuku.info';
|
|
132286
132291
|
} else if (env === 'pre') {
|
|
@@ -132400,6 +132405,7 @@ let baseDssUrl = '';
|
|
|
132400
132405
|
let request_dss_defaultEnv = '';
|
|
132401
132406
|
function initDssService(env) {
|
|
132402
132407
|
request_dss_defaultEnv = env;
|
|
132408
|
+
localStorage.setItem('EDMDefaultEnv', env);
|
|
132403
132409
|
if (env === 'dev' || env === 'development' || env === 'test') {
|
|
132404
132410
|
baseDssUrl = 'https://dss-apis.kuku.info';
|
|
132405
132411
|
} else if (env === 'pre') {
|
package/wotokol-edm.common.js.gz
CHANGED
|
Binary file
|