From 05fb87dff1d5d3907ac71a2fb05a92b049a11ef5 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 21 Sep 2023 15:13:34 +0800
Subject: [PATCH] update
---
src/forge/Information/Pages/apply.jsx | 24 ++++++++++++++++++++----
src/forge/Information/Pages/selfList.jsx | 20 +++++++++++---------
src/forge/Information/fetch.js | 2 +-
src/forge/Information/index.scss | 11 ++++++-----
4 files changed, 38 insertions(+), 19 deletions(-)
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(
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 &&
-
- }
+ {
+ total > limit &&
+
+ }
+
)
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: "";
}
}