From 28fbfa82cbbecba73a1ae8556e61b430bf09603f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 12 Oct 2019 12:13:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0issues=20=E5=88=86=E6=94=AF=E6=94=B9?= =?UTF-8?q?=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 137 ++++++++++---------- public/react/package.json | 1 + public/react/src/App.js | 30 ++++- public/react/src/modules/tpm/NewHeader.js | 5 +- public/react/src/modules/tpm/TPMIndexHOC.js | 1 + 5 files changed, 100 insertions(+), 74 deletions(-) diff --git a/README.md b/README.md index 8dcb6d131..90f519de4 100644 --- a/README.md +++ b/README.md @@ -1,69 +1,70 @@ -# README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... -#### Jbuilder介绍 -Jbuilder: https://github.com/rails/jbuilder - -#### Rails5 介绍 -rails guide: https://ruby-china.github.io/rails-guides/v5.0/ - -#### API设计文档 -doc for api: https://www.showdoc.cc/web/#/127895880302646?page_id=729221359592009 -user:Hjqreturn PW:12345678 - -#### 测试版访问地址:https://testeduplus2.educoder.net - -#### 实训平台繁忙 - 仓库异常:繁忙等级(81) - -#### 新版域名跳转规则 -新版域名要求总结:testeduplus2.educoder.net/(主要提供实训、实训课堂等业务) -目前有两个域名testbdweb.educoder.net(老版:主要提供课堂、项目、个人主页、后台等服务) - -要求: -1、两服务域名都应该启动‘提供服务 - -2、如果请求链接包含以下的形式,则域名跳至testeduplus2.educoder.net -testeduplus2.educoder.net/shixuns -testeduplus2.educoder.net/shixuns/* -testeduplus2.educoder.net/paths -testeduplus2.educoder.net/paths/* -testeduplus2.educoder.net/myshixuns/ -testeduplus2.educoder.net/tasks/* -testeduplus2.educoder.net/games/* - -如果不满足上述需求的,域名全部跳转至testbdweb.educoder.net -比如:门户首页,如果访问:testeduplus2.educoder.net 应为没包含上述链接。则调制testbdweb.educoder.net -在比如:testeduplus2.educoder.net /users/Hjqreturn没包含上述规则,则跳转到testbdweb.educoder.net/users/Hjqreturn - - -# 需要重构user_extensions 相关sql语句的地方标记 REDO:Extention - -# 文件上传:ActiveStorage -# 新能:bootsnap - -# 注意事项: -# 第一次部署需要执行一些rake任务 -# 配置redis地址 +# README +https://www.trustie.net/issues/24719 +[云上实验室] Logo、导航、底部备案信息定制化 +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... +#### Jbuilder介绍 +Jbuilder: https://github.com/rails/jbuilder + +#### Rails5 介绍 +rails guide: https://ruby-china.github.io/rails-guides/v5.0/ + +#### API设计文档 +doc for api: https://www.showdoc.cc/web/#/127895880302646?page_id=729221359592009 +user:Hjqreturn PW:12345678 + +#### 测试版访问地址:https://testeduplus2.educoder.net + +#### 实训平台繁忙 + 仓库异常:繁忙等级(81) + +#### 新版域名跳转规则 +新版域名要求总结:testeduplus2.educoder.net/(主要提供实训、实训课堂等业务) +目前有两个域名testbdweb.educoder.net(老版:主要提供课堂、项目、个人主页、后台等服务) + +要求: +1、两服务域名都应该启动‘提供服务 + +2、如果请求链接包含以下的形式,则域名跳至testeduplus2.educoder.net +testeduplus2.educoder.net/shixuns +testeduplus2.educoder.net/shixuns/* +testeduplus2.educoder.net/paths +testeduplus2.educoder.net/paths/* +testeduplus2.educoder.net/myshixuns/ +testeduplus2.educoder.net/tasks/* +testeduplus2.educoder.net/games/* + +如果不满足上述需求的,域名全部跳转至testbdweb.educoder.net +比如:门户首页,如果访问:testeduplus2.educoder.net 应为没包含上述链接。则调制testbdweb.educoder.net +在比如:testeduplus2.educoder.net /users/Hjqreturn没包含上述规则,则跳转到testbdweb.educoder.net/users/Hjqreturn + + +# 需要重构user_extensions 相关sql语句的地方标记 REDO:Extention + +# 文件上传:ActiveStorage +# 新能:bootsnap + +# 注意事项: +# 第一次部署需要执行一些rake任务 +# 配置redis地址 # 配置gitlab/intializers/gitlab_config.yml \ No newline at end of file diff --git a/public/react/package.json b/public/react/package.json index 6a0cf6d09..d13714922 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -68,6 +68,7 @@ "react-content-loader": "^3.1.1", "react-dev-utils": "^5.0.0", "react-dom": "^16.9.0", + "react-helmet": "^5.2.1", "react-hot-loader": "^4.0.0", "react-infinite-scroller": "^1.2.4", "react-loadable": "^5.3.1", diff --git a/public/react/src/App.js b/public/react/src/App.js index 9b85acfa8..ed52b9f14 100644 --- a/public/react/src/App.js +++ b/public/react/src/App.js @@ -9,7 +9,7 @@ import { Route, Switch } from 'react-router-dom'; - +import axios from 'axios'; import '@icedesign/base/dist/ICEDesignBase.css'; import '@icedesign/base/index.scss'; @@ -275,6 +275,7 @@ class App extends Component { Addcoursestypes:false, mydisplay:false, occupation:0, + getapi:undefined, } } @@ -315,7 +316,6 @@ class App extends Component { } componentDidMount() { this.disableVideoContextMenu(); - // force an update if the URL changes history.listen(() => { this.forceUpdate() @@ -324,7 +324,8 @@ class App extends Component { $("html").animate({ scrollTop: $('html').scrollTop() - 0 }) }); - initAxiosInterceptors(this.props) + initAxiosInterceptors(this.props); + this.getAppdata(); // // axios.interceptors.response.use((response) => { // // console.log("response"+response); @@ -350,6 +351,20 @@ class App extends Component { this.setState({ isRender:false, }) + }; + //获取当前定制信息 + getAppdata=()=>{ + let url = "/setting.json"; + axios.get(url).then((response) => { + if(response){ + this.setState({ + getapi:response.data.setting + }) + } + + }).catch((error) => { + + }); } render() { @@ -450,7 +465,7 @@ class App extends Component { > {/*课堂*/} - + {/* */} @@ -484,7 +499,12 @@ class App extends Component { render={ (props)=>() }/> - + () + } + /> diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index de8fade26..d5119245b 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -67,11 +67,14 @@ class NewHeader extends Component { occupation:0, mydisplay:false } - // console.log("176") + console.log("176") // console.log(props); + console.log("NewHeader1234567890"); + console.log(this.props); } componentDidMount() { + window._header_componentHandler = this; //下拉框的显示隐藏 diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index dd4572bcc..25c359956 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -644,6 +644,7 @@ export function TPMIndexHOC(WrappedComponent) {