zhouna 3 gadi atpakaļ
vecāks
revīzija
d2369c6207
2 mainītis faili ar 12 papildinājumiem un 16 dzēšanām
  1. 12 15
      src/api/index.js
  2. 0 1
      src/components/RegularManage/addRegular.js

+ 12 - 15
src/api/index.js

@@ -65,9 +65,6 @@ function interceptors(){
     }, function (error) {
         return Promise.reject(error);
     });
-    function toLogin(){
-	  window.location = '/';
-    }
     //拦截响应
     axios.interceptors.response.use(function (res) {
         const code = (res.data||{}).code;
@@ -79,25 +76,25 @@ function interceptors(){
 		    setCookie();
 		    const isOverTime = localStorage.getItem("overTime");
 		    if(!isOverTime){
-		        console.log(444,res)
-              const msg = res.data.message;
-			  Modal.confirm({
-                title:'提示',
-                content:msg||`登录信息失效,请重新登录`,
-				footer:`<Button key="submit" type="primary" onClick={()=>{ window.location = '/';}}>知道了</Button>`,
-				/*onOk:function(){
-				  window.location = '/';
-                }*/
-              })
+			  /*   console.log(444,res)
+			   const msg = res.data.message;
+			   /*Modalonfirm({
+				 title:'提示',
+				 content:msg||`登录信息失效,请重新登录`,
+				 footer:`<Button key="submit" type="primary" onClick={()=>{ window.location = '/';}}>知道了</Button>`,
+				 /!*onOk:function(){
+				   window.location = '/';
+				 }*!/
+			   })*/
 			  //message.error("登录信息失效,请重新登录");
             }
             //标记登录失效被退出,后面的请求不发送/不显示相应消息
             localStorage.setItem("overTime",1);
             //localStorage.removeItem("hospitalId");
-            //window.location = '/';
+            window.location = '/';
         }else{
 		  localStorage.removeItem("overTime");
-            return res;
+           return res;
         }
     }, function (error) {
         return Promise.reject(error);

+ 0 - 1
src/components/RegularManage/addRegular.js

@@ -60,7 +60,6 @@ function EditBlock(props) {
                 <Form.Item label="正则式值" name="val" rules={[{ required: true }]}>
                     <TextArea
                         autoSize={{ minRows: 5, maxRows: 5 }}
-                        maxLength='30'
                     />
                 </Form.Item>
                 <Form.Item label="说明" name="description">