|
@@ -164,6 +164,16 @@
|
164
|
164
|
});
|
165
|
165
|
return tmpAES.toString();
|
166
|
166
|
},
|
|
167
|
+ //aes加密-登录
|
|
168
|
+ encryptByEnAES(data) {
|
|
169
|
+ data = enc.Utf8.parse(data);
|
|
170
|
+ let Key = enc.Utf8.parse('Aes2Util666AQWER');
|
|
171
|
+ let tmpAES = AES.encrypt(data, Key, {
|
|
172
|
+ mode: mode.ECB,
|
|
173
|
+ padding: pad.Pkcs7,
|
|
174
|
+ });
|
|
175
|
+ return tmpAES.toString();
|
|
176
|
+ },
|
167
|
177
|
//aes解密
|
168
|
178
|
encryptByDeAES(data) {
|
169
|
179
|
let Key = "dsadmin";
|
|
@@ -687,6 +697,7 @@
|
687
|
697
|
password: this.password.trim(),
|
688
|
698
|
type: 'APP'
|
689
|
699
|
};
|
|
700
|
+ data = this.encryptByEnAES(JSON.stringify(data));
|
690
|
701
|
post("/auth/login", data).then((res) => {
|
691
|
702
|
uni.hideLoading();
|
692
|
703
|
if (res.status == 200) {
|