This commit is contained in:
caicai8 2020-03-23 20:33:47 +08:00
parent 21e27bdef1
commit e35c8e4cdf
5 changed files with 75 additions and 241 deletions

View File

@ -3,11 +3,8 @@
<head>
<meta charset="utf-8">
<!--<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
<!-- <meta name="viewport" content=""> -->
<meta name=”Keywords” Content=”EduCoder,信息技术实践教学,精品课程网,慕课MOOC″>
<meta name=”Keywords” Content=”实践课程,项目实战,java实训,python实战,人工智能技术,后端开发学习,移动开发入门″>
<meta name=”Keywords” Content=”翻转课堂,高效课堂创建,教学模式″>
@ -18,28 +15,11 @@
<meta name=”Description” Content=”EduCoder翻转课堂教学模式颠覆了传统教学模式让教师与学生的关系由“权威”变成了“伙伴”。将学习的主动权转交给学生使学生可个性化化学学生的学习主体得到了彰显。”>
<meta name=”Description” Content=”EduCoder实训项目为单个知识点关卡实践训练帮助学生巩固单一弱点强化学习。 >
<meta name=”Description” Content=”EduCoder实践教学平台各类大赛为进一步提高各类学生综合运用高级语言程序设计能力培养创新意识和实践探索精神发掘优秀软件人才。 >
<!-- <meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3, user-scalable=no">-->
<meta name="viewport" id="viewport" content="width=device-width, initial-scale=0.3, maximum-scale=0.3">
<meta name="theme-color" content="#000000">
<!--<meta http-equiv="cache-control" content="no-cache,no-store, must-revalidate" />-->
<!--<meta http-equiv="pragma" content="no-cache" />-->
<!--<meta http-equiv="Expires" content="0" />-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<!-- <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">-->
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<!-- <title>EduCoder</title>-->
<!--react-ssr-head-->
<script type="text/javascript">
window.__isR = true;
@ -60,39 +40,8 @@
}
</script>
<!-- <link rel="stylesheet" type="text/css" href="/css/edu-common.css">
<link rel="stylesheet" type="text/css" href="/css/edu-public.css">
<link rel="stylesheet" type="text/css" href="/css/taskstyle.css">
<link rel="stylesheet" type="text/css" href="/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="/css/editormd.min.css">
<link rel="stylesheet" type="text/css" href="/css/merge.css"> -->
<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">
<!--<link rel="stylesheet" type="text/css" href="/css/css_min_all.css">-->
<!--<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_653600_nm6lho7nxxq.css">-->
<!-- <link href="/react/build/css/iconfont.css" rel="stylesheet" type="text/css"> -->
<!--<link href="http://47.96.87.25:48080/stylesheets/educoder/edu-all.css" rel="stylesheet" type="text/css">-->
<!--<link href="https://pandao.github.io/editor.md/examples/css/style.css" rel="stylesheet" type="text/css">-->
<!--<link href="https://pandao.github.io/editor.md/css/editormd.preview.css" rel="stylesheet" type="text/css">-->
<!-- <link href="https://testeduplus2.educoder.net/stylesheets/css/edu-common.css" rel="stylesheet" type="text/css">
<link href="https://testeduplus2.educoder.net/stylesheets/educoder/edu-main.css" rel="stylesheet" type="text/css">
<link href="https://testeduplus2.educoder.net/stylesheets/educoder/antd.min.css" rel="stylesheet" type="text/css"> -->
<!-- <link rel="stylesheet" type="text/css" href="https://www.educoder.net/stylesheets/css/font-awesome.css?1510652321"> -->
<!--<link rel="stylesheet" type="text/css" href="http://47.96.87.25:48080/stylesheets/educoder/iconfont/iconfont.css">-->
<!--需要去build js配置-->
<link rel="stylesheet" type="text/css" href="/css/iconfont.css">
<link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.css">
@ -112,64 +61,12 @@
<!--用于markdown转html -->
<div id="md_div" style="display: none;"></div>
<div id="root" class="page -layout-v -fit widthunit">
<!--<div class="d2-home">-->
<!--<div class="d2-home__main">-->
<!--&lt;!&ndash;<img class="d2-home__loading"&ndash;&gt;-->
<!--&lt;!&ndash;src="loading-spin.svg"&ndash;&gt;-->
<!--&lt;!&ndash;alt="loading">&ndash;&gt;-->
<!--<div class="lds-ripple"><div></div><div></div></div>-->
<!--<div class="d2-home__title">-->
<!--正在加载资源-->
<!--</div>-->
<!--<div class="d2-home__sub-title">-->
<!--加载资源可能需要较多时间 请耐心等待-->
<!--</div>-->
<!--</div>-->
<!--<div class="d2-home__footer">-->
<!--&lt;!&ndash;<a href="www.educoder.net"&ndash;&gt;-->
<!--&lt;!&ndash;target="_blank">&ndash;&gt;-->
<!--&lt;!&ndash;&ndash;&gt;-->
<!--&lt;!&ndash;</a>&ndash;&gt;-->
<!--EduCoder-->
<!--</div>-->
<!--</div>-->
</div>
<div id="picture_display" style="display: none;"></div>
<!-- js css合并 文件优先级的问题 -->
<script type="text/javascript" src="/js/js_min_all.js"></script>
<!-- <script type="text/javascript" src="/js/js_min_all_2.js"></script> -->
<!--
<script type="text/javascript" src="/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="/js/editormd/underscore.min.js"></script>
<script type="text/javascript" src="/js/editormd/marked.min.js"></script>
<script type="text/javascript" src="/js/editormd/prettify.min.js"></script>
<script type="text/javascript" src="/js/editormd/raphael.min.js"></script>
<script type="text/javascript" src="/js/editormd/sequence-diagram.min.js"></script>
<script type="text/javascript" src="/js/editormd/flowchart.min.js"></script>
<script type="text/javascript" src="/js/editormd/jquery.flowchart.min.js"></script>
<script type="text/javascript" src="/js/editormd/editormd.min.js"></script>
-->
<!-- codemirror addon -->
<!--
<script type="text/javascript" src="/js/codemirror/codemirror.js"></script>
<script type="text/javascript" src="/js/codemirror/mode/javascript.js"></script>
<script type="text/javascript" src="/js/diff_match_patch.js"></script>
<script type="text/javascript" src="/js/merge.js"></script>
<script type="text/javascript" src="/js/edu_tpi.js"></script>
-->
<!-- testbdweb.trustie.net testbdweb.educoder.net -->
<!-- 在tpi js里加载这3个脚本 -->
<script>
(function() { // Scoping function to avoid globals
@ -199,15 +96,7 @@
})();
</script>
<!-- <script type="text/javascript" src="https://testeduplus2.educoder.net/assets/kindeditor/kindeditor.js"></script>
<script type="text/javascript" src="/js/create_kindeditor.js"></script>
<script type="text/javascript" src="https://testeduplus2.educoder.net/javascripts/educoder/edu_application.js"></script> -->
<script type="text/javascript" src="https://cdn.bootcss.com/quill/1.3.7/quill.core.min.js"></script>
<!-- <script>-->
<!-- document.body.addEventListener('touchmove', function (e) {-->
<!-- e.preventDefault(); //阻止默认的处理方式(阻止下拉滑动的效果)-->
<!-- }, {passive: false});-->
<!-- </script>-->
</body>
</html>

View File

@ -35,17 +35,12 @@ const ProjectDetail = Loadable({
class Index extends Component{
constructor(props){
super(props);
this.state={
current_user:undefined,
}
}
componentDidMount=()=>{
document.title="forge开源";
}
render(){
console.log("123",this.props);
return(
<div className="newMain clearfix">
<Switch {...this.props}>

View File

@ -218,11 +218,13 @@ class Index extends Component{
<Spin spinning={isSpin}>
<div className="list-r-operation">
<div>
<Dropdown overlay={newItem} trigger={["click"]} placement='bottomRight' className="mr30">
<a className="ant-dropdown-link">
<span className="color-blue font-16"><img src={img_new} alt="" width="13px"/> 新建</span>
</a>
</Dropdown>
<Dropdown overlay={menu} trigger={['click']} placement='bottomRight'>
<a className="ant-dropdown-link">
<span className="color-blue font-16">排序 <img src={img_array} alt="" width="10px"/></span>

View File

@ -76,21 +76,14 @@ class NewHeader extends Component {
goshowqqgtounp:false,
visiblemyss:false,
}
// console.log("176")
// console.log(props);
// console.log("NewHeader1234567890");
// console.log(this.props);
}
componentDidUpdate = (prevProps) => {
// console.log("componentDidMount2");
// console.log(this.state.mygetHelmetapi2);
if(this.state.mygetHelmetapi2===undefined){
this.getAppdata();
}
}
componentDidMount() {
// console.log("componentDidMount1");
this.getAppdata();
this.getAppdata();
window._header_componentHandler = this;
//下拉框的显示隐藏

View File

@ -20,20 +20,13 @@ import Trialapplication from "../login/Trialapplication";
const $ = window.$;
const versionNum = '0001';
// let _url_origin = getUrl()
let _url_origin='';
if(window.location.port === "3007"){
_url_origin="https://test-newweb.educoder.net";
}
// let _url_origin=`https://www.educoder.net`;
if (!window['indexHOCLoaded']) {
window.indexHOCLoaded = true;
//解决首屏加载问题
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/css/edu-common.css?3`));
@ -44,20 +37,6 @@ if (!window['indexHOCLoaded']) {
$('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?3`));
// $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`));
// 加timeout 为了覆盖掉antd的样式
// setTimeout(() => {
// $('head').append( $('<link rel="stylesheet" type="text/css" />')
// .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-all.css?1525440977`) );
// $('head').append( $('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`) );
// }, 1000);
$("script").append('<script></script>')
.attr('src', `${_url_origin}/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js?_t=${versionNum}`);
@ -163,41 +142,17 @@ export function TPMIndexHOC(WrappedComponent) {
}else if(this.props.match.path==="/paths"){
document.title="实践课程";
}else if(this.props.match.path==="/courses"){
document.title="翻转课堂";
document.title="翻转课堂";
}else if(this.props.match.path==="/projects"){
document.title="开源项目";
}
// if(this.props.match.path==="/"){
// document.title="EduCoder-IT实践教学平台_信息技术类精品课程网_大学生MOOC平台";
// }else if(this.props.match.path==="/403"){
// document.title="你没有权限访问";
// }else if(this.props.match.path==="/nopage"){
// document.title="没有找到该页面";
// }else if(this.props.match.path==="/shixuns"){
// document.title="EduCoder-IT实践教学平台_信息技术类精品课程网_大学生MOOC平台";
// }else if(this.props.match.path==="/paths"){
// document.title="实践课程_项目实战开发_web前端开发实训_web后端开发实战_人工智能技术-EduCoder";
// }else if(this.props.match.path==="/courses"){
// document.title="实训项目_php后端开发_app前端开发_java_python实训_C语言入门课程-EduCoder";
// }else if(this.props.match.path==="/competitions"){
// document.title="在线竞赛_计算机应用大赛_编程大赛_大学生设计大赛_全国高校绿色计算大赛-EduCoder";
// }else if(this.props.match.path==="/moop_cases"){
// document.title="教学案例-EduCoder";
// }else if(this.props.match.path==="/forums"){
// document.title="交流问答-EduCoder";
// }else if(this.props.match.path==="/forums"){
// document.title="交流问答-EduCoder";
// }
$.ajaxSetup({
cache: true
});
//帮助后台传参数
const query = this.props.location.search;
// const type = query.split('?chinaoocTimestamp=');
// console.log("Eduinforms12345");
// console.log(this.foo(query));
// console.log(JSON.stringify(this.foo(query)));
var dataqueryss={}
try {
var foqus=this.foo(query);
@ -218,23 +173,23 @@ export function TPMIndexHOC(WrappedComponent) {
}
this.fetchUsers(dataqueryss);
let url=`/users/get_navigation_info.json`;
axios.get(url, {
// let url=`/users/get_navigation_info.json`;
// axios.get(url, {
}).then((response) => {
// console.log("开始请求/get_navigation_info.json");
// console.log(response);
if(response!=undefined){
if(response.status===200){
this.setState({
Headertop:response.data.top,
Footerdown:response.data.down
})
}
}
});
// }).then((response) => {
// // console.log("开始请求/get_navigation_info.json");
// // console.log(response);
// if(response!=undefined){
// if(response.status===200){
// this.setState({
// Headertop:response.data.top,
// Footerdown:response.data.down
// })
// }
// }
// });
///请求定制化的信息
this.getAppdata();
// this.getAppdata();
}
/**
课堂权限相关方法暂时写这里了 ----------------------------------------START
@ -335,67 +290,67 @@ export function TPMIndexHOC(WrappedComponent) {
document.head.appendChild(link);
}
//获取当前定制信息
getAppdata = () => {
try {
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
var chromesettingresponseArray = JSON.parse(localStorage.getItem('chromesettingresponse'));
// console.log("TPMLNdexHOC");
// console.log(chromesettingArray);
// console.log(chromesettingresponseArray);
this.setState({
mygetHelmetapi:chromesettingArray
});
if (chromesettingArray.tab_logo_url) {
this.gettablogourldata(chromesettingresponseArray);
} else {
this.gettablogourlnull();
}
}catch (e) {
console.log("hoc获取游览器配置失败 重新请求开始读取配置");
this.getAppdatausr();
}
// getAppdata = () => {
// try {
// var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
// var chromesettingresponseArray = JSON.parse(localStorage.getItem('chromesettingresponse'));
// // console.log("TPMLNdexHOC");
// // console.log(chromesettingArray);
// // console.log(chromesettingresponseArray);
// this.setState({
// mygetHelmetapi:chromesettingArray
// });
// if (chromesettingArray.tab_logo_url) {
// this.gettablogourldata(chromesettingresponseArray);
// } else {
// this.gettablogourlnull();
// }
// }catch (e) {
// console.log("hoc获取游览器配置失败 重新请求开始读取配置");
// this.getAppdatausr();
// }
};
getAppdatausr=()=>{
let url = "/setting.json";
axios.get(url).then((response) => {
// console.log("app.js开始请求/setting.json");
// console.log("获取当前定制信息");
if (response) {
if (response.data) {
this.setState({
mygetHelmetapi: response.data.setting
});
localStorage.setItem('chromesetting',JSON.stringify(response.data.setting));
localStorage.setItem('chromesettingresponse',JSON.stringify(response));
try {
if (response.data.setting.tab_logo_url) {
this.gettablogourldata(response);
} else {
this.gettablogourlnull();
}
} catch (e) {
this.gettablogourlnull();
}
// };
// getAppdatausr=()=>{
// let url = "/setting.json";
// axios.get(url).then((response) => {
// // console.log("app.js开始请求/setting.json");
// // console.log("获取当前定制信息");
// if (response) {
// if (response.data) {
// this.setState({
// mygetHelmetapi: response.data.setting
// });
// localStorage.setItem('chromesetting',JSON.stringify(response.data.setting));
// localStorage.setItem('chromesettingresponse',JSON.stringify(response));
// try {
// if (response.data.setting.tab_logo_url) {
// this.gettablogourldata(response);
// } else {
// this.gettablogourlnull();
// }
// } catch (e) {
// this.gettablogourlnull();
// }
} else {
// } else {
this.gettablogourlnull();
// this.gettablogourlnull();
}
// }
} else {
this.gettablogourlnull();
// } else {
// this.gettablogourlnull();
}
// }
}).catch((error) => {
this.gettablogourlnull();
// }).catch((error) => {
// this.gettablogourlnull();
});
// });
}
// }
fetchUser = () => {
let url = `/users/get_user_info.json`