调整浏览器头部显示

competitions
杨树明 5 years ago
parent cdf6c67017
commit 645003f34a

@ -32,7 +32,7 @@ module.exports = {
// See the discussion in https://github.com/facebookincubator/create-react-app/issues/343.s
// devtool: "cheap-module-eval-source-map",
// 开启调试
devtool: "source-map", // 开启调试
//devtool: "source-map", // 开启调试
// These are the "entry points" to our application.
// This means they will be the "root" imports that are included in JS bundle.
// The first two entry points enable "hot" CSS and auto-refreshes for JS.

@ -8,7 +8,9 @@
<!-- width=device-width, initial-scale=1 , shrink-to-fit=no -->
<!-- <meta name="viewport" content=""> -->
<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">

@ -481,6 +481,7 @@ class CoursesBanner extends Component {
render() {
let { Addcoursestypes, coursedata,excellent, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype} = this.state;
const isCourseEnd = this.props.isCourseEnd()
document.title=coursedata===undefined || coursedata.status===401 || coursedata.status===407?"":coursedata.name;
return (
<div>
{

@ -53,6 +53,7 @@ class CoursesHome extends Component{
}
componentDidMount(){
document.title="翻转课堂";
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;

@ -27,6 +27,7 @@ import { Tooltip } from 'antd'
// import CBreadcrumb from '../courses/common/CBreadcrumb'
import { typeNameMap2 } from './MemoNew'
import CaseDetail from "../moop_cases/CaseDetail";
const $ = window.$
function urlStringify(params) {
let noParams = true;
@ -673,7 +674,7 @@ class MemoDetail extends Component {
const { match, history } = this.props
const { memo, recommend_shixun, current_user,author_info } = this.props;
const { comments, hasMoreComments, goldRewardDialogOpen } = this.state;
document.title = memo&&memo.subject!=undefined?memo&&memo.subject:"交流问答";
if (!memo || this.state.memoLoading) {
return <div className="edu-back-white" id="forum_index_list"></div>
}

@ -18,6 +18,7 @@ import 'antd/lib/select/style/index.css'
import TPMMDEditor from '../tpm/challengesnew/TPMMDEditor'
import { getUrl, getUploadActionUrl, appendFileSizeToUploadFileAll, appendFileSizeToUploadFile } from 'educoder'
import CaseDetail from "../moop_cases/CaseDetail";
const Option = Select.Option;
const $ = window.$;
@ -316,7 +317,8 @@ class MemoNew extends Component {
const repertoires = [];
const repertoiresTagMap = {}
if ( data.tag_list ) {
// data.tag_list.forEach((item, index)=>{
document.title = "交流问答";
// data.tag_list.forEach((item, index)=>{
// const tagArray = [];
// item.tag.forEach( (tag, index) => {
// tagArray.push(tag.name)
@ -362,6 +364,8 @@ class MemoNew extends Component {
const tag_list = response.data.tag_list
if (tag_list) {
// this.setState({...response.data})
document.title = response.data.subject;
const { content, forum_id, id, repertoire_name, subject,
current_user, tag_list, attachments_url, memo_tags, attachments } = response.data;
this.initMD(content);

@ -65,6 +65,7 @@ class CaseDetail extends Component{
modalsTopval,
modalsBottomval,
} = this.state;
document.title = CaseDetail&&CaseDetail.title!=undefined?CaseDetail&&CaseDetail.title:"教学案例";
return(
<div className="educontent mt10 mb50">
{

@ -31,6 +31,7 @@ class CaseList extends Component{
}
componentDidMount = () =>{
window.document.title = '教学案例'
let { type , search , page , pageSize } = this.state;
this.InitList(type,search,page,pageSize);
}

@ -130,9 +130,12 @@ class CaseNew extends Component{
// 编辑时加载数据
componentDidMount=()=>{
if(this.props.match.params.caseID){
this.InitEditData();
}
}else{
window.document.title = '教学案例'
}
let url=`/library_tags.json`;
axios.get(url).then((result) => {
console.log(result)

@ -47,7 +47,7 @@ class Index extends Component{
}
}
componentDidMount(){
window.document.title = '教学案例'
}
// 获取案例详情
getDetail = (caseID) =>{
@ -64,6 +64,7 @@ class Index extends Component{
tags:result.data.tags,
attachments:result.data.attachments
})
window.document.title = result.data.title;
}
}).catch((error)=>{
console.log(error);

@ -227,6 +227,8 @@ class PathDetailIndex extends Component{
pathtopskey:key===undefined?1:key,
// items: getItems(result.data.members.length),
})
document.title=result.data.name;
}
}).catch((error)=>{

@ -64,6 +64,7 @@ class ShixunPathSearch extends Component{
componentDidMount(){
document.title="实践课程";
const upsystem=`/users/system_update.json`;
axios.get(upsystem).then((response)=>{
let updata=response.data;

Loading…
Cancel
Save