system-clients 1.8.30-cr → 1.8.32-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/.gradle/4.4/fileChanges/last-build.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.bin +0 -0
- package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
- package/package.json +104 -104
- package/src/components/Main.vue +469 -469
- package/src/components/server/Login.vue +61 -2
- package/src/plugins/GetLoginInfoService.js +548 -548
@@ -134,10 +134,61 @@
|
|
134
134
|
<script>
|
135
135
|
import co from 'co'
|
136
136
|
import $ from 'jquery'
|
137
|
+
import CryptoJS from 'crypto-js'
|
138
|
+
|
139
|
+
// 添加防调试代码
|
140
|
+
const antiDebug = () => {
|
141
|
+
// 禁用右键
|
142
|
+
document.oncontextmenu = function() { return false; }
|
143
|
+
|
144
|
+
// 禁用F12
|
145
|
+
document.onkeydown = function(e) {
|
146
|
+
if (e.keyCode === 123) { // F12
|
147
|
+
return false;
|
148
|
+
}
|
149
|
+
}
|
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
|
+
};
|
180
|
+
}
|
137
181
|
|
138
182
|
let saveGen = function *(self) {
|
139
183
|
try {
|
140
|
-
|
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
|
+
})
|
141
192
|
yield self.$appdata.load()
|
142
193
|
|
143
194
|
yield self.$getConfig(self, 'Login')
|
@@ -215,6 +266,15 @@
|
|
215
266
|
export default {
|
216
267
|
title: '登录',
|
217
268
|
async ready () {
|
269
|
+
// 启用防调试
|
270
|
+
antiDebug();
|
271
|
+
|
272
|
+
// 清除控制台
|
273
|
+
console.clear();
|
274
|
+
|
275
|
+
// 禁用复制
|
276
|
+
document.onselectstart = function() { return false; }
|
277
|
+
|
218
278
|
if (this.$login && this.getUrlCompileParames('code')) {
|
219
279
|
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}`
|
220
280
|
let getMacs = await this.$resetpost(url, {}, {
|
@@ -441,7 +501,6 @@
|
|
441
501
|
// $('form').fadeIn(500)
|
442
502
|
// this.picLyanzhengma = ''
|
443
503
|
// this.createCode()
|
444
|
-
// this.deliver = {password: '', newpassword: '', affirmpassword: ''}
|
445
504
|
// },
|
446
505
|
// resetPassword () {
|
447
506
|
// if (!this.deliver.newpassword || !this.deliver.affirmpassword) {
|