system-clients 1.8.33-cr → 1.8.35-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.33-cr",
3
+ "version": "1.8.35-cr",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -134,67 +134,30 @@
134
134
  <script>
135
135
  import co from 'co'
136
136
  import $ from 'jquery'
137
- import CryptoJS from 'crypto-js'
138
137
 
139
138
  // 添加防调试代码
140
139
  const antiDebug = () => {
141
140
  // 禁用右键
142
141
  document.oncontextmenu = function() { return false; }
143
-
144
- // 禁用F12
142
+
143
+ // 禁用F12和Ctrl+Shift+I
145
144
  document.onkeydown = function(e) {
146
- if (e.keyCode === 123) { // F12
145
+ if (e.keyCode === 123 || (e.ctrlKey && e.shiftKey && e.keyCode === 73)) {
147
146
  return false;
148
147
  }
149
148
  }
150
-
151
- // 检测开发者工具
152
- let devtools = function() {};
153
- devtools.toString = function() {
154
- this.opened = true;
155
- }
156
-
157
- // 使用更温和的检测方式
158
- setInterval(() => {
159
- console.log('%c', devtools);
160
- if (devtools.opened) {
161
- devtools.opened = false;
162
- // 只在首次检测到开发者工具时刷新一次
163
- if (!window.hasRefreshed) {
164
- window.hasRefreshed = true;
165
- window.location.reload();
166
- }
167
- }
168
- }, 2000); // 降低检测频率到2秒一次
169
- }
170
-
171
- // 密码加密函数
172
- const encryptPassword = (password) => {
173
- // 使用时间戳作为盐值,增加随机性
174
- const timestamp = new Date().getTime();
175
- const salt = CryptoJS.SHA256(timestamp.toString()).toString();
176
- // 使用PBKDF2进行密码加密
177
- const key = CryptoJS.PBKDF2(password, salt, {
178
- keySize: 256/32,
179
- iterations: 1000
180
- });
181
- return {
182
- password: key.toString(),
183
- salt: salt,
184
- timestamp: timestamp
185
- };
149
+
150
+ // 禁用控制台输出
151
+ console.log = function() {};
152
+ console.warn = function() {};
153
+ console.error = function() {};
186
154
  }
187
155
 
156
+
157
+
188
158
  let saveGen = function *(self) {
189
159
  try {
190
- // 加密密码
191
- const encryptedData = encryptPassword(self.model.password);
192
-
193
- // 发送加密后的数据
194
- yield self.$login.login(self.model.ename, encryptedData.password, {
195
- salt: encryptedData.salt,
196
- timestamp: encryptedData.timestamp
197
- })
160
+ yield self.$login.login(self.model.ename, self.model.password)
198
161
  yield self.$appdata.load()
199
162
 
200
163
  yield self.$getConfig(self, 'Login')
@@ -274,13 +237,10 @@
274
237
  async ready () {
275
238
  // 启用防调试
276
239
  antiDebug();
277
-
240
+
278
241
  // 清除控制台
279
242
  console.clear();
280
-
281
- // 禁用复制
282
- document.onselectstart = function() { return false; }
283
-
243
+
284
244
  if (this.$login && this.getUrlCompileParames('code')) {
285
245
  let url = `${this.config.token}?code=${this.getUrlCompileParames('code')}&client_id=ceshi&client_secret=34c5160b77074c18a27b42996ecd3c0f&grant_type=authorization_code&redirect_uri=${this.config.redirect_uri}`
286
246
  let getMacs = await this.$resetpost(url, {}, {
@@ -356,26 +316,6 @@
356
316
  this.$emit('ready')
357
317
  },
358
318
  confirm (key) {
359
- // if (this.checkPassword(this.model.password) <= 2) {
360
- // this.visible = true
361
- // $('form').fadeIn(500)
362
- // return
363
- // }
364
- // if (this.model.password.includes('%')) {
365
- // this.model.password = ''
366
- // this.$showMessage("密码不能用'%'字符!")
367
- // this.visible = true
368
- // $('form').fadeIn(500)
369
- // return
370
- // }
371
- // if (this.model.password.includes('/')) {
372
- // this.model.password = ''
373
- // this.$showMessage("密码不能用'/'字符!")
374
- // this.visible = true
375
- // $('form').fadeIn(500)
376
- // return
377
- // }
378
-
379
319
  if (key == 'key') {
380
320
  $('form').fadeOut(500)
381
321
  }