uni-oaview 1.0.18 → 1.0.19
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/dist/index.umd.js +54 -0
- package/package.json +2 -2
- package/dist/index.esm.js +0 -44
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('uniapp-log-sdk')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'uniapp-log-sdk'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["UNI-OAVIEW"] = {}, global.uniappLogSdk));
|
|
5
|
+
})(this, (function (exports, uniappLogSdk) { 'use strict';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 上报APP启动小程序的时候的入参
|
|
9
|
+
* @param params
|
|
10
|
+
*/
|
|
11
|
+
function sendLaunchAppParamsLog(params) {
|
|
12
|
+
var _a;
|
|
13
|
+
// #ifndef H5
|
|
14
|
+
try {
|
|
15
|
+
var outputData = JSON.parse(JSON.stringify((_a = params === null || params === void 0 ? void 0 : params.referrerInfo) === null || _a === void 0 ? void 0 : _a.extraData));
|
|
16
|
+
outputData === null || outputData === void 0 ? true : delete outputData.token;
|
|
17
|
+
uniappLogSdk.reportLog(outputData, '小程序启动入参');
|
|
18
|
+
} catch (error) {
|
|
19
|
+
console.log(error);
|
|
20
|
+
}
|
|
21
|
+
// #endif
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 防抖函数
|
|
26
|
+
* @param callback
|
|
27
|
+
* @param time
|
|
28
|
+
* @returns
|
|
29
|
+
*/
|
|
30
|
+
function createDebounceFn(callback, time) {
|
|
31
|
+
var timer = null;
|
|
32
|
+
return function () {
|
|
33
|
+
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
|
+
params[_key] = arguments[_key];
|
|
35
|
+
}
|
|
36
|
+
clearTimeout(timer);
|
|
37
|
+
timer = setTimeout(function () {
|
|
38
|
+
callback.apply(void 0, params);
|
|
39
|
+
}, time);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
var install = function install(Vue) {};
|
|
44
|
+
var index = {
|
|
45
|
+
install: install
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
exports.createDebounceFn = createDebounceFn;
|
|
49
|
+
exports["default"] = index;
|
|
50
|
+
exports.sendLaunchAppParamsLog = sendLaunchAppParamsLog;
|
|
51
|
+
|
|
52
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
53
|
+
|
|
54
|
+
}));
|
package/package.json
CHANGED
package/dist/index.esm.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { reportLog } from 'uniapp-log-sdk';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* 上报APP启动小程序的时候的入参
|
|
5
|
-
* @param params
|
|
6
|
-
*/
|
|
7
|
-
function sendLaunchAppParamsLog(params) {
|
|
8
|
-
var _a;
|
|
9
|
-
// #ifndef H5
|
|
10
|
-
try {
|
|
11
|
-
var outputData = JSON.parse(JSON.stringify((_a = params === null || params === void 0 ? void 0 : params.referrerInfo) === null || _a === void 0 ? void 0 : _a.extraData));
|
|
12
|
-
outputData === null || outputData === void 0 ? true : delete outputData.token;
|
|
13
|
-
reportLog(outputData, '小程序启动入参');
|
|
14
|
-
} catch (error) {
|
|
15
|
-
console.log(error);
|
|
16
|
-
}
|
|
17
|
-
// #endif
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* 防抖函数
|
|
22
|
-
* @param callback
|
|
23
|
-
* @param time
|
|
24
|
-
* @returns
|
|
25
|
-
*/
|
|
26
|
-
function createDebounceFn(callback, time) {
|
|
27
|
-
var timer = null;
|
|
28
|
-
return function () {
|
|
29
|
-
for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30
|
-
params[_key] = arguments[_key];
|
|
31
|
-
}
|
|
32
|
-
clearTimeout(timer);
|
|
33
|
-
timer = setTimeout(function () {
|
|
34
|
-
callback.apply(void 0, params);
|
|
35
|
-
}, time);
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
var install = function install(Vue) {};
|
|
40
|
-
var index = {
|
|
41
|
-
install: install
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export { createDebounceFn, index as default, sendLaunchAppParamsLog };
|