Commit 5b111546 authored by aiduck's avatar aiduck

this._blackList

parent d4761aa6
{ {
"name": "@tuia/rip", "name": "@tuia/rip",
"version": "1.2.3-beta", "version": "1.2.3-beta1",
"description": "Tools for user behavior recording and playback based on rrweb", "description": "Tools for user behavior recording and playback based on rrweb",
"main": "dist/index.js", "main": "dist/index.js",
"scripts": { "scripts": {
......
...@@ -57,8 +57,8 @@ class Monitor { ...@@ -57,8 +57,8 @@ class Monitor {
init({ system, userIdentifier, host = [], env = "prod", log = false, path = window.location.hash, blackList = [] }) { init({ system, userIdentifier, host = [], env = "prod", log = false, path = window.location.hash, blackList = [] }) {
let protocol = document.location.protocol; let protocol = document.location.protocol;
let realHost = window.location.host; let realHost = window.location.host;
_blackList = blackList; this._blackList = blackList;
console.log('黑名单', _blackList); console.log('黑名单', this._blackList);
if (!system || !userIdentifier || host.length > 0) { if (!system || !userIdentifier || host.length > 0) {
console.log("system,userIdentifier,host是必传的"); console.log("system,userIdentifier,host是必传的");
} }
...@@ -103,7 +103,7 @@ class Monitor { ...@@ -103,7 +103,7 @@ class Monitor {
* 是否存在黑名单中 * 是否存在黑名单中
**/ **/
isExistBlackList(path) { isExistBlackList(path) {
_blackList && _blackList.map(item => { this._blackList && this._blackList.map(item => {
if(path.includes(item)){ if(path.includes(item)){
return true return true
} }
......
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