forked from Gitlink/forgeplus-react
This commit is contained in:
parent
3148397343
commit
dd0a9e50e5
|
@ -80,6 +80,36 @@ class NewHeader extends Component {
|
|||
} catch (e) {}
|
||||
}
|
||||
|
||||
SearchInput = (open,item)=>{
|
||||
if(open){
|
||||
return(
|
||||
<div
|
||||
onBlur={() => {
|
||||
setTimeout(() => {
|
||||
this.setState({
|
||||
openSearch:false
|
||||
})
|
||||
}, 300)
|
||||
}}
|
||||
>
|
||||
<Search placeholder="实践课程/教学课堂/实践项目/交流问答"
|
||||
className={`search-input mr20`}
|
||||
onSearch={(value)=>this.onGlobalSearch(value,item)}
|
||||
autoFocus={true}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}else{
|
||||
return <i className="iconfont icon-sousuo font-18 color-grey-6 ml30" onClick={() => {
|
||||
this.setState({openSearch:true})
|
||||
}} />
|
||||
}
|
||||
}
|
||||
|
||||
onGlobalSearch=(value,item)=>{
|
||||
window.location.href=`${item && item.url}?value=` + value;
|
||||
}
|
||||
|
||||
openNotification = (messge) => {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
|
@ -294,8 +324,8 @@ class NewHeader extends Component {
|
|||
}
|
||||
|
||||
render() {
|
||||
const { match } = this.props;
|
||||
const current_user = this.props.user;
|
||||
const { match} = this.props;
|
||||
let current_user = this.props.user;
|
||||
let { Addcoursestypes,
|
||||
tojoinitemtype,
|
||||
tojoinclasstitle,
|
||||
|
@ -384,8 +414,8 @@ class NewHeader extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
let search_url = settings && settings.common && settings.common.search;
|
||||
let notice_url = settings && settings.common && settings.common.notice;
|
||||
let search_url = settings && settings.common && settings.common.length> 0 && settings.common.filter(item=>item.name==="搜索");
|
||||
let notice_url = settings && settings.common && settings.common.length> 0 && settings.common.filter(item=>item.name==="通知");
|
||||
return (
|
||||
<div className="newHeaders" id="nHeader">
|
||||
<div className="headerContent">
|
||||
|
@ -453,14 +483,14 @@ class NewHeader extends Component {
|
|||
{
|
||||
current_user && (current_user.main_site || current_user.login) && (settings && settings.add && settings.add.length>0)?
|
||||
<Dropdown overlay={this.addMenu(settings && settings.add)} placement="bottomRight">
|
||||
<i className="iconfont icon-tianjiafangda color-white ml30"></i>
|
||||
<i className="iconfont icon-tianjiafangda color-grey-6 ml30"></i>
|
||||
</Dropdown>:""
|
||||
}
|
||||
|
||||
{this.props.user && this.props.user.login && notice_url ?
|
||||
<div className="ml30 edu-menu-panel">
|
||||
{user && user.login &&
|
||||
<a href={`${notice_url}`} style={{ position: 'relative' }}>
|
||||
<a href={`${notice_url[0].url}`} style={{ position: 'relative' }}>
|
||||
<i className="iconfont icon-xiaoxilingdang color-grey-6"></i>
|
||||
<span className="newslight" style={{ display: this.props.Headertop === undefined ? "none" : this.props.Headertop.new_message === true ? "block" : "none" }}>
|
||||
</span>
|
||||
|
|
|
@ -147,12 +147,12 @@ class CoderRootCommit extends Component{
|
|||
<p className="f-wrap-alignCenter mt15">
|
||||
{
|
||||
item.id ?
|
||||
<Link to={`/${item.login}`} className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<Link to={`/users/${item.login}`} className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`images/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<label className="font-14 color-grey-6" style={{verticalAlign:'middle'}}>{item.name ?`${item.name}:`:""}提交于 {item.time_from_now}</label>
|
||||
</Link>:
|
||||
<span className="show-user-link">
|
||||
{item.image_url?<img src={getImageUrl(`/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
{item.image_url?<img src={getImageUrl(`images/${item.image_url}`)} alt="" width="28px" height="28px" className="mr15 radius"/>:""}
|
||||
<label className="font-14 color-grey-6" style={{verticalAlign:'middle'}}>{item.name ?`${item.name}:`:""}提交于 {item.time_from_now}</label>
|
||||
</span>
|
||||
}
|
||||
|
|
|
@ -1,66 +1,28 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import './Index.scss';
|
||||
import { AlignCenter, Blueback , FlexAJ } from '../Component/layout';
|
||||
import { Dropdown, Input , Menu , Pagination, Spin , Popconfirm, Button } from 'antd';
|
||||
import { Blueback , FlexAJ } from '../Component/layout';
|
||||
import { Dropdown, Input , Menu , Pagination } from 'antd';
|
||||
import { Link } from 'react-router-dom';
|
||||
import UploadSource from './UploadSource';
|
||||
import AddTag from './AddTag';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import Nodata from '../Nodata';
|
||||
import axios from 'axios';
|
||||
|
||||
const { Search } = Input;
|
||||
const sort = [
|
||||
"按上传时间排序",
|
||||
"按下载次数排序"
|
||||
"按下载次数排序",
|
||||
"按引用排序"
|
||||
]
|
||||
const limit = 15;
|
||||
const https = 'https://testfiles.trustie.net';
|
||||
function Index(props){
|
||||
const [ sortValue , setSortValue ] = useState(0);
|
||||
const [ page , setPage ] = useState(1);
|
||||
const [ total , setTotal ] = useState(0);
|
||||
const [ search , setSearch ] = useState(undefined);
|
||||
const [ data , setData ] = useState(undefined);
|
||||
const [ isSpin , setIsSpin ] = useState(true);
|
||||
const [ error , setError ] = useState(false);
|
||||
const [ attachments , setAttachments ] = useState(undefined);
|
||||
|
||||
const [ id , setId ] = useState(undefined);
|
||||
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ addVisible , setAddVisible ] = useState(false);
|
||||
|
||||
const repo_id = props.projectDetail && props.projectDetail.repo_id;
|
||||
const owner = props.match.params.owner;
|
||||
const current_user = props.current_user;
|
||||
|
||||
useEffect(()=>{
|
||||
if(owner && repo_id){
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
},[repo_id,owner,search,sortValue,page])
|
||||
|
||||
function getData(){
|
||||
const url = https +`/api/project/achievement/`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
projectId:repo_id,
|
||||
curPage:page,
|
||||
pageSize:limit,
|
||||
name:search,
|
||||
sort:sortValue+1,
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
setData(result.data.data.rows);
|
||||
setTotal(result.data.data.total);
|
||||
setIsSpin(false);
|
||||
setError(false);
|
||||
}
|
||||
}).catch(error=>{setIsSpin(false);setError(true);})
|
||||
}
|
||||
},[search,sort,page])
|
||||
|
||||
// 搜索
|
||||
function onSearch(value){
|
||||
|
@ -78,122 +40,31 @@ function Index(props){
|
|||
{
|
||||
sort && sort.map((item,key)=>{
|
||||
return(
|
||||
<Menu.Item onClick={(e)=>changeSort(e,key)} value={key} className={key=== sortValue ?"color-blue":""}>{item}</Menu.Item>
|
||||
<Menu.Item onClick={(e)=>changeSort(e,key)} value={key} className={key === sortValue ?"color-blue":""}>{item}</Menu.Item>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Menu>
|
||||
)
|
||||
|
||||
function listmenu(id,attachments,isPublic){
|
||||
return(
|
||||
<Menu>
|
||||
<Menu.Item onClick={()=>{setId(id);setVisible(true);setAttachments(attachments)}}>更新版本</Menu.Item>
|
||||
<Menu.Item onClick={()=>changeStatus(id,isPublic===1?0:1)}>{isPublic === 1 ? "设为私有":"设为公开"}</Menu.Item>
|
||||
<Menu.Item onClick={()=>deleteSourceFunc(id)}>删除资源</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
}
|
||||
// 更细私有状态
|
||||
function changeStatus(id,isPublic){
|
||||
const url = https+`/api/project/achievement/updateStatus`;
|
||||
axios.put(url,{
|
||||
id,status:isPublic
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
props.showNotification(`资源${isPublic === 1 ? "设为公开":"设为私有"}成功!`);
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
}).catch({})
|
||||
}
|
||||
const listmenu=(
|
||||
<Menu>
|
||||
<Menu.Item>更新版本</Menu.Item>
|
||||
<Menu.Item>设为私有</Menu.Item>
|
||||
<Menu.Item>删除资源</Menu.Item>
|
||||
</Menu>
|
||||
)
|
||||
|
||||
// 删除资源方法
|
||||
function deleteSourceFunc(id){
|
||||
props.confirm({
|
||||
content: "是否确认删除所选资源文件?",
|
||||
onOk: () => {
|
||||
const url = https + `/api/project/achievement/${id}`;
|
||||
axios.delete(url).then(result=>{
|
||||
if(result && result.data && result.data.code === "1"){
|
||||
props.showNotification("资源删除成功");
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
// 上传资源成功
|
||||
function onOk(){
|
||||
setVisible(false);
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
|
||||
// 确认删除标签
|
||||
function removeTagFunc(id,tag){
|
||||
const url = https + `/api/project/achievement/deleteTag`;
|
||||
axios.delete(url,{
|
||||
params:{id,tagName:tag}
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
props.showNotification("标签删除成功");
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
}).then(error=>{})
|
||||
}
|
||||
|
||||
function addPanel(id){
|
||||
setAddVisible(true);
|
||||
setId(id);
|
||||
}
|
||||
|
||||
function onCancelAdd(){
|
||||
setId(undefined);
|
||||
setAddVisible(false);
|
||||
}
|
||||
|
||||
// 添加标签
|
||||
function sureAddTag(values){
|
||||
const url = https+`/api/project/achievement/addTag?id=`+id+`&tagName=`+values.tagName;
|
||||
axios.put(url).then(result=>{
|
||||
if(result){
|
||||
setId(undefined);
|
||||
setAddVisible(false);
|
||||
setIsSpin(true);
|
||||
getData();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="sourcePanel">
|
||||
<AddTag
|
||||
visible={addVisible}
|
||||
onCancel={onCancelAdd}
|
||||
onOk={sureAddTag}
|
||||
/>
|
||||
<UploadSource
|
||||
visible={visible}
|
||||
onCancel={()=>setVisible(false)}
|
||||
onOk={onOk}
|
||||
showNotification={props.showNotification}
|
||||
owner={owner}
|
||||
projectsId={repo_id}
|
||||
id={id}
|
||||
attachments={attachments}
|
||||
/>
|
||||
<UploadSource visible={visible} onCancel={()=>setVisible(false)} onOk={onOk}/>
|
||||
<div className="headtitle">
|
||||
<FlexAJ>
|
||||
<span className="font-18">资源库{total ? <span>({total})</span>:""}</span>
|
||||
{ current_user && current_user.login && (props.projectDetail && props.projectDetail.permission) ?
|
||||
<Blueback onClick={()=>{setId(undefined);setVisible(true);}}>上传资源</Blueback>:""
|
||||
}
|
||||
<span className="font-18">资源库(18)</span>
|
||||
<Blueback onClick={()=>setVisible(true)}>上传资源</Blueback>
|
||||
</FlexAJ>
|
||||
</div>
|
||||
<FlexAJ className="subHeadtitle">
|
||||
|
@ -208,65 +79,30 @@ function Index(props){
|
|||
<span className="color-grey-9">{sort[sortValue]}<i className="iconfont icon-sanjiaoxing-down font-16 color-grey-9 ml3"></i></span>
|
||||
</Dropdown>
|
||||
</FlexAJ>
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="bodycontent">
|
||||
{
|
||||
data && data.length> 0 &&
|
||||
<ul className="bodycontentul">
|
||||
{
|
||||
data.map((item,key)=>{
|
||||
return(
|
||||
<li>
|
||||
<Link to= {`/${item.login}`} className="infoImg"><img src={getImageUrl(`/${item.imageUrl}`)} alt="" /></Link>
|
||||
<div style={{flex:'1',width:"0"}}>
|
||||
<FlexAJ>
|
||||
<AlignCenter>
|
||||
<a href={https+`/busiAttachments/download/${item.attachId}`} download className="infoname">{item.fileName}</a>
|
||||
<a href={https + `/busiAttachments/view/${item.attachId}`}><i className="iconfont icon-shenqinggongkai font-15 ml10 color-grey-9"></i></a>
|
||||
{item.isPublic === 0 && <span className="privateTip">私有</span>}
|
||||
</AlignCenter>
|
||||
{ current_user && current_user.login &&
|
||||
<Dropdown overlay={()=>listmenu(item.id,item.attachments,item.isPublic)} placement={'bottomRight'}>
|
||||
<i className="iconfont icon-gengduo1 color-grey-6"></i>
|
||||
</Dropdown>
|
||||
}
|
||||
</FlexAJ>
|
||||
<p className="infos">
|
||||
<span>上传时间:<span>{item.uploadTime}</span></span>
|
||||
<span>文件大小:<span>{item.fileSize}</span></span>
|
||||
<span>下载:<span>{item.download}</span></span>
|
||||
</p>
|
||||
<p className="infodesc task-hide-2">{item.remark}</p>
|
||||
<div className="infotag">
|
||||
{
|
||||
item.tags && item.tags.length>0 && item.tags.map((i,k)=>{
|
||||
return(
|
||||
<span>{i}
|
||||
{
|
||||
current_user && (current_user.login === item.login) ?
|
||||
<Popconfirm title="确定要删除当前标签?" onConfirm={()=>removeTagFunc(item.id,i)} okText="是" cancelText="否">
|
||||
<i className="iconfont icon-guanbi font-12 ml2"></i>
|
||||
</Popconfirm>:""
|
||||
}
|
||||
</span>
|
||||
)
|
||||
})
|
||||
}
|
||||
{
|
||||
current_user && (current_user.login === item.login) &&
|
||||
<a className="color-blue font-12" onClick={()=>addPanel(item.id)} style={{height:"20px",lineHeight:"20px"}}>+新增标签</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
{
|
||||
((data && data.length === 0) || error) && <Nodata _html="暂无数据"/>
|
||||
}
|
||||
<div className="bodycontent">
|
||||
<ul className="bodycontentul">
|
||||
<li>
|
||||
<Link to= {`/users/`} className="infoImg"><img src={`https://testforgeplus.trustie.net/images/avatars/User/b`} alt="" /></Link>
|
||||
<div style={{flex:'1',width:"0"}}>
|
||||
<FlexAJ>
|
||||
<a href={``} className="infoname">DaVinci.fdb</a>
|
||||
<Dropdown overlay={listmenu} placement={'bottomRight'}>
|
||||
<i className="iconfont icon-gengduo1 color-grey-6"></i>
|
||||
</Dropdown>
|
||||
</FlexAJ>
|
||||
<p className="infos">
|
||||
<span>上传时间:<span>2021-03-30</span></span>
|
||||
<span>上传类型:<span>软件版本</span></span>
|
||||
<span>文件大小:<span>10KB</span></span>
|
||||
<span>下载:<span>111</span></span>
|
||||
</p>
|
||||
<p className="infodesc task-hide-2">资源描述资源描述资源描述资源描述资源描述资源描述资源描述</p>
|
||||
<div className="infotag">
|
||||
<span>软件版本<i className="iconfont icon-guanbi font-12 ml2"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{
|
||||
total > limit &&
|
||||
<div className="pt20 pb20 edu-txt-center">
|
||||
|
@ -280,7 +116,6 @@ function Index(props){
|
|||
</div>
|
||||
}
|
||||
</div>
|
||||
</Spin>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
}
|
||||
.bodycontent{
|
||||
padding:0px 20px;
|
||||
min-height: 500px;
|
||||
& > ul.bodycontentul > li{
|
||||
display: flex;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
@ -41,16 +40,6 @@
|
|||
.infoname{
|
||||
font-size: 16px;
|
||||
}
|
||||
.privateTip{
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
background-color: orange;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
padding:0px 3px;
|
||||
color: #fff;
|
||||
}
|
||||
.infos{
|
||||
& > span{
|
||||
margin-right: 20px;
|
||||
|
@ -84,26 +73,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.versionTable{
|
||||
.currentTip{
|
||||
display: block;
|
||||
padding:0px 3px;
|
||||
border-radius: 2px;
|
||||
border:1px solid #68c7ec;
|
||||
font-size: 12px;
|
||||
color: #68c7ec;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
.ant-table-body{
|
||||
margin:0px!important;
|
||||
thead{
|
||||
background-color: #eee;
|
||||
}
|
||||
thead >tr >th,tbody > tr > td{
|
||||
padding:4px 5px!important;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,150 +1,22 @@
|
|||
import React , { forwardRef, useEffect, useState } from 'react';
|
||||
import { Modal , Form , Checkbox , Input , Table } from 'antd';
|
||||
import Upload from './Upload';
|
||||
import { AlignCenter } from '../Component/layout';
|
||||
import axios from 'axios';
|
||||
const { TextArea } = Input;
|
||||
import React from 'react';
|
||||
import { Modal } from 'antd';
|
||||
|
||||
const https = 'https://testfiles.trustie.net';
|
||||
function UploadSource({ form , visible , onCancel , onOk , showNotification , attachments , id ,owner,projectsId}){
|
||||
const [ tableData , setTableData ] = useState(undefined);
|
||||
const [ fileId , setFilesId ] = useState(undefined);
|
||||
const [ fileName , setFileName ] = useState(undefined);
|
||||
const { getFieldDecorator, validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
if(id && attachments){
|
||||
setTableData(attachments);
|
||||
}
|
||||
},[id,attachments])
|
||||
// 上传附件后得到的文件id数组
|
||||
function UploadFunc(id,name){
|
||||
setFilesId(id);
|
||||
setFileName(name);
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
dataIndex:"fileName",
|
||||
key:"fileName",
|
||||
title:"资源名称",
|
||||
width:"42%",
|
||||
ellipsis:true,
|
||||
render:(value,item,key)=>{
|
||||
return <AlignCenter>
|
||||
<div className="task-hide" style={{maxWidth:key===0 ? "240px":"100%"}}>{value}</div>
|
||||
{ key === 0 && <span className="currentTip">当前版本</span> }
|
||||
</AlignCenter>
|
||||
}
|
||||
},
|
||||
{
|
||||
dataIndex:"downloads",
|
||||
key:"downloads",
|
||||
title:"下载数",
|
||||
width:"14%",
|
||||
className:"edu-txt-center"
|
||||
},
|
||||
{
|
||||
dataIndex:"fileSizeString",
|
||||
key:"fileSizeString",
|
||||
title:"文件大小",
|
||||
width:"16%",
|
||||
className:"edu-txt-center"
|
||||
},
|
||||
{
|
||||
dataIndex:"createdAt",
|
||||
key:"createdAt",
|
||||
title:"上传时间",
|
||||
}
|
||||
]
|
||||
|
||||
// 确定
|
||||
function submit(){
|
||||
if(fileId){
|
||||
validateFields((error,values)=>{
|
||||
if(!error){
|
||||
postInfo(values);
|
||||
}
|
||||
})
|
||||
}else{
|
||||
showNotification("请先上传文件!");
|
||||
}
|
||||
}
|
||||
|
||||
function postInfo(values){
|
||||
const url = https+`/api/project/achievement/`;
|
||||
if(id){
|
||||
// 修改
|
||||
axios.put(url,{
|
||||
id,fileName,fileId:`${fileId}`,
|
||||
remark:values.remark
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
onOk();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}else{
|
||||
// 上传
|
||||
axios.post(url,{
|
||||
fileId:`${fileId}`,
|
||||
fileName,
|
||||
login:owner,
|
||||
projectId:projectsId,
|
||||
...values
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
onOk();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
}
|
||||
function UploadSource({ visible , onCancel , onOk }){
|
||||
return(
|
||||
<Modal
|
||||
title={id?"更新资源版本":"上传资源"}
|
||||
title={"上传资源"}
|
||||
closable={false}
|
||||
visible={visible}
|
||||
onCancel={onCancel}
|
||||
onOk={submit}
|
||||
onOk={onOk}
|
||||
cancelText="取消"
|
||||
okText="确定"
|
||||
width="600px"
|
||||
centered
|
||||
>
|
||||
<div>
|
||||
<Form>
|
||||
{id && <Table className="versionTable mb20" columns={columns} dataSource={tableData} pagination={false} size={"small"}/> }
|
||||
<Form.Item style={{display:id?"none":"block"}}>
|
||||
{getFieldDecorator("tagNames",{
|
||||
rules:[]
|
||||
})(
|
||||
<Checkbox.Group>
|
||||
<Checkbox value="软件版本">软件版本</Checkbox>
|
||||
<Checkbox value="文档">文档</Checkbox>
|
||||
<Checkbox value="代码">代码</Checkbox>
|
||||
<Checkbox value="媒体">媒体</Checkbox>
|
||||
<Checkbox value="论文">论文</Checkbox>
|
||||
<Checkbox value="其它">其它</Checkbox>
|
||||
</Checkbox.Group>
|
||||
)}
|
||||
</Form.Item>
|
||||
<Upload
|
||||
className="commentStyle"
|
||||
load={UploadFunc}
|
||||
size={100}
|
||||
showNotification={showNotification}
|
||||
actionUrl= {https}
|
||||
/>
|
||||
<Form.Item className="mt20">
|
||||
{getFieldDecorator("remark",{
|
||||
rules:[]
|
||||
})(
|
||||
<TextArea rows={4} placeholder="请输入资源描述" />
|
||||
)}
|
||||
</Form.Item>
|
||||
</Form>
|
||||
</div>
|
||||
<div></div>
|
||||
</Modal>
|
||||
)
|
||||
}
|
||||
export default Form.create()(forwardRef(UploadSource));;
|
||||
export default UploadSource;
|
||||
|
|
|
@ -321,8 +321,8 @@ class LoginDialog extends Component {
|
|||
return flag;
|
||||
}
|
||||
componentDidMount() {
|
||||
//true为PC端,false为手机端
|
||||
let flag = this.IsPC();
|
||||
|
||||
let flag = this.IsPC(); //true为PC端,false为手机端
|
||||
this.setState({
|
||||
isphone: flag
|
||||
})
|
||||
|
@ -458,6 +458,7 @@ class LoginDialog extends Component {
|
|||
let { login, isGoing, isGoingValue, disabled , Phonenumberisnotco , dialogBox, isRender, weixinlogin } = this.state;
|
||||
let { settings } = this.props;
|
||||
|
||||
let { settings } = this.props;
|
||||
if (isRender === undefined) {
|
||||
isRender = false
|
||||
}
|
||||
|
|
|
@ -752,7 +752,7 @@ class NewHeader extends Component {
|
|||
<div className="head-right">
|
||||
{this.props.user && this.props.user.login &&
|
||||
<div className="edu-menu-panel">
|
||||
<i className="iconfont icon-tianjiafangda color-white"></i>
|
||||
<i className="iconfont icon-tianjiafangda color-grey-6"></i>
|
||||
<div className="edu-menu-list" style={{ top: '48px' }}>
|
||||
<div className="overPart"></div>
|
||||
{
|
||||
|
@ -774,7 +774,7 @@ class NewHeader extends Component {
|
|||
<div className="ml30 edu-menu-panel">
|
||||
{user && user.login &&
|
||||
<a href={`${settings && settings.new_course && settings.new_course.tiding_url}`} style={{ position: 'relative' }} target="_blank">
|
||||
<i className="iconfont icon-xiaoxilingdang color-white"></i>
|
||||
<i className="iconfont icon-xiaoxilingdang color-grey-6"></i>
|
||||
<span className="newslight" style={{ display: this.props.Headertop === undefined ? "none" : this.props.Headertop.new_message === true ? "block" : "none" }}>
|
||||
</span>
|
||||
</a>
|
||||
|
@ -810,7 +810,7 @@ class NewHeader extends Component {
|
|||
</div>
|
||||
{user === undefined ?
|
||||
<span className="font-15">
|
||||
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
||||
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-6">登录</a>
|
||||
{
|
||||
settings && settings.common && settings.common.register &&
|
||||
<span><em className="vertical-line"></em><a className="ml5 color-grey-6 3333" href={`${settings.common.register}`} target="_blank">注册</a></span>
|
||||
|
@ -818,7 +818,7 @@ class NewHeader extends Component {
|
|||
</span>
|
||||
: user.login === "" ?
|
||||
<span className="font-15">
|
||||
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
||||
<a onClick={() => this.educoderlogin()} className="mr5 color-grey-6">登录</a>
|
||||
{
|
||||
settings && settings.common && settings.common.register &&
|
||||
<span><em className="vertical-line"></em><a className="color-grey-6 ml5 111" href={`${settings.common.register}`} target="_blank">注册</a></span>
|
||||
|
|
Loading…
Reference in New Issue