From a67ea1731c3464ee7e9ea1c4de7c891948ecec3f Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 21 Sep 2023 17:16:50 +0800
Subject: [PATCH 1/6] post method
---
src/forge/Information/Pages/apply.jsx | 7 ------
src/forge/Information/Pages/selfList.jsx | 27 ++++++++++++++++++------
src/forge/Information/api.js | 2 ++
3 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx
index 2c07bb12a..89e674ed5 100644
--- a/src/forge/Information/Pages/apply.jsx
+++ b/src/forge/Information/Pages/apply.jsx
@@ -39,13 +39,6 @@ console.log(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 dbce4ccdf..f6b9312aa 100644
--- a/src/forge/Information/Pages/selfList.jsx
+++ b/src/forge/Information/Pages/selfList.jsx
@@ -25,14 +25,27 @@ function SelfList(props){
useEffect(()=>{
if(id){
setIsSpin(true);
- if(source===true){
- getSource();
- }
- if(source===false){
- getNew();
- }
+ getFunc(source);
}
- },[status, page , id,source])
+ },[id,source,page])
+
+ function getFunc(s){
+ if(s===true){
+ getSource();
+ }
+ if(s===false){
+ getNew();
+ }
+ }
+
+ useEffect(()=>{
+ if(page===1){
+ setIsSpin(true);
+ getFunc(source);
+ }else{
+ setPage(1);
+ }
+ },[status])
useEffect(()=>{
diff --git a/src/forge/Information/api.js b/src/forge/Information/api.js
index 2496268cc..1dcdea4d7 100644
--- a/src/forge/Information/api.js
+++ b/src/forge/Information/api.js
@@ -172,6 +172,8 @@ export function delSourceMyList(id){
export function postCreateZone(data) {
return fetch({
url: `/zone/application`,
+ method: 'post',
+ data: data
})
}
From 479534c49fe00589836877797e307fe3cd2a3678 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Thu, 21 Sep 2023 17:32:48 +0800
Subject: [PATCH 2/6] btn color
---
src/forge/Information/Pages/selfList.jsx | 20 ++++++++++----------
src/forge/Information/index.scss | 4 ++++
2 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx
index f6b9312aa..54e1a6b36 100644
--- a/src/forge/Information/Pages/selfList.jsx
+++ b/src/forge/Information/Pages/selfList.jsx
@@ -29,14 +29,6 @@ function SelfList(props){
}
},[id,source,page])
- function getFunc(s){
- if(s===true){
- getSource();
- }
- if(s===false){
- getNew();
- }
- }
useEffect(()=>{
if(page===1){
@@ -47,6 +39,14 @@ function SelfList(props){
}
},[status])
+ function getFunc(s){
+ if(s===true){
+ getSource();
+ }
+ if(s===false){
+ getNew();
+ }
+ }
useEffect(()=>{
if(pathname){
@@ -126,8 +126,8 @@ function SelfList(props){
-
-
+
+
diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss
index ef5c0f61f..b7fa790e0 100644
--- a/src/forge/Information/index.scss
+++ b/src/forge/Information/index.scss
@@ -1723,6 +1723,10 @@
.ant-btn{
width: 95px;
margin:0px 20px;
+ &.ant-btn-primary{
+ color: var(--primary-color);
+ border-color: var(--primary-color);
+ }
}
}
}
From 4fbd69ba1abea6d41675401611a0a21fcaec6578 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 22 Sep 2023 09:35:29 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E8=BF=9B?=
=?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=88=9B=E5=BB=BA=E5=85=A5=E5=8F=A3=E8=B7=B3?=
=?UTF-8?q?=E8=BD=AC=E8=87=B3403?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Information/Pages/apply.jsx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx
index 89e674ed5..52986e51c 100644
--- a/src/forge/Information/Pages/apply.jsx
+++ b/src/forge/Information/Pages/apply.jsx
@@ -6,13 +6,18 @@ const { TextArea } = Input;
const phonereg = /^([1][3456789])\d{9}$/
function Apply(props){
- const { form } = props;
+ const { form , current_user } = props;
const { getFieldDecorator , validateFields } = form;
-console.log(props);
useEffect(()=>{
document.title = '申请创建专区';
},[])
+ useEffect(()=>{
+ if(!(current_user && current_user.login)){
+ props.history.push("/403");
+ }
+ },[current_user])
+
function submitFunc(){
validateFields((error,values)=>{
if(!error){
From 321437e8c046bf69f438b33ae356ad0bcc3dd775 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 22 Sep 2023 10:14:15 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=8F=90=E4=BA=A4?=
=?UTF-8?q?=E6=97=B6=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E7=99=BB=E5=BD=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Information/Pages/apply.jsx | 5 +++++
src/forge/Information/fetch.js | 1 -
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx
index 52986e51c..f38773e8d 100644
--- a/src/forge/Information/Pages/apply.jsx
+++ b/src/forge/Information/Pages/apply.jsx
@@ -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};
diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js
index ddb0df2b7..29cc15d28 100644
--- a/src/forge/Information/fetch.js
+++ b/src/forge/Information/fetch.js
@@ -7,7 +7,6 @@ function beforeFetch(actionUrl){
}
const service = axios.create({
- headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"},
baseURL: actionUrl,
timeout: 1800000, // 请求超时时间
});
From 13c27554abc9d34b4a5a329d90409774ce4c88c6 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 22 Sep 2023 10:44:50 +0800
Subject: [PATCH 5/6] build
---
src/forge/Information/Pages/apply.jsx | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/src/forge/Information/Pages/apply.jsx b/src/forge/Information/Pages/apply.jsx
index f38773e8d..77851a710 100644
--- a/src/forge/Information/Pages/apply.jsx
+++ b/src/forge/Information/Pages/apply.jsx
@@ -20,10 +20,6 @@ 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};
@@ -32,7 +28,7 @@ function Apply(props){
props.showNotification("提交成功!");
setTimeout(() => {
window.location.href="/";
- }, 200);
+ }, 100);
}
}).catch(error=>{})
}
From 16781d81d3616c1fd9b4c6452378a0e0e984ca34 Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 22 Sep 2023 10:49:46 +0800
Subject: [PATCH 6/6] =?UTF-8?q?=E6=97=A0=E6=95=B0=E6=8D=AE=E5=9B=BE?=
=?UTF-8?q?=E7=89=87?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/forge/Information/Pages/selfList.jsx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx
index 54e1a6b36..ab69589d1 100644
--- a/src/forge/Information/Pages/selfList.jsx
+++ b/src/forge/Information/Pages/selfList.jsx
@@ -4,6 +4,8 @@ import { Link } from 'react-router-dom';
import { getNewsMyList , getSourceMyList , delNewsMyList , delSourceMyList } from '../api';
import moment from 'moment';
import nodata from '../img/nodata.png';
+import { tempEnum } from '../tempInfo';
+import emptydata from '../../Images/nodata.png';
import '../index.scss';
@@ -131,7 +133,7 @@ function SelfList(props){
- {source ? "资源发布": temp==="zone1" ? "新闻资讯":"领域资讯"}
+ {source ? "资源发布": temp === tempEnum.zone1 ? "新闻资讯":"领域资讯"}
我的{source ? "资源":"文章"}
@@ -145,7 +147,7 @@ function SelfList(props){
{
list && list.length === 0 &&
-

+
暂无数据~
}