system-clients 1.8.32-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.32-cr",
3
+ "version": "1.8.35-cr",
4
4
  "description": "系统基础框架",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -134,61 +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
- setInterval(() => {
153
- const devtools = /./;
154
- devtools.toString = function() {
155
- this.opened = true;
156
- }
157
- console.log('%c', devtools);
158
- if (devtools.opened) {
159
- devtools.opened = false;
160
- window.location.reload();
161
- }
162
- }, 1000);
163
- }
164
-
165
- // 密码加密函数
166
- const encryptPassword = (password) => {
167
- // 使用时间戳作为盐值,增加随机性
168
- const timestamp = new Date().getTime();
169
- const salt = CryptoJS.SHA256(timestamp.toString()).toString();
170
- // 使用PBKDF2进行密码加密
171
- const key = CryptoJS.PBKDF2(password, salt, {
172
- keySize: 256/32,
173
- iterations: 1000
174
- });
175
- return {
176
- password: key.toString(),
177
- salt: salt,
178
- timestamp: timestamp
179
- };
149
+
150
+ // 禁用控制台输出
151
+ console.log = function() {};
152
+ console.warn = function() {};
153
+ console.error = function() {};
180
154
  }
181
155
 
156
+
157
+
182
158
  let saveGen = function *(self) {
183
159
  try {
184
- // 加密密码
185
- const encryptedData = encryptPassword(self.model.password);
186
-
187
- // 发送加密后的数据
188
- yield self.$login.login(self.model.ename, encryptedData.password, {
189
- salt: encryptedData.salt,
190
- timestamp: encryptedData.timestamp
191
- })
160
+ yield self.$login.login(self.model.ename, self.model.password)
192
161
  yield self.$appdata.load()
193
162
 
194
163
  yield self.$getConfig(self, 'Login')
@@ -268,13 +237,10 @@
268
237
  async ready () {
269
238
  // 启用防调试
270
239
  antiDebug();
271
-
240
+
272
241
  // 清除控制台
273
242
  console.clear();
274
-
275
- // 禁用复制
276
- document.onselectstart = function() { return false; }
277
-
243
+
278
244
  if (this.$login && this.getUrlCompileParames('code')) {
279
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}`
280
246
  let getMacs = await this.$resetpost(url, {}, {
@@ -350,26 +316,6 @@
350
316
  this.$emit('ready')
351
317
  },
352
318
  confirm (key) {
353
- // if (this.checkPassword(this.model.password) <= 2) {
354
- // this.visible = true
355
- // $('form').fadeIn(500)
356
- // return
357
- // }
358
- // if (this.model.password.includes('%')) {
359
- // this.model.password = ''
360
- // this.$showMessage("密码不能用'%'字符!")
361
- // this.visible = true
362
- // $('form').fadeIn(500)
363
- // return
364
- // }
365
- // if (this.model.password.includes('/')) {
366
- // this.model.password = ''
367
- // this.$showMessage("密码不能用'/'字符!")
368
- // this.visible = true
369
- // $('form').fadeIn(500)
370
- // return
371
- // }
372
-
373
319
  if (key == 'key') {
374
320
  $('form').fadeOut(500)
375
321
  }