update 同上

This commit is contained in:
caishi 2022-12-27 14:18:46 +08:00
parent 6610f7f065
commit 7cf9e7b6f1
3 changed files with 10 additions and 2 deletions

View File

@ -136,7 +136,7 @@ const WebIDE = Loadable({
// })
// 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc"];
const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin"];
class App extends Component {
constructor(props) {

View File

@ -3,6 +3,7 @@ import { Form , Input , Button } from 'antd';
import phone from './image/phone.svg';
import lock from "./image/lock.png";
import axios from 'axios';
import cookie from 'react-cookies';
const phonereg = /^([1][3456789])\d{9}$/
@ -23,6 +24,8 @@ function Bind(props){
username,password,type
}).then(result=>{
if(result){
cookie.save("supplyphone",true);
cookie.save("login",result.data.login);
window.location.href = "/"+result.data.login;
}
})

View File

@ -5,6 +5,7 @@ import lock from "./image/lock.png";
import shield from './image/shield.png';
import phone from './image/phone.svg';
import axios from 'axios';
import cookie from 'react-cookies';
import { setmiyah } from 'educoder';
const phonereg = /^([1][3456789])\d{9}$/
@ -19,6 +20,7 @@ function Bind(props){
const [secondsStr, setSecondsStr] = useState(60);
const [ getCaptchaBut , setGetCaptchaBut ] = useState(true);
const type = props.match.params.type;
//username
function usernameConfirm(rule, value, callback){
@ -153,7 +155,8 @@ function Bind(props){
login: values.username,
password: values.password,
password_confirmation: values.confirm_password,
code: values.captcha
code: values.captcha,
type
}).then(response=>{
if(response.data && response.data.status === -6){
//
@ -161,6 +164,8 @@ function Bind(props){
}else if(response.data && response.data.status === 0){
//forge
cookie.save("supplyphone",true);
cookie.save("login",response.data.login);
window.location.href = "/"+values.register_username;
}
})