diff --git a/package-lock.json b/package-lock.json index fa7933b65..c0e7648bd 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/apply.jsx b/src/forge/Information/Pages/apply.jsx index 24c37713c..2c07bb12a 100644 --- a/src/forge/Information/Pages/apply.jsx +++ b/src/forge/Information/Pages/apply.jsx @@ -1,4 +1,4 @@ -import React from 'react'; +import React, { useEffect } from 'react'; import { Form , Input , Row , Col, Button } from 'antd'; import '../index.scss'; import { postCreateZone } from '../api'; @@ -8,6 +8,10 @@ const phonereg = /^([1][3456789])\d{9}$/ function Apply(props){ const { form } = props; const { getFieldDecorator , validateFields } = form; +console.log(props); + useEffect(()=>{ + document.title = '申请创建专区'; + },[]) function submitFunc(){ validateFields((error,values)=>{ @@ -15,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=>{}) } @@ -33,6 +39,14 @@ function Apply(props){ callback(); } + + // function checkIndentity(rule, value, callback){ + // if(value && !idenReg.test(value)){ + // callback("专区标识长度2-20,只能以字母开头结尾,可包含数字、下划线、中划线"); + // } + // callback(); + // } + return(
@@ -78,9 +92,12 @@ function Apply(props){ label="专区标识" > {getFieldDecorator("key",{ - rules:[{required:true,message:"请输入专区域名标识"}] + rules:[ + { required: true,message:"请输入专区域名标识" }, + { pattern: /^[a-zA-Z][a-zA-Z0-9_-]{0,18}[a-zA-Z]$/, message: "长度2-20,只能包含数字、字母、下划线、中划线,必须以字母开头结尾"}, + ] })( - + )} @@ -139,7 +156,7 @@ function Apply(props){
- +
diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index f68b2c3b1..68b99556f 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(); } } @@ -48,7 +49,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 +61,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); @@ -101,7 +104,7 @@ function SelfList(props){

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

-

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

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

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

}
@@ -119,6 +122,7 @@ function SelfList(props){
  • setStatus(2)} className={status===2?"active":""}>未通过
  • +
      { list && list.length === 0 && @@ -132,10 +136,10 @@ function SelfList(props){ return(
    • - {i.name} + {i.name}
      - {i.domainName} + {i.domainName || i.dirName} | {moment(i.createTime).format("YYYY/MM/DD")} @@ -149,13 +153,14 @@ function SelfList(props){ ) }) } - { - total > limit && -
      - setPage(p)}/> -
      - }
    + { + total > limit && +
    + {setPage(p);window.scrollTo(0,450)}}/> +
    + } +
    ) diff --git a/src/forge/Information/fetch.js b/src/forge/Information/fetch.js index 69f62c0a0..ddb0df2b7 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,7 +7,7 @@ function beforeFetch(actionUrl){ } const service = axios.create({ - // headers:{Authorization: cookie.load("autologin_trustie")}, + headers:{Authorization:"0cd46d63363af9205eb7ccecff574309ce069a97"}, baseURL: actionUrl, timeout: 1800000, // 请求超时时间 }); diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index 918a82670..ef5c0f61f 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -1604,7 +1604,8 @@ margin-bottom: 20px; p{ color: #424650; - margin-top: 15px; + margin-top: 14px; + line-height: 24px; } h5{ color:#000000; @@ -1647,7 +1648,7 @@ border-radius: 0px 4px 4px 0px; } &.active{ - background-color: #466aff; + background-color: var(--primary-color); color: #fff; } } @@ -1671,7 +1672,7 @@ .s-name{ position: relative; color:#1f2329; - font-size:18px; + font-size:16px; padding-left: 16px; height: 26px; line-height: 26px; @@ -1681,11 +1682,14 @@ left: 0px; height: 8px; width: 8px; - background-color: #466aff; + background-color: var(--primary-color); border-radius: 50%; - top:10px; + top:8px; content: ""; } + &:hover{ + color: var(--primary-color); + } } .s-info{ display: flex;