密码加密

This commit is contained in:
unknown 2022-03-01 10:48:10 +08:00 committed by 何童崇
parent b1305961d4
commit a4cd1b4c1d
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
import React, { Component } from 'react';
import { Redirect } from 'react-router';
import { Base64 } from 'js-base64';
import Dialog, {
DialogActions,
@ -372,7 +372,7 @@ class LoginDialog extends Component {
let url = '/accounts/login.json'
axios.post(url, {
login: newloginValue,
password: newpassValue,
password: Base64.encode(newpassValue),
autologin: isGoingValue
}
).then((response) => {

View File

@ -1,6 +1,7 @@
import React, {Component} from 'react';
import {setmiyah,broadcastChannelPostMessage} from 'educoder';
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
import { Base64 } from 'js-base64';
import passopen from '../../../src/images/login/passopen.png';
import passoff from '../../../src/images/login/passoff.png';
import axios from 'axios';
@ -350,7 +351,7 @@ class LoginRegisterComponent extends Component {
var url = "/accounts/login.json";
axios.post(url, {
login: this.state.login,
password: this.state.password,
password: Base64.encode(this.state.password),
}).then((response) => {
if (response === undefined) {