点击提交时判断是否登录

This commit is contained in:
caishi 2023-09-22 10:14:15 +08:00
parent 4fbd69ba1a
commit 321437e8c0
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@ import React, { useEffect } from 'react';
import { Form , Input , Row , Col, Button } from 'antd';
import '../index.scss';
import { postCreateZone } from '../api';
import cookie from 'react-cookies';
const { TextArea } = Input;
const phonereg = /^([1][3456789])\d{9}$/
@ -19,6 +20,10 @@ function Apply(props){
},[current_user])
function submitFunc(){
console.log(window.location.port !== "3007",window.location.port);
if(window.location.port !== "3007" && !cookie.load("autologin_trustie")){
props.history.push("/403");
}
validateFields((error,values)=>{
if(!error){
const zoneApplication = {...values};

View File

@ -7,7 +7,6 @@ function beforeFetch(actionUrl){
}
const service = axios.create({
headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间
});