dev_cxt
杨树明 5 years ago
parent cd8f5e1df8
commit f17b642f3b

@ -1,10 +1,14 @@
import React from "react";
import axios from 'axios';
import md5 from 'md5';
import { requestProxy } from "./indexEduplus2RequestProxy";
import { broadcastChannelOnmessage ,SetAppModel, isDev, queryString } from 'educoder';
import { notification } from 'antd';
import './index.css'
import './index.css';
const opens ="79e33abd4b6588941ab7622aed1e67e8";
let timestamp = Date.parse(new Date());
const newopens=md5(opens+timestamp)
broadcastChannelOnmessage('refreshPage', () => {
window.location.reload()
})
@ -91,20 +95,20 @@ export function initAxiosInterceptors(props) {
}
if(`${config[0]}`!=`true`){
if (window.location.port === "3007") {
// if (url.indexOf('.json') == -1) {
//
// alert('开发提示:请给接口加.json:' + url)
//
// }
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?debug=${debugType}`;
config.url = `${config.url}?debug=${debugType}&openkey=${newopens}`;
} else {
config.url = `${config.url}&debug=${debugType}`;
config.url = `${config.url}&debug=${debugType}&openkey=${newopens}`;
}
} else {
// 加api前缀
config.url = url;
config.url = url;
if (config.url.indexOf('?') == -1) {
config.url = `${config.url}?openkey=${newopens}`;
} else {
config.url = `${config.url}&openkey=${newopens}`;
}
}
}
//
@ -191,6 +195,11 @@ export function initAxiosInterceptors(props) {
locationurl('/500');
}
if (response.data.status === 501) {
notification.warning({
description:response.data.message,
})
}
// if (response.data.status === 402) {

@ -285,10 +285,10 @@ class Bullsubdirectory extends Component{
const {getFieldDecorator} = this.props.form;
// console.log("Bullsubdirectory");
// console.log(this.props.isAdmin());
console.log(this.props);
console.log(whethertoeditysl);
console.log(this.state.eduintits);
console.log(this.state.description);
// console.log(this.props);
// console.log(whethertoeditysl);
// console.log(this.state.eduintits);
// console.log(this.state.description);
return(
<React.Fragment key={this.props.index} id={this.props.id}>

Loading…
Cancel
Save