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 1/3] 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: "";
}
}
From eebb52c84d51ab590ff1af4603a77b93b1c3059a Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 21 Sep 2023 15:37:28 +0800
Subject: [PATCH 2/3] update
---
src/forge/Information/Pages/apply.jsx | 9 +++++----
src/forge/Information/Pages/selfList.jsx | 6 ++++--
src/forge/Information/fetch.js | 3 ---
src/forge/Information/index.scss | 3 +++
4 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx
index bbb63880..2c07bb12 100644
--- a/src/forge/Information/Pages/apply.jsx
+++ b/src/forge/Information/Pages/apply.jsx
@@ -5,11 +5,10 @@ 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;
-
+console.log(props);
useEffect(()=>{
document.title = '申请创建专区';
},[])
@@ -20,8 +19,10 @@ function Apply(props){
const zoneApplication = {...values};
postCreateZone(zoneApplication).then(response=>{
if(response && response.data && response.data.code===200){
- props.showNotification("提交成功!")
- props.history.push({pathname:"/"});
+ props.showNotification("提交成功!");
+ setTimeout(() => {
+ window.location.href="/";
+ }, 200);
}
}).catch(error=>{})
}
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx
index fce4407b..b994abff 100644
--- a/src/forge/Information/Pages/selfList.jsx
+++ b/src/forge/Information/Pages/selfList.jsx
@@ -48,7 +48,8 @@ function SelfList(props){
getSourceMyList({
auditStatus:status,
zoneId:id,
- pageSize:limit
+ pageSize:limit,
+ pageNum:page
}).then(result=>{
setList(result.data.rows);
setTotal(result.data.total);
@@ -59,7 +60,8 @@ function SelfList(props){
function getNew(){
getNewsMyList(id,{
auditStatus:status===0 ? 2 : status === 2 ? 0 : 1,
- pageSize:limit
+ pageSize:limit,
+ pageNum:page
}).then(result=>{
setList(result.data.rows);
setTotal(result.data.total);
diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js
index d7491da4..29cc15d2 100644
--- a/src/forge/Information/fetch.js
+++ b/src/forge/Information/fetch.js
@@ -1,6 +1,5 @@
import axios from 'axios';
import { message , notification } from 'antd';
-import cookie from 'react-cookies';
function beforeFetch(actionUrl){
if (window.location.href.indexOf('localhost') < 0) {
@@ -8,8 +7,6 @@ function beforeFetch(actionUrl){
}
const service = axios.create({
- headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
- // headers:{Authorization: cookie.load("autologin_trustie")},
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间
});
diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss
index 140c0aab..ef5c0f61 100644
--- a/src/forge/Information/index.scss
+++ b/src/forge/Information/index.scss
@@ -1687,6 +1687,9 @@
top:8px;
content: "";
}
+ &:hover{
+ color: var(--primary-color);
+ }
}
.s-info{
display: flex;
From 403cb3ad585d27fc31888a61dca6c7132db723fb Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 21 Sep 2023 16:11:00 +0800
Subject: [PATCH 3/3] get data
---
package-lock.json | 6 +++---
src/forge/Information/Pages/selfList.jsx | 7 ++++---
src/forge/Information/fetch.js | 1 +
3 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index fa7933b6..c0e7648b 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -16660,7 +16660,7 @@
},
"sass-loader": {
"version": "7.3.1",
- "resolved": "http://173.15.15.82:8081/repository/npm-all/sass-loader/-/sass-loader-7.3.1.tgz",
+ "resolved": "https://registry.npmmirror.com/sass-loader/-/sass-loader-7.3.1.tgz",
"integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==",
"dev": true,
"requires": {
@@ -18669,7 +18669,7 @@
},
"ssri": {
"version": "7.1.1",
- "resolved": "http://173.15.15.82:8081/repository/npm-all/ssri/-/ssri-7.1.1.tgz",
+ "resolved": "https://registry.npmjs.org/ssri/-/ssri-7.1.1.tgz",
"integrity": "sha512-w+daCzXN89PseTL99MkA+fxJEcU3wfaE/ah0i0lnOlpG1CYLJ2ZjzEry68YBKfLs4JfoTShrTEsJkAZuNZ/stw==",
"dev": true,
"requires": {
@@ -20518,7 +20518,7 @@
},
"y18n": {
"version": "4.0.3",
- "resolved": "http://173.15.15.82:8081/repository/npm-all/y18n/-/y18n-4.0.3.tgz",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
"dev": true
},
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx
index b994abff..68b99556 100644
--- a/src/forge/Information/Pages/selfList.jsx
+++ b/src/forge/Information/Pages/selfList.jsx
@@ -25,9 +25,10 @@ function SelfList(props){
useEffect(()=>{
if(id){
setIsSpin(true);
- if(source && source===true){
+ if(source===true){
getSource();
- }else{
+ }
+ if(source===false){
getNew();
}
}
@@ -156,7 +157,7 @@ function SelfList(props){
{
total > limit &&
-
setPage(p)}/>
+ {setPage(p);window.scrollTo(0,450)}}/>
}
diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js
index 29cc15d2..ddb0df2b 100644
--- a/src/forge/Information/fetch.js
+++ b/src/forge/Information/fetch.js
@@ -7,6 +7,7 @@ function beforeFetch(actionUrl){
}
const service = axios.create({
+ headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间
});