diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx index 24c37713..2d5c29d6 100644 --- a/src/forge/Information/Pages/apply.jsx +++ b/src/forge/Information/Pages/apply.jsx @@ -1,14 +1,19 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { Form , Input , Row , Col, Button } from 'antd'; import '../index.scss'; import { postCreateZone } from '../api'; const { TextArea } = Input; const phonereg = /^([1][3456789])\d{9}$/ +const idenReg = /^[a-zA-Z][a-zA-Z0-9-_]{0,18}[a-zA-Z]+$/g function Apply(props){ const { form } = props; const { getFieldDecorator , validateFields } = form; + useEffect(()=>{ + document.title = '申请创建专区'; + },[]) + function submitFunc(){ validateFields((error,values)=>{ if(!error){ @@ -33,6 +38,14 @@ function Apply(props){ callback(); } + + function checkIndentity(rule, value, callback){ + if(value && !idenReg.test(value)){ + callback("专区标识长度2-20,只能以字母开头结尾,可包含数字、下划线、中划线"); + } + callback(); + } + return(
@@ -78,9 +91,12 @@ function Apply(props){ label="专区标识" > {getFieldDecorator("key",{ - rules:[{required:true,message:"请输入专区域名标识"}] + rules:[ + { required: true,message:"请输入专区域名标识" }, + { validator: checkIndentity } + ] })( - + )} @@ -139,7 +155,7 @@ function Apply(props){
- +
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index d1b36a39..5df34fde 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -101,7 +101,7 @@ function SelfList(props){

确定删除该{source?"资源":"文章"}?

-

{source?"删除后所有资源文件将被清楚,请谨慎操作":"此操作将发出文章删除申请,管理员同意申请后该文章将被删除"}

+ {(source || (!source && status === 1)) &&

{source?"删除后所有资源文件将被清除,请谨慎操作":"此操作将提交删除申请,管理员同意申请后该文章将被删除"}

}
@@ -119,6 +119,7 @@ function SelfList(props){
  • setStatus(2)} className={status===2?"active":""}>未通过
  • +
      { list && list.length === 0 && @@ -132,10 +133,10 @@ function SelfList(props){ return(
    • - {i.name} + {i.name}
      - {i.domainName} + {i.domainName || i.dirName} | {moment(i.createTime).format("YYYY/MM/DD")} @@ -149,13 +150,14 @@ function SelfList(props){ ) }) } - { - total > limit && -
      - setPage(p)}/> -
      - }
    + { + total > limit && +
    + setPage(p)}/> +
    + } +
    ) diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index 897cc41d..ddb0df2b 100644 --- a/src/forge/Information/fetch.js +++ b/src/forge/Information/fetch.js @@ -7,7 +7,7 @@ function beforeFetch(actionUrl){ } const service = axios.create({ - headers:{Authorization:"a57ec217a1963611f9a0ff591b305dc3d5b3ba1f"}, + headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"}, baseURL: actionUrl, timeout: 1800000, // 请求超时时间 }); diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 908032fe..34320bb7 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -1549,7 +1549,8 @@ margin-bottom: 20px; p{ color: #424650; - margin-top: 15px; + margin-top: 14px; + line-height: 24px; } h5{ color:#000000; @@ -1592,7 +1593,7 @@ border-radius: 0px 4px 4px 0px; } &.active{ - background-color: #466aff; + background-color: var(--primary-color); color: #fff; } } @@ -1616,7 +1617,7 @@ .s-name{ position: relative; color:#1f2329; - font-size:18px; + font-size:16px; padding-left: 16px; height: 26px; line-height: 26px; @@ -1626,9 +1627,9 @@ left: 0px; height: 8px; width: 8px; - background-color: #466aff; + background-color: var(--primary-color); border-radius: 50%; - top:10px; + top:8px; content: ""; } }