system-clients 1.8.32-cr → 1.8.33-cr

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "system-clients",
3
- "version": "1.8.32-cr",
3
+ "version": "1.8.33-cr",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -148,18 +148,24 @@
148
148
  }
149
149
  }
150
150
 
151
- // 定期检查是否打开开发者工具
151
+ // 检测开发者工具
152
+ let devtools = function() {};
153
+ devtools.toString = function() {
154
+ this.opened = true;
155
+ }
156
+
157
+ // 使用更温和的检测方式
152
158
  setInterval(() => {
153
- const devtools = /./;
154
- devtools.toString = function() {
155
- this.opened = true;
156
- }
157
159
  console.log('%c', devtools);
158
160
  if (devtools.opened) {
159
161
  devtools.opened = false;
160
- window.location.reload();
162
+ // 只在首次检测到开发者工具时刷新一次
163
+ if (!window.hasRefreshed) {
164
+ window.hasRefreshed = true;
165
+ window.location.reload();
166
+ }
161
167
  }
162
- }, 1000);
168
+ }, 2000); // 降低检测频率到2秒一次
163
169
  }
164
170
 
165
171
  // 密码加密函数