杨树明 6 years ago
commit 2f601d964a

1
.gitignore vendored

@ -31,6 +31,7 @@
/.idea/*
# Ignore react node_modules
/public/react/.cache
/public/react/build
/public/react/build/
/public/react/node_modules/

@ -193,7 +193,7 @@ function generateNewIndexJsp() {
}
const newVersion = '1.1.1'
let cdnHost = 'https://shixun.educoder.net'
cdnHost = 'https://cdn-testeduplus2.educoder.net'
cdnHost = 'http://cdn.educoder.net'
cdnHost = ''
var result = data.replace('/js/js_min_all.js', `${cdnHost}/react/build/js/js_min_all.js?v=${newVersion}`)
.replace('/js/js_min_all_2.js', `${cdnHost}/react/build/js/js_min_all_2.js?v=${newVersion}`)

@ -3,10 +3,12 @@ import {getImageUrl} from 'educoder';
import CoursesHomeCard from "./coursesHomeCard.js"
import axios from 'axios';
import {Input,Tooltip} from 'antd';
import UpgradeModals from '../../modals/UpgradeModals';
import './css/CoursesHome.css';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
const Search = Input.Search;
class coursesHome extends Component{
constructor(props) {
@ -51,7 +53,17 @@ class coursesHome extends Component{
}
componentDidMount(){
this.searchcourses(16,1,"all","")
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
updata
})
}).catch((error)=>{
console.log(error);
})
this.searchcourses(16,1,"all","")
}
onChange=(pageNumber)=> {
@ -91,10 +103,13 @@ class coursesHome extends Component{
render() {
let { order,search,page,coursesHomelist }=this.state;
console.log(coursesHomelist)
return (
<div>
<UpgradeModals
{...this.state}
{...this.props}
/>
<div className="newMain clearfix">
<div className="courses-head pr" >
<div className="edu-txt-center pathNavLine">

@ -499,7 +499,7 @@ class studentsList extends Component{
const { course_group_name, invite_code } = this.state;
const courseId = this.props.match.params.coursesId
let exportUrl = `/api/courses/${courseId}/export_member_scores_excel.xlsx?`
let exportUrl = `/courses/${courseId}/export_member_scores_excel.xlsx?`
const params = {}
if (course_group_id) {
params.group_id = course_group_id

@ -0,0 +1,78 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
import { Spin, Icon , Modal} from 'antd';
import moment from 'moment';
class UpgradeModals extends Component {
constructor(props) {
super(props);
this.state = {
system_updates:false
}
}
updatasmodals=()=>{
let {updata} = this.props;
if(updata&&updata.system_update===true){
let SystemUpdateEndTime = localStorage.getItem('SystemUpdateEndTime');
if(SystemUpdateEndTime===null){
this.setState({
system_updates:true
})
}else if(moment(SystemUpdateEndTime) < moment(updata.end_time)){
this.setState({
system_updates:true
})
}
}
}
componentDidMount() {
this.updatasmodals()
}
componentDidUpdate(prevProps){
if (prevProps.data!=this.props.updata) {
this.updatasmodals()
}
}
setmodalSave=()=>{
let {updata}=this.props;
localStorage.setItem('SystemUpdateEndTime',updata.end_time);
this.setState({
system_updates:false
})
}
render() {
// const antIcons = <Icon type="loading" style={{ fontSize: 24 }} spin />
{/*<Spin indicator={antIcons} spinning={this.state.system_updates} >*/}
{/*</Spin>*/}
let {system_updates}=this.state;
let {updata}=this.props;
return(
<Modal
keyboard={false}
title={updata&&updata.subject}
visible={system_updates}
// visible={this.props.modalsType===undefined?false:this.props.modalsType}
closable={false}
footer={null}
destroyOnClose={true}
centered={true}
width="530px"
>
<div className="task-popup-content">
<pre className="break-word break-word-firefox">{updata&&updata.system_score}</pre>
<div className="clearfix edu-txt-center mt20">
<a className="task-btn task-btn-orange pop_close" onClick={()=>this.setmodalSave()}>知道啦</a>
</div>
</div>
</Modal>
)
}
}
export default UpgradeModals;

@ -1,13 +1,15 @@
import React, { Component } from 'react';
import PathCard from "./ShixunPathCard.js"
import PathCard from "./ShixunPathCard.js";
import axios from 'axios';
import {Input} from 'antd';
import UpgradeModals from '../modals/UpgradeModals';
import Pagination from '@icedesign/base/lib/pagination';
import '@icedesign/base/lib/pagination/style.js';
import './ShixunPaths.css'
import './ShixunPaths.css';
const Search = Input.Search;
class ShixunPathSearch extends Component{
constructor(props) {
super(props)
@ -65,7 +67,17 @@ class ShixunPathSearch extends Component{
componentDidMount(){
let { order,select,search,page }=this.state;
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
updata
})
}).catch((error)=>{
console.log(error);
})
let { order,select,search,page }=this.state;
this.getList(order,select,search,page );
}
@ -96,7 +108,10 @@ class ShixunPathSearch extends Component{
let { order,sortList,search,page,total_count,select }=this.state;
return (
<div>
<UpgradeModals
{...this.state}
{...this.props}
/>
<div className="path-head pr">
<div className="edu-txt-center pathNavLine">
<div className="inline path-nav">

@ -19,13 +19,13 @@ class NewFooter extends Component {
<div className="newFooter edu-txt-center newContainers">
<div className="inner-footer_con">
<div className="footercon">
<div className="inline mt40 mb5">
{/* <div className="inline mt40 mb5">
<a href="/" className="fl" style={{height:'70px'}}>
<img alt="高校智能化教学与实训平台" src={getImageUrl(`images/educoder/headNavLogo.png?1526520218`)} width="70px">
</img>
</a>
<span className="fl color-grey-c cdefault font-28 ml22" style={{lineHeight:'74px'}}>EduCoder.net</span>
</div>
</div> */}
<ul className="clearfix inner-footernav">
<li><a href="/" className="fl" target="_blank">网站首页</a></li>
<li><a href={this.props.Footerdown===undefined?"":this.props.Footerdown.about_us} className="fl" target="_blank">关于我们</a></li>

@ -54,10 +54,7 @@ body>.-task-title {
margin-top:0px;
}
/*Main START*/
.newMain {
/* 330̫<30><CCAB><EFBFBD>ˣ<EFBFBD>*/
padding-bottom: 240px !important;
}
.newContainer{
background: #fafafa!important;

@ -35,11 +35,11 @@ if (!window['indexHOCLoaded']) {
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`));
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440978`));
// index.html有加载
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440978`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')

@ -18,6 +18,8 @@ import ShixunSearchBar from './ShixunSearchBar';
import ShixunCard from './ShixunCard';
import UpgradeModals from '../../modals/UpgradeModals';
const queryString = require('query-string');
const $ = window.$;
@ -45,7 +47,20 @@ class ShixunsIndex extends Component {
}
}
componentDidMount(){
let _keyword;
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
updata
})
}).catch((error)=>{
console.log(error);
})
let _keyword;
if (window.__headSearchKeyword) {
this.setState({ keyword: window.__headSearchKeyword })
_keyword = window.__headSearchKeyword
@ -366,6 +381,10 @@ class ShixunsIndex extends Component {
return (
<div className="newMain clearfix backFAFAFA">
<UpgradeModals
{...this.state}
{...this.props}
/>
{/*<Spin spinning={typepvisible} size="large" style={{marginTop:'15%'}}>*/}
<ShixunSearchBar
Updatasearchlist={this.Updatasearchlist.bind(this)}

@ -5,7 +5,7 @@ import {Tooltip,Menu} from 'antd';
import Loadable from 'react-loadable';
import Loading from '../../../Loading';
import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import UpgradeModals from '../../modals/UpgradeModals';
import axios from 'axios';
import {getImageUrl} from 'educoder';
import { TPMIndexHOC } from '../../tpm/TPMIndexHOC';
@ -51,8 +51,20 @@ class Infos extends Component{
}
}
componentDidMount =()=>{
this.getInfo(this.props.match.params.username);
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;
this.setState({
updata
})
}).catch((error)=>{
console.log(error);
})
this.getInfo(this.props.match.params.username);
}
//判断是否看的是当前用户的个人主页
componentDidUpdate =(prevProps)=> {
if(this.props.current_user && prevProps.current_user != this.props.current_user){
@ -214,6 +226,10 @@ class Infos extends Component{
moduleName=pathname.split("/")[3];
return(
<div className="newMain">
<UpgradeModals
{...this.state}
{...this.props}
/>
{
isRenders && <Trialapplication {...this.props} {...this.state} Cancel={() => this.cancelModulationModels()}/>
}

@ -55,6 +55,8 @@ em.vertical-line{display: inline-block;width: 2px;background: #999;height: 10px}
.search-content a{display: inline-block;width:100%;height: 30px;line-height: 30px;padding:0px 20px;box-sizing: border-box;text-align: left;white-space: nowrap;text-overflow: ellipsis;overflow: hidden;}
/*底部*/
.newFooter{ position: absolute; bottom: 0; width: 100%; height: 235px;background: #323232; clear:both; min-width: 1200px;z-index:8;left: 0px;}
/* 去掉了logo */
.newFooter{ height: 110px; }
.footercon{border-bottom:1px solid #47494d;}
.inner-footernav{width: 560px;margin: 0px auto}
.inner-footernav li{float: left;height: 50px;width: 80px;text-align: center}

@ -170,6 +170,7 @@ input::-ms-clear{display:none;}
.newContainer{ min-height:100%; height: auto !important; height: 100%; /*IE6不识别min-height*/position: relative;}
.educontent{width: 1200px;margin:0px auto;box-sizing: border-box}/*中间部分宽度固定为1200*/
.newMain{ margin: 0 auto; padding-bottom: 235px; min-width:1200px;padding-top: 60px}/*padding-bottom根据底部的高度而定*/
.newMain{ padding-bottom: 120px !important; }
/*高度*/
.height-100{height: 100%;}

Loading…
Cancel
Save