密码加密
This commit is contained in:
parent
b1305961d4
commit
a4cd1b4c1d
|
@ -1,5 +1,5 @@
|
||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { Redirect } from 'react-router';
|
import { Base64 } from 'js-base64';
|
||||||
|
|
||||||
import Dialog, {
|
import Dialog, {
|
||||||
DialogActions,
|
DialogActions,
|
||||||
|
@ -372,7 +372,7 @@ class LoginDialog extends Component {
|
||||||
let url = '/accounts/login.json'
|
let url = '/accounts/login.json'
|
||||||
axios.post(url, {
|
axios.post(url, {
|
||||||
login: newloginValue,
|
login: newloginValue,
|
||||||
password: newpassValue,
|
password: Base64.encode(newpassValue),
|
||||||
autologin: isGoingValue
|
autologin: isGoingValue
|
||||||
}
|
}
|
||||||
).then((response) => {
|
).then((response) => {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import React, {Component} from 'react';
|
import React, {Component} from 'react';
|
||||||
import {setmiyah,broadcastChannelPostMessage} from 'educoder';
|
import {setmiyah,broadcastChannelPostMessage} from 'educoder';
|
||||||
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
|
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
|
||||||
|
import { Base64 } from 'js-base64';
|
||||||
import passopen from '../../../src/images/login/passopen.png';
|
import passopen from '../../../src/images/login/passopen.png';
|
||||||
import passoff from '../../../src/images/login/passoff.png';
|
import passoff from '../../../src/images/login/passoff.png';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
@ -350,7 +351,7 @@ class LoginRegisterComponent extends Component {
|
||||||
var url = "/accounts/login.json";
|
var url = "/accounts/login.json";
|
||||||
axios.post(url, {
|
axios.post(url, {
|
||||||
login: this.state.login,
|
login: this.state.login,
|
||||||
password: this.state.password,
|
password: Base64.encode(this.state.password),
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
|
|
||||||
if (response === undefined) {
|
if (response === undefined) {
|
||||||
|
|
Loading…
Reference in New Issue