Merge pull request '首页相关需求、issues修改' (#256) from caishi/forgeplus-react:gitlink_server into gitlink_server
|
@ -137,7 +137,7 @@ class App extends Component {
|
||||||
this.unlisten = this.props.history.listen((location) => {
|
this.unlisten = this.props.history.listen((location) => {
|
||||||
let newPathname = location.pathname.split('/')[1];
|
let newPathname = location.pathname.split('/')[1];
|
||||||
if (this.state.pathName !== newPathname) {
|
if (this.state.pathName !== newPathname) {
|
||||||
// this.setState({ pathType: '' });
|
this.setState({ pathType: '' });
|
||||||
newPathname && this.getPathnameType(newPathname);
|
newPathname && this.getPathnameType(newPathname);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -25,7 +25,7 @@ if (isDev) {
|
||||||
}
|
}
|
||||||
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' :
|
||||||
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
window.location.search.indexOf('debug=s') !== -1 ? 'student' :
|
||||||
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin'
|
window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || ''
|
||||||
}
|
}
|
||||||
window._debugType = debugType;
|
window._debugType = debugType;
|
||||||
export function initAxiosInterceptors(props) {
|
export function initAxiosInterceptors(props) {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import AccountProfile from "../../modules/user/AccountProfile";
|
||||||
import { getImageUrl } from 'educoder'
|
import { getImageUrl } from 'educoder'
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import cookie from 'react-cookies';
|
import cookie from 'react-cookies';
|
||||||
import { Input , notification , Dropdown ,Popover, Menu,Badge, Button } from 'antd';
|
import { notification , Dropdown ,Popover, Menu,Badge } from 'antd';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import LoginDialog from '../../modules/login/LoginDialog';
|
import LoginDialog from '../../modules/login/LoginDialog';
|
||||||
|
@ -15,9 +15,8 @@ import CheckProfile from '../Component/ProfileModal/Profile';
|
||||||
|
|
||||||
import './header.scss';
|
import './header.scss';
|
||||||
import NoticeContent from './NoticeContent';
|
import NoticeContent from './NoticeContent';
|
||||||
const $ = window.$
|
import MainLogo from './img/logo.png';
|
||||||
// TODO 这部分脚本从公共脚本中直接调用
|
// TODO 这部分脚本从公共脚本中直接调用
|
||||||
const { Search } = Input;
|
|
||||||
let old_url;
|
let old_url;
|
||||||
|
|
||||||
window._header_componentHandler = null;
|
window._header_componentHandler = null;
|
||||||
|
@ -57,26 +56,26 @@ class NewHeader extends Component {
|
||||||
window._header_componentHandler = this;
|
window._header_componentHandler = this;
|
||||||
|
|
||||||
//下拉框的显示隐藏
|
//下拉框的显示隐藏
|
||||||
var hoverTimeout;
|
// var hoverTimeout;
|
||||||
var hoveredPanel;
|
// var hoveredPanel;
|
||||||
$(".edu-menu-panel").hover(function () {
|
// $(".edu-menu-panel").hover(function () {
|
||||||
if (hoverTimeout) { // 一次只显示一个panel
|
// if (hoverTimeout) { // 一次只显示一个panel
|
||||||
if (hoveredPanel && hoveredPanel !== this) {
|
// if (hoveredPanel && hoveredPanel !== this) {
|
||||||
$(hoveredPanel).find(".edu-menu-list").hide()
|
// $(hoveredPanel).find(".edu-menu-list").hide()
|
||||||
}
|
// }
|
||||||
clearTimeout(hoverTimeout);
|
// clearTimeout(hoverTimeout);
|
||||||
hoverTimeout = null;
|
// hoverTimeout = null;
|
||||||
}
|
// }
|
||||||
hoveredPanel = this;
|
// hoveredPanel = this;
|
||||||
$(this).find(".edu-menu-list").show();
|
// $(this).find(".edu-menu-list").show();
|
||||||
}, function () {
|
// }, function () {
|
||||||
var that = this;
|
// var that = this;
|
||||||
// 延迟hide
|
// // 延迟hide
|
||||||
hoverTimeout = setTimeout(function () {
|
// hoverTimeout = setTimeout(function () {
|
||||||
$(that).find(".edu-menu-list").hide();
|
// $(that).find(".edu-menu-list").hide();
|
||||||
}, 800)
|
// }, 800)
|
||||||
|
|
||||||
});
|
// });
|
||||||
//获取游览器地址
|
//获取游览器地址
|
||||||
try {
|
try {
|
||||||
window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href))
|
window.sessionStorage.setItem("yslgeturls", JSON.stringify(window.location.href))
|
||||||
|
@ -286,92 +285,90 @@ class NewHeader extends Component {
|
||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { match ,resetUserInfo ,showNotification,publicNav} = this.props;
|
const { resetUserInfo ,showNotification,publicNav} = this.props;
|
||||||
let current_user = this.props.user;
|
let current_user = this.props.user;
|
||||||
let {
|
let {
|
||||||
AccountProfiletype,
|
AccountProfiletype,
|
||||||
user,
|
user,
|
||||||
isRender,
|
isRender,
|
||||||
headtypesonClickbool,
|
|
||||||
headtypess,
|
|
||||||
settings,
|
settings,
|
||||||
visible,
|
visible,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
/*用户名称 用户头像url*/
|
/*用户名称 用户头像url*/
|
||||||
let activeIndex = false;
|
// let activeIndex = false;
|
||||||
let activeForums = false;
|
// let activeForums = false;
|
||||||
let activeShixuns = false;
|
// let activeShixuns = false;
|
||||||
let activePaths = false;
|
// let activePaths = false;
|
||||||
let coursestype = false;
|
// let coursestype = false;
|
||||||
let activePackages = false;
|
// let activePackages = false;
|
||||||
let activeMoopCases = false;
|
// let activeMoopCases = false;
|
||||||
let activeCompetitions = false;
|
// let activeCompetitions = false;
|
||||||
|
|
||||||
if (match.path === '/forums') {
|
// if (match.path === '/forums') {
|
||||||
activeForums = true;
|
// activeForums = true;
|
||||||
} else if (match.path.startsWith('/shixuns')) {
|
// } else if (match.path.startsWith('/shixuns')) {
|
||||||
activeShixuns = true;
|
// activeShixuns = true;
|
||||||
} else if (match.path.startsWith('/paths')) {
|
// } else if (match.path.startsWith('/paths')) {
|
||||||
activePaths = true;
|
// activePaths = true;
|
||||||
} else if (match.path.startsWith('/courses')) {
|
// } else if (match.path.startsWith('/courses')) {
|
||||||
coursestype = true;
|
// coursestype = true;
|
||||||
} else if (match.path.startsWith('/crowdsourcing')) {
|
// } else if (match.path.startsWith('/crowdsourcing')) {
|
||||||
activePackages = true;
|
// activePackages = true;
|
||||||
} else if (match.path.startsWith('/moop_cases')) {
|
// } else if (match.path.startsWith('/moop_cases')) {
|
||||||
activeMoopCases = true;
|
// activeMoopCases = true;
|
||||||
} else if (match.path.startsWith('/competitions')) {
|
// } else if (match.path.startsWith('/competitions')) {
|
||||||
activeCompetitions = true;
|
// activeCompetitions = true;
|
||||||
} else {
|
// } else {
|
||||||
activeIndex = true;
|
// activeIndex = true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
let headtypes = '/';
|
// let headtypes = '/';
|
||||||
if (settings) {
|
// if (settings) {
|
||||||
if (settings.navbar) {
|
// if (settings.navbar) {
|
||||||
if (settings.navbar.length > 0) {
|
// if (settings.navbar.length > 0) {
|
||||||
if (match.path === '/') {
|
// if (match.path === '/') {
|
||||||
if (headtypesonClickbool === false) {
|
// if (headtypesonClickbool === false) {
|
||||||
headtypes = undefined;
|
// headtypes = undefined;
|
||||||
} else {
|
// } else {
|
||||||
headtypes = headtypess;
|
// headtypes = headtypess;
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
for (var i = 0; i < settings.navbar.length; i++) {
|
// for (var i = 0; i < settings.navbar.length; i++) {
|
||||||
if (match.path === settings.navbar[i].link) {
|
// if (match.path === settings.navbar[i].link) {
|
||||||
headtypes = settings.navbar[i].link;
|
// headtypes = settings.navbar[i].link;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
let shixuntype = false;
|
// let shixuntype = false;
|
||||||
let pathstype = false;
|
// let pathstype = false;
|
||||||
let coursestypes = false;
|
// let coursestypes = false;
|
||||||
if (this.props && this.props.mygetHelmetapi != null) {
|
// if (this.props && this.props.mygetHelmetapi != null) {
|
||||||
let shixun = "/shixuns";
|
// let shixun = "/shixuns";
|
||||||
let paths = "/paths";
|
// let paths = "/paths";
|
||||||
let courses = "/courses";
|
// let courses = "/courses";
|
||||||
this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => {
|
// this.props.mygetHelmetapi && this.props.mygetHelmetapi.navbar && this.props.mygetHelmetapi.navbar.map((item, key) => {
|
||||||
var reg = RegExp(item.link);
|
// var reg = RegExp(item.link);
|
||||||
if (shixun.match(reg)) {
|
// if (shixun.match(reg)) {
|
||||||
if (item.hidden === true) {
|
// if (item.hidden === true) {
|
||||||
shixuntype = true
|
// shixuntype = true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (paths.match(reg)) {
|
// if (paths.match(reg)) {
|
||||||
if (item.hidden === true) {
|
// if (item.hidden === true) {
|
||||||
pathstype = true
|
// pathstype = true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (courses.match(reg)) {
|
// if (courses.match(reg)) {
|
||||||
if (item.hidden === true) {
|
// if (item.hidden === true) {
|
||||||
coursestypes = true
|
// coursestypes = true
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
|
|
||||||
let search_url = settings && settings.common && settings.common.search;
|
let search_url = settings && settings.common && settings.common.search;
|
||||||
return (
|
return (
|
||||||
|
@ -390,6 +387,12 @@ class NewHeader extends Component {
|
||||||
{...this.props}
|
{...this.props}
|
||||||
{...this.state}
|
{...this.state}
|
||||||
/> : ""}
|
/> : ""}
|
||||||
|
{
|
||||||
|
publicNav &&
|
||||||
|
<a href={'https://www.ccf.org.cn/'} className={"fl pr15"}>
|
||||||
|
<img src={MainLogo} alt="" style={{ heigth: "40px" }}/>
|
||||||
|
</a>
|
||||||
|
}
|
||||||
{
|
{
|
||||||
settings && settings.nav_logo_url ?
|
settings && settings.nav_logo_url ?
|
||||||
<a href={settings && settings.new_course.default_url} className={"fl mr50"} style={{minWidth:"45px"}}>
|
<a href={settings && settings.new_course.default_url} className={"fl mr50"} style={{minWidth:"45px"}}>
|
||||||
|
@ -468,8 +471,12 @@ class NewHeader extends Component {
|
||||||
<span className="font-15 ml30">
|
<span className="font-15 ml30">
|
||||||
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
<a onClick={() => this.educoderlogin()} className="mr5 color-white">登录</a>
|
||||||
{
|
{
|
||||||
settings && settings.common && settings.common.register &&
|
(settings && settings.common && settings.common.register) ?
|
||||||
<span><em className="vertical-line"></em><Link className="ml5 color-grey-6" to={`/register`}>注册</Link></span>
|
publicNav ?
|
||||||
|
<Link to={`/register`} className="regBtn">立即注册</Link>
|
||||||
|
:
|
||||||
|
<span><em className="vertical-line"></em><Link className="ml5 color-white" to={`/register`}>注册</Link></span>
|
||||||
|
:""
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
:
|
:
|
||||||
|
|
|
@ -343,4 +343,20 @@
|
||||||
a{
|
a{
|
||||||
color: #BDC2D1!important;
|
color: #BDC2D1!important;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.regBtn{
|
||||||
|
height: 40px;
|
||||||
|
background: #466AFF;
|
||||||
|
border-radius: 2px;
|
||||||
|
display: inline-block;
|
||||||
|
padding:0px 18px;
|
||||||
|
margin-left: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 400;
|
||||||
|
color: #FFFFFF!important;
|
||||||
|
line-height: 40px;
|
||||||
|
&:hover{
|
||||||
|
color: #FFFFFF!important;
|
||||||
|
background-color: #355CFF;
|
||||||
|
}
|
||||||
}
|
}
|
After Width: | Height: | Size: 2.6 KiB |
|
@ -41,7 +41,7 @@ function CoderDepotReadme({ operate , history , readme , ChangeFile }){
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<div className="commonBox readBox" id="readme">
|
<div className="commonBox readBox" id="readme">
|
||||||
<Anchor offsetTop={70}>
|
<Anchor offsetTop={58}>
|
||||||
<div className="commonBox-title boxTitle">
|
<div className="commonBox-title boxTitle">
|
||||||
<AlignCenter>
|
<AlignCenter>
|
||||||
<Dropdown overlay={menu()} trigger={['hover']} overlayClassName="menuslist">
|
<Dropdown overlay={menu()} trigger={['hover']} overlayClassName="menuslist">
|
||||||
|
|
|
@ -215,7 +215,7 @@ class CoderRootFileDetail extends Component {
|
||||||
const Option = Select.Option;
|
const Option = Select.Option;
|
||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<Anchor className="griditemAnchor" offsetTop={70}>
|
<Anchor className="griditemAnchor" offsetTop={58}>
|
||||||
<div className="griditemCate">
|
<div className="griditemCate">
|
||||||
{
|
{
|
||||||
md && readOnly &&
|
md && readOnly &&
|
||||||
|
|
|
@ -112,8 +112,8 @@ class MergeItem extends Component {
|
||||||
to={`/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${turnbar(item.pull_request_head)}`}
|
to={`/${item.is_original ? item.fork_project_user : owner}/${ item.is_original ? item.fork_project_identifier : projectsId }/tree/${turnbar(item.pull_request_head)}`}
|
||||||
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
|
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
|
||||||
>
|
>
|
||||||
{item.is_fork
|
{item.is_original
|
||||||
? item.pull_request_base
|
? item.fork_project_user_name
|
||||||
: item.author_name}
|
: item.author_name}
|
||||||
:{item.pull_request_head}
|
:{item.pull_request_head}
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -136,8 +136,7 @@ class MergeItem extends Component {
|
||||||
to={`/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`}
|
to={`/${owner}/${projectsId}/tree/${turnbar(item.pull_request_base)}`}
|
||||||
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
|
className="maxW200px task-hide ver-middle" style={{maxWidth:"200px"}}
|
||||||
>
|
>
|
||||||
{item.is_fork ? item.pull_request_base : `${item.author_name}:${item.pull_request_base}`}
|
{project_author_name}:{item.pull_request_base}
|
||||||
{/* {project_author_name}:{item.pull_request_base} */}
|
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,10 +365,10 @@ class MessageCount extends Component {
|
||||||
<div className="mt15">
|
<div className="mt15">
|
||||||
<Tag className="pr-branch-tag">
|
<Tag className="pr-branch-tag">
|
||||||
<Link
|
<Link
|
||||||
to={`/${data.pull_request.is_fork ? data.pull_request_base.fork_project_user : data.issue.author_name}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
|
to={`/${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author}/${data.pull_request.is_original?data.project_identifier:projectsId}/tree/${turnbar(data.pull_request && data.pull_request.head)}`}
|
||||||
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.pull_request.is_original ? data.pull_request.fork_project_user : data.issue.project_author_name}: ${data.pull_request && data.pull_request.head}`}
|
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.pull_request.is_original ? data.pull_request.fork_project_user_name : data.issue.author_name}: ${data.pull_request && data.pull_request.head}`}
|
||||||
>
|
>
|
||||||
{data.pull_request.is_fork ? data.pull_request_base.fork_project_user : data.issue.author_name}: {data.pull_request && data.pull_request.head}
|
{data.pull_request.is_original ? data.pull_request.fork_project_user_name : data.issue.author_name}: {data.pull_request && data.pull_request.head}
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
<span className="mr8 ver-middle">
|
<span className="mr8 ver-middle">
|
||||||
|
@ -383,7 +383,7 @@ class MessageCount extends Component {
|
||||||
to={`/${owner}/${projectsId}/tree/${data.pull_request.base}`}
|
to={`/${owner}/${projectsId}/tree/${data.pull_request.base}`}
|
||||||
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.issue.project_author_name}:${data.pull_request.base}`}
|
className="ver-middle task-hide" style={{maxWidth:"200px"}} title={`${data.issue.project_author_name}:${data.pull_request.base}`}
|
||||||
>
|
>
|
||||||
{data.issue.author_name}:{data.pull_request.base}
|
{data.issue.project_author_name}:{data.pull_request.base}
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -211,7 +211,7 @@ class MilepostDetail extends Component {
|
||||||
|
|
||||||
const { issue_chosen, issues, limit, page, search_count, data, isSpin , status_type } = this.state;
|
const { issue_chosen, issues, limit, page, search_count, data, isSpin , status_type } = this.state;
|
||||||
const { projectsId, meilid ,owner} = this.props.match.params;
|
const { projectsId, meilid ,owner} = this.props.match.params;
|
||||||
|
const { current_user , showLoginDialog , projectDetail } = this.props;
|
||||||
const menu = (
|
const menu = (
|
||||||
<Menu onClick={(e) => this.getOption(e)}>
|
<Menu onClick={(e) => this.getOption(e)}>
|
||||||
<Menu.Item key={'created_on'} value="desc">最新创建</Menu.Item>
|
<Menu.Item key={'created_on'} value="desc">最新创建</Menu.Item>
|
||||||
|
@ -239,8 +239,17 @@ class MilepostDetail extends Component {
|
||||||
<span className="font-weight-bold">{data && data.percent && data.percent.toFixed(2)}%完成 </span>
|
<span className="font-weight-bold">{data && data.percent && data.percent.toFixed(2)}%完成 </span>
|
||||||
</span>
|
</span>
|
||||||
<div className="milepostdiv">
|
<div className="milepostdiv">
|
||||||
<Link to={`/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
{
|
||||||
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建易修</CheckProfile>
|
(current_user && current_user.login) && ( projectDetail && projectDetail.permission && projectDetail.permission !== "Reporter") ?
|
||||||
|
<Link to={`/${owner}/${projectsId}/milestones/${meilid}/edit`} className="topWrapper_btn" style={{ marginRight: 15 }} >编辑里程碑</Link>
|
||||||
|
:""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
current_user && current_user.login ?
|
||||||
|
<CheckProfile {...this.props} sureFunc={()=>{this.props.history.push(`/${owner}/${projectsId}/issues/${meilid}/new`)}} className="topWrapper_btn">创建易修</CheckProfile>
|
||||||
|
:
|
||||||
|
<a className="topWrapper_btn" onClick={showLoginDialog}>创建易修</a>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</FlexAJ>
|
</FlexAJ>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -52,7 +52,7 @@ class OrderItem extends Component {
|
||||||
{current_user && current_user.login && checkbox}
|
{current_user && current_user.login && checkbox}
|
||||||
<div className="flex-1">
|
<div className="flex-1">
|
||||||
<p className="mb10 df" style={{alignItems:"center"}}>
|
<p className="mb10 df" style={{alignItems:"center"}}>
|
||||||
<Link to={`/${owner}/${projectsId}/issues/${item.id}`} target="_blank" title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link>
|
<Link to={`/${owner}/${projectsId}/issues/${item.id}`} title={item.name} className="hide-1 font-16 color-grey-3 lineh-30 mr10" style={{maxWidth:"370px"}}>{item.name}</Link>
|
||||||
{TagInfo(item.priority,"mr10")}
|
{TagInfo(item.priority,"mr10")}
|
||||||
</p>
|
</p>
|
||||||
<p className="color-grey-6 font-12">
|
<p className="color-grey-6 font-12">
|
||||||
|
|
|
@ -13,6 +13,7 @@ import { getImageUrl } from 'educoder';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
import './Index.scss';
|
import './Index.scss';
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
const MyNoticeIndex = Loadable({
|
const MyNoticeIndex = Loadable({
|
||||||
loader: () => import("./notice/myNotice/Index"),
|
loader: () => import("./notice/myNotice/Index"),
|
||||||
|
@ -43,10 +44,15 @@ const PrivateLetter = Loadable({
|
||||||
});
|
});
|
||||||
|
|
||||||
function Index(props){
|
function Index(props){
|
||||||
const { current_user,mygetHelmetapi } = props;
|
const { current_user,mygetHelmetapi , checkIfLogin } = props;
|
||||||
const { pathname } = props.location;
|
const { pathname } = props.location;
|
||||||
const notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
|
const notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice;
|
||||||
|
|
||||||
|
useEffect(()=>{
|
||||||
|
if(checkIfLogin() === false){
|
||||||
|
props.history.push('/login');
|
||||||
|
}
|
||||||
|
},[])
|
||||||
return(
|
return(
|
||||||
<div className="newMain clearfix whiteBack">
|
<div className="newMain clearfix whiteBack">
|
||||||
<div className="boies">
|
<div className="boies">
|
||||||
|
|
|
@ -191,6 +191,12 @@
|
||||||
.shortStyle{
|
.shortStyle{
|
||||||
.setStyleRule{
|
.setStyleRule{
|
||||||
min-height: 35px;
|
min-height: 35px;
|
||||||
|
#merge_whitelist_usernames{
|
||||||
|
li.ant-select-selection__choice{
|
||||||
|
margin-top: 0px!important;
|
||||||
|
margin-bottom: 3px!important;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.columsRadio{
|
.columsRadio{
|
||||||
display: block;
|
display: block;
|
||||||
|
|
Before Width: | Height: | Size: 345 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 5.3 MiB After Width: | Height: | Size: 632 KiB |
Before Width: | Height: | Size: 2.0 MiB After Width: | Height: | Size: 342 KiB |
After Width: | Height: | Size: 1018 B |
After Width: | Height: | Size: 1018 B |
|
@ -68,7 +68,7 @@ function Index(props) {
|
||||||
{/* <HeadNav {...props}/> */}
|
{/* <HeadNav {...props}/> */}
|
||||||
<TopEdition register={register} current_user={current_user}/>
|
<TopEdition register={register} current_user={current_user}/>
|
||||||
{
|
{
|
||||||
bannerTab && bannerTab.lenth > 0 ?
|
bannerTab && bannerTab.length > 0 ?
|
||||||
<ul className="topEditionUl">
|
<ul className="topEditionUl">
|
||||||
{
|
{
|
||||||
bannerTab.map((i,k)=>{
|
bannerTab.map((i,k)=>{
|
||||||
|
|
|
@ -63,9 +63,14 @@ body{
|
||||||
height: 100%;
|
height: 100%;
|
||||||
.regform{
|
.regform{
|
||||||
&>div{
|
&>div{
|
||||||
background-size:cover;
|
overflow: hidden;
|
||||||
background-position: center;
|
img{
|
||||||
background-repeat: no-repeat;
|
height: 100%;
|
||||||
|
width: 1920px;
|
||||||
|
position: relative;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -960px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.regPrg{
|
.regPrg{
|
||||||
|
@ -74,7 +79,7 @@ body{
|
||||||
width: 1200px;
|
width: 1200px;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
margin-left: -600px;
|
margin-left: -600px;
|
||||||
top:50%;
|
top:54%;
|
||||||
margin-top: -23px;
|
margin-top: -23px;
|
||||||
a{
|
a{
|
||||||
color: #fff!important;
|
color: #fff!important;
|
||||||
|
@ -87,6 +92,10 @@ body{
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
|
&:hover{
|
||||||
|
color: #FFFFFF!important;
|
||||||
|
background-color: #355CFF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -107,6 +116,8 @@ body{
|
||||||
&:hover{
|
&:hover{
|
||||||
.slick-arrow{
|
.slick-arrow{
|
||||||
display: block!important;
|
display: block!important;
|
||||||
|
cursor: pointer;
|
||||||
|
z-index: 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.slick-arrow{
|
.slick-arrow{
|
||||||
|
@ -142,6 +153,7 @@ body{
|
||||||
bottom: 25%;
|
bottom: 25%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: flex!important;
|
display: flex!important;
|
||||||
|
z-index: 2;
|
||||||
li{
|
li{
|
||||||
background-color: rgba(225,225,225,0.5);
|
background-color: rgba(225,225,225,0.5);
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -186,6 +198,7 @@ body{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
z-index: 3;
|
||||||
a{
|
a{
|
||||||
background-image: url('./Img/top-2.png');
|
background-image: url('./Img/top-2.png');
|
||||||
height: 139px;
|
height: 139px;
|
||||||
|
@ -660,6 +673,7 @@ body{
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
line-height: 39px;
|
line-height: 39px;
|
||||||
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
.thirdUl{
|
.thirdUl{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -667,13 +681,14 @@ body{
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
padding-bottom: 25px;
|
padding-bottom: 25px;
|
||||||
margin-bottom: 0px;
|
margin-bottom: 0px;
|
||||||
justify-content: space-between;
|
justify-content: center;
|
||||||
min-width: 1200px;
|
min-width: 1200px;
|
||||||
li{
|
li{
|
||||||
padding:0px 67px;
|
padding:0px 67px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: relative;
|
position: relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
width: 222px;
|
||||||
&:hover{
|
&:hover{
|
||||||
.hoverli1 img{
|
.hoverli1 img{
|
||||||
&:first-child{
|
&:first-child{
|
||||||
|
@ -719,12 +734,18 @@ body{
|
||||||
margin-left: -5px;
|
margin-left: -5px;
|
||||||
bottom: -25px;
|
bottom: -25px;
|
||||||
}
|
}
|
||||||
|
&.active,&:hover{
|
||||||
|
&>span{
|
||||||
|
font-size: 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
&>span{
|
&>span{
|
||||||
font-weight: 500;
|
font-weight: 400;
|
||||||
font-size: 22px;
|
font-size: 18px;
|
||||||
margin-top:10px;
|
margin-top:10px;
|
||||||
display: block;
|
display: block;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
|
text-align: center;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
}
|
}
|
||||||
&>div{
|
&>div{
|
||||||
|
@ -761,6 +782,7 @@ body{
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 75px!important;
|
margin-bottom: 75px!important;
|
||||||
|
opacity: 0.8;
|
||||||
&::after{
|
&::after{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
|
@ -769,6 +791,7 @@ body{
|
||||||
content: "";
|
content: "";
|
||||||
bottom: -20px;
|
bottom: -20px;
|
||||||
background-color: #466AFF;
|
background-color: #466AFF;
|
||||||
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ant-skeleton-title,.ant-skeleton-paragraph > li{
|
.ant-skeleton-title,.ant-skeleton-paragraph > li{
|
||||||
|
@ -829,6 +852,10 @@ body{
|
||||||
background-color: #466AFF;
|
background-color: #466AFF;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
&:hover{
|
||||||
|
color: #FFFFFF!important;
|
||||||
|
background-color: #355CFF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.forthUl{
|
.forthUl{
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -913,6 +940,7 @@ body{
|
||||||
line-height: 39px;
|
line-height: 39px;
|
||||||
margin-top: 13px;
|
margin-top: 13px;
|
||||||
margin-bottom: 54px;
|
margin-bottom: 54px;
|
||||||
|
opacity: 0.6;
|
||||||
}
|
}
|
||||||
#scrollBox1{
|
#scrollBox1{
|
||||||
max-height: 332px;
|
max-height: 332px;
|
||||||
|
@ -935,7 +963,7 @@ body{
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06);
|
box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
border: 2px solid #FFFFFF;
|
border: 1px solid #FFFFFF;
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
padding:20px;
|
padding:20px;
|
||||||
height: 120px;
|
height: 120px;
|
||||||
|
@ -943,6 +971,9 @@ body{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
&:hover{
|
||||||
|
border: 1px solid #8FCEFF;
|
||||||
|
}
|
||||||
img{
|
img{
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
|
|
|
@ -142,7 +142,7 @@ function ThirdEdition() {
|
||||||
<li>
|
<li>
|
||||||
<a href={i.url} target="_blank">{i.title}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
<span>{i.time}</span>
|
<span>{i.created_time && i.created_time.split(" ")[0]}</span>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
}):""
|
}):""
|
||||||
|
@ -180,7 +180,7 @@ function ThirdEdition() {
|
||||||
<li>
|
<li>
|
||||||
<a href={i.url} target="_blank">{i.title}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
<span>{i.time}</span>
|
<span>{i.created_time && i.created_time.split(" ")[0]}</span>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
}):""
|
}):""
|
||||||
|
@ -199,7 +199,7 @@ function ThirdEdition() {
|
||||||
<li>
|
<li>
|
||||||
<a href={i.url} target="_blank">{i.title}</a>
|
<a href={i.url} target="_blank">{i.title}</a>
|
||||||
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
<span className="listboxcount"><i className="iconfont icon-a-liulanicon2x mr5"></i>{i.visits}</span>
|
||||||
<span>{i.time}</span>
|
<span>{i.created_time && i.created_time.split(" ")[0]}</span>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
}):""
|
}):""
|
||||||
|
|
|
@ -2,6 +2,9 @@ import React , { useEffect , useState } from 'react';
|
||||||
import Slider from 'react-slick';
|
import Slider from 'react-slick';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { getImageUrl } from 'educoder';
|
import { getImageUrl } from 'educoder';
|
||||||
|
import Left from './Img/left.png';
|
||||||
|
import Right from './Img/right.png';
|
||||||
|
|
||||||
|
|
||||||
let setting={
|
let setting={
|
||||||
dots:true,
|
dots:true,
|
||||||
|
@ -14,8 +17,8 @@ let setting={
|
||||||
pauseOnFocus:true,
|
pauseOnFocus:true,
|
||||||
autoplay:true,
|
autoplay:true,
|
||||||
arrows:true,
|
arrows:true,
|
||||||
prevArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangzuojiantou"></i></button>,
|
prevArrow:<button type='button' class='slick-prev slick-arrow'><img src={Left} width="70px" alt=""/></button>,
|
||||||
nextArrow:<button type='button' class='slick-prev slick-arrow'><i className="iconfont icon-xiangyoujiantou"></i></button>
|
nextArrow:<button type='button' class='slick-prev slick-arrow'><img src={Right} width="70px" alt=""/></button>
|
||||||
}
|
}
|
||||||
function TopEdition({register,current_user}) {
|
function TopEdition({register,current_user}) {
|
||||||
|
|
||||||
|
@ -44,10 +47,12 @@ function TopEdition({register,current_user}) {
|
||||||
bannerList.map((i,k)=>{
|
bannerList.map((i,k)=>{
|
||||||
return(
|
return(
|
||||||
<div className={`regform`}>
|
<div className={`regform`}>
|
||||||
<div style={{backgroundImage:`url(${getImageUrl(i.image)})`}}>
|
{/* style={{backgroundImage:`url(${getImageUrl(i.image)})`}} */}
|
||||||
|
<div>
|
||||||
|
<img src={getImageUrl(i.image)} alt="" height="100%"/>
|
||||||
{
|
{
|
||||||
k +1 === bannerList.length && (!(current_user && current_user.login)) ?
|
k +1 === bannerList.length && (!(current_user && current_user.login)) ?
|
||||||
<p className="regPrg"><a href={register}>注册</a></p>
|
<p className="regPrg"><a href={register}>立即注册</a></p>
|
||||||
:""
|
:""
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|