forked from Gitlink/forgeplus-react
merge
This commit is contained in:
commit
5d4ac0f87d
|
|
@ -23,7 +23,7 @@ function MyEditor(props) {
|
|||
const toolbarConfig = {};
|
||||
// 隐藏 代办
|
||||
toolbarConfig.excludeKeys = [
|
||||
'todo'
|
||||
'todo', "fullScreen"
|
||||
]
|
||||
|
||||
// 编辑器配置
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function Main(props){
|
|||
<div className="boxmain">
|
||||
<div className='titleButBox'>
|
||||
<p className="in_title">{tempConfig[temp].mainTitle}</p>
|
||||
{role && role.role !== "None" && <div className='createButs'>
|
||||
{role && role.role !== "None" && <div className='createButs mt10'>
|
||||
{role.role === "Member" && <Button type="primary" ghost className='mr20'>
|
||||
<Link to={`/zone/${deptId}/news/self`}>我的文章</Link>
|
||||
</Button>}
|
||||
|
|
|
|||
|
|
@ -90,22 +90,26 @@ function NewsCreate(props){
|
|||
const {data:{code, msg}} = res;
|
||||
setLoading(false);
|
||||
if(code === 200){
|
||||
message.success("更新成功");
|
||||
history.push(`/zone/${deptId}/news/self`);
|
||||
message.success("提交成功");
|
||||
history.push(`/zone/${deptId}/newdetail/${newsId}`);
|
||||
}else{
|
||||
message.error(msg || '更新失败,请联系管理员!')
|
||||
message.error(msg || '提交失败,请联系管理员!')
|
||||
}
|
||||
}).catch(e=>{
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
addNewsByDirId(fieldsValue.dirId, params).then(res=>{
|
||||
const {data:{code, msg}} = res;
|
||||
const {data:{code, msg, data}} = res;
|
||||
setLoading(false);
|
||||
if(code === 200){
|
||||
message.success("新增成功");
|
||||
history.push(`/zone/${deptId}/news/self`);
|
||||
message.success("提交成功");
|
||||
history.push(`/zone/${deptId}/newdetail/${data}`);
|
||||
}else{
|
||||
message.error(msg || '新增失败,请联系管理员!')
|
||||
message.error(msg || '提交失败,请联系管理员!')
|
||||
}
|
||||
}).catch(e=>{
|
||||
setLoading(false);
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
@ -153,7 +157,7 @@ function NewsCreate(props){
|
|||
type === "richEditor" ? <RichEditor uploadUrl={`${httpUrl}/file/common/upload`} videoUploadUrl={`${httpUrl}/file/common/upload?type=cms`} setValue={(value)=>{setFieldsValue({"content": value})}}/> : <MdEditor
|
||||
placeholder={"请输入详细介绍"}
|
||||
height={500}
|
||||
mdID={"order-new-description"}
|
||||
className='editNewsMd'
|
||||
initValue={value}
|
||||
onChange={(value)=>{setFieldsValue({"content": value})}}
|
||||
imageExpand={false}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React,{ useState , useEffect } from 'react';
|
||||
import { Breadcrumb , Divider, Spin } from 'antd';
|
||||
import { Badge, Breadcrumb , Divider, Spin } from 'antd';
|
||||
import liulan from '../img/liulan.png';
|
||||
import RenderHtml from '../../../components/render-html';
|
||||
import { Base64 } from 'js-base64';
|
||||
|
|
@ -107,7 +107,9 @@ function NewsDetail(props){
|
|||
<ul className="i_ul_value">
|
||||
{ cmsDir && <li><a href={ detail.publishUserUrl } ><img src={ detail.publishUserImage } alt="" className="headimg" /> { detail.publishUserNickname }</a></li> }
|
||||
{ cmsDir && <li>{ detail.isFirstPublish ? '创建于' : '更新于' }{detail.publishTime}</li> }
|
||||
{ detail.visits && <li><img src={liulan} alt="" className="mr5" />{detail.visits}</li> }
|
||||
{ !!detail.visits && <li><img src={liulan} alt="" className="mr5" />{detail.visits}</li> }
|
||||
{ detail.auditStatus === '2' && <li><Badge color={temp === "zone" ? "#466aff" : "#089f7f"} text="待审核" className='pass'/></li>}
|
||||
{ detail.auditStatus === '0' && <li><Badge color="#eb1212" text="未通过" className='failed'/></li>}
|
||||
</ul>
|
||||
</div>
|
||||
{ !IsPC() && <Divider dashed={true} /> }
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ function SourceCreate(props){
|
|||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
// 新建文章
|
||||
// 新建/编辑资源
|
||||
function submit(e){
|
||||
e.preventDefault();
|
||||
validateFields((err, fieldsValue)=>{
|
||||
|
|
@ -89,21 +89,21 @@ function SourceCreate(props){
|
|||
updateMyResource(params).then((res)=>{
|
||||
const {data:{code, msg}} = res;
|
||||
if(code === 200){
|
||||
message.success("编辑成功");
|
||||
history.push(`/zone/${deptId}/source/self`);
|
||||
message.success("提交成功");
|
||||
history.push(`/zone/${deptId}/source/${sourceid}`);
|
||||
}else{
|
||||
message.error(msg || '编辑失败,请联系管理员!')
|
||||
message.error(msg || '提交失败,请联系管理员!')
|
||||
}
|
||||
})
|
||||
return;
|
||||
}
|
||||
addResource(params).then((res)=>{
|
||||
const {data:{code, msg}} = res;
|
||||
const {data:{code, msg, data}} = res;
|
||||
if(code === 200){
|
||||
message.success("新增成功");
|
||||
history.push(`/zone/${deptId}/source/self`);
|
||||
message.success("提交成功");
|
||||
history.push(`/zone/${deptId}/source/${data.id}`);
|
||||
}else{
|
||||
message.error(msg || '新增失败,请联系管理员!')
|
||||
message.error(msg || '提交失败,请联系管理员!')
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
@ -203,8 +203,8 @@ function SourceCreate(props){
|
|||
{getFieldDecorator("fileList", {
|
||||
rules:[{ required:true,message:"请上传资源附件!" }]
|
||||
})(
|
||||
<Upload action={getZoneUrl(`/api/file/common/upload?type=resource`)} showUploadList={false} beforeUpload={beforeUpload} onChange={onChange} withCredentials={true}>
|
||||
<Button>
|
||||
<Upload action={getZoneUrl(`/api/file/common/upload?type=resource`)} showUploadList={false} beforeUpload={beforeUpload} onChange={onChange} withCredentials={true} headers={{Authorization: "3e33a5b0a35824f93666b1084488f0bd5f010025"}}>
|
||||
<Button className='hoverThemeColorBut'>
|
||||
<Icon type="upload" />单击上传
|
||||
</Button>
|
||||
</Upload>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
import React , { useEffect , useState } from 'react';
|
||||
import { Breadcrumb } from 'antd';
|
||||
import { Badge, Breadcrumb } from 'antd';
|
||||
import SourceFile from '../img/sourceFile.png';
|
||||
import RenderHtml from '../../../components/render-html';
|
||||
import { getSourceDetail } from '../api';
|
||||
import { Link } from 'react-router-dom';
|
||||
import axios from 'axios';
|
||||
import { Base64 } from 'js-base64';
|
||||
import { httpUrl } from '../fetch';
|
||||
import { AlignCenter, FlexAJ } from '../../Component/layout';
|
||||
import SourceIcon from '../img/sourceIcon.png';
|
||||
|
|
@ -16,6 +13,7 @@ function SourceDetail(props){
|
|||
const { deptId , sourceid } = props.match.params;
|
||||
const [ detail , setDetail ] = useState(undefined);
|
||||
const zonedetail = props.data;
|
||||
const {temp} = props;
|
||||
|
||||
useEffect(()=>{
|
||||
if(sourceid){
|
||||
|
|
@ -69,7 +67,9 @@ function SourceDetail(props){
|
|||
</FlexAJ>
|
||||
{detail.createUser && detail.createUser.avatar && <Link to={`/${detail.createUser.userName}`}><img alt='' src={detail.createUser.avatar} className='publicUserAvatar mr10'/></Link>}
|
||||
{detail.createUser && <Link className='mr20' to={`/${detail.createUser.userName}`}>{detail.createUser.nickName}</Link>}
|
||||
<span>发布于{detail.updateTime || detail.createTime}</span>
|
||||
<span className='mr20'>发布于{detail.updateTime || detail.createTime}</span>
|
||||
{detail.auditStatus === '0' && <Badge color={temp === "zone" ? "#466aff" : "#089f7f"} text="待审核" className='pass'/> }
|
||||
{detail.auditStatus === '2' && <Badge color="#eb1212" text="未通过" className='failed'/> }
|
||||
</div>
|
||||
<div className='pb20'>{detail.summary}</div>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -28,6 +28,12 @@
|
|||
background-color: var(--primary-color);
|
||||
}
|
||||
}
|
||||
.hoverThemeColorBut{
|
||||
&:hover, &:active, &:focus{
|
||||
border-color: var(--light-color);
|
||||
color: var(--light-color);
|
||||
}
|
||||
}
|
||||
|
||||
.information_main{
|
||||
background-color:#f3f5f8;
|
||||
|
|
@ -568,7 +574,7 @@
|
|||
align-items: center;
|
||||
height: 20px;
|
||||
overflow: visible;
|
||||
color: #466aff;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
.headimg {
|
||||
width: 26px;
|
||||
|
|
@ -1547,7 +1553,7 @@
|
|||
button{
|
||||
border-color: var(--primary-color);
|
||||
color: var(--primary-color);
|
||||
&:hover{
|
||||
&:hover, &:active, &:focus{
|
||||
border-color: var(--light-color);
|
||||
color: var(--light-color);
|
||||
}
|
||||
|
|
@ -1562,6 +1568,12 @@
|
|||
padding: 30px 35px 50px;
|
||||
}
|
||||
}
|
||||
.editNewsMd .editormd-dialog-header{
|
||||
padding: 5px 20px;
|
||||
}
|
||||
.editNewsMd .number-input{
|
||||
width: 60px !important;
|
||||
}
|
||||
// 新增资源
|
||||
.sourceCreateBox{
|
||||
.sourceFilesBox{
|
||||
|
|
@ -1580,6 +1592,13 @@
|
|||
color: var(--primary-color)!important;
|
||||
}
|
||||
|
||||
.failed .ant-badge-status-text{
|
||||
color: #eb1212;
|
||||
}
|
||||
.pass .ant-badge-status-text{
|
||||
color: var(--primary-color);
|
||||
}
|
||||
|
||||
// --------------新建专区
|
||||
.applyBox{
|
||||
background-color: #fff;
|
||||
|
|
|
|||
|
|
@ -158,10 +158,10 @@ function Index(props){
|
|||
<li className={active === 7 ?"active":""}><Link to={`/settings/mybot`}><i className="iconfont icon-kaifabot mr5 font-18"></i><span className="text-shodow-bold">我的Bot</span></Link></li>
|
||||
<li className={active === 8 ?"active":""}><Link to={`/settings/installbot`}><i className="iconfont icon-BOTpeizhi mr5 font-17"></i><span className="text-shodow-bold">Bot安装</span></Link></li>
|
||||
</ul>
|
||||
<ul className="securityUl">
|
||||
{/* <ul className="securityUl">
|
||||
<li>个人建站</li>
|
||||
<li className={active === 9 ?"active":""}><Link to={`/settings/mysite`}><i className="iconfont icon-liebiaoicon mr5 font-15"></i><span className="text-shodow-bold">我的站点</span></Link></li>
|
||||
</ul>
|
||||
</ul> */}
|
||||
</div>
|
||||
<LongWidth>
|
||||
<Gap>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ function Main(props){
|
|||
<Link to={`/${owner}/${projectsId}/service/reposyncer`} className="btnhover">查看详情</Link>
|
||||
</span>
|
||||
</li> */}
|
||||
{projectDetail && projectDetail.author.type === "User" && <li>
|
||||
{/* {projectDetail && projectDetail.author.type === "User" && <li>
|
||||
<span className="servername">
|
||||
<img src={require('./img/logo.png')} alt=""/>
|
||||
<a onClick={openDetail}>个人建站服务</a>
|
||||
|
|
@ -73,7 +73,7 @@ function Main(props){
|
|||
<span className="serverbtn">
|
||||
<Link to={`/${owner}/${projectsId}/service/pages`} className="btnhover">查看详情</Link>
|
||||
</span>
|
||||
</li>}
|
||||
</li>} */}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ function Index(props){
|
|||
<Menu.Item key="3" className="font-16" onClick={()=>{props.history.push('/settings/phone')}}>手机号管理</Menu.Item>
|
||||
<Menu.Item key="0" className="font-16" onClick={()=>{props.history.push('/settings/emails')}}>邮箱管理</Menu.Item>
|
||||
<Menu.Item key="1" className="font-16" onClick={()=>{props.history.push('/settings/password')}}>密码管理</Menu.Item>
|
||||
<Menu.Item key="4" className="font-16" onClick={()=>{props.history.push('/settings/verification')}}>实名认证</Menu.Item>
|
||||
{/* <Menu.Item key="4" className="font-16" onClick={()=>{props.history.push('/settings/verification')}}>实名认证</Menu.Item> */}
|
||||
<Menu.Item key="2" className="font-16" onClick={()=>{props.history.push('/settings/cancel')}}>账号注销</Menu.Item>
|
||||
</Menu>}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue