dev_static
杨树明 5 years ago
parent 2d1f7b30be
commit 53cd16517c

@ -49,7 +49,7 @@ if (isDev) {
if(timestamp&&checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){
timestamp=data.message;
timestamp=data.data.t;
}
}})
checkSubmitFlg=true
@ -59,7 +59,7 @@ if (isDev) {
}else if(checkSubmitFlg===false){
$.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){
timestamp=data.message;
timestamp=data.data.t;
}
}})
checkSubmitFlg=true
@ -127,7 +127,7 @@ export function initAxiosInterceptors(props) {
if (window.location.port === "3007") {
// let timestamp=railsgettimes(proxy);
// console.log(timestamp)
railsgettimes(`${proxy}/api/main/first_stamp.json`);
railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
let newopens=md5(opens+timestamp)
config.url = `${proxy}${url}`;
if (config.url.indexOf('?') == -1) {
@ -137,7 +137,7 @@ export function initAxiosInterceptors(props) {
}
} else {
// 加api前缀
railsgettimes(`/api/main/first_stamp.json`);
railsgettimes(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
let newopens=md5(opens+timestamp)
config.url = url;
if (config.url.indexOf('?') == -1) {

@ -81,7 +81,7 @@ function railsgettimess(proxy) {
if(checkSubmitFlgs===false){
$.ajax({url:proxy,async:false,success:function(data){
if(data.status===0){
newtimestamp=data.message;
newtimestamp=data.data.t;
}
}})
checkSubmitFlgs=true
@ -92,7 +92,7 @@ function railsgettimess(proxy) {
}
export function Railsgettimes() {
railsgettimess(`${getUrl()}/api/main/first_stamp.json`);
railsgettimess(`http://api.m.taobao.com/rest/api3.do?api=mtop.common.getTimestamp`);
}
export function getUploadActionUrl(path, goTest) {

@ -145,7 +145,7 @@ class NewWorkForm extends Component{
this.props.showNotification('最大人数不能为空');
this.props.scrollToAnchor("numberofgroups");
return;
} else if (max_num < min_num) {
} else if (max_num <= min_num) {
this.props.showNotification('最大人数不能小于最小人数');
this.props.scrollToAnchor("numberofgroups");
return;

@ -7,6 +7,7 @@ import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
import Loadable from 'react-loadable';
import Loading from '../../Loading';
import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
import NewFooter from "../tpm/NewFooter";
const PathsDetail = Loadable({
loader: () => import('./PathDetail/PathDetailIndex'),
@ -26,6 +27,11 @@ const ShixunPaths = Loadable({
loading:Loading,
})
const NewStatistics= Loadable({
loader: () => import('./NewStatistics/NewStatistics'),
loading:Loading,
})
class Index extends Component{
constructor(props) {
@ -37,14 +43,18 @@ class Index extends Component{
<Switch {...this.props}>
<Route path="/paths/:pathId/statistics" component = {Statistics} {...this.props} {...this.state}></Route>
<Route path="/paths/new" exact
<Route path="/paths/:pathId/newstatistics"
render={(props)=>(<NewStatistics {...this.props} {...this.state} {...props}/>)}
></Route>
<Route path="/paths/new"
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
></Route>
<Route path="/paths/:pathId/edit" exact
<Route path="/paths/:pathId/edit"
render={(props)=>(<PathsNew {...this.props} {...this.state} {...props}/>)}
></Route>
{/*编辑页面*/}
<Route path="/paths/:pathId" exact
<Route path="/paths/:pathId"
render={(props)=>(<PathsDetail {...this.props} {...this.state} {...props}/>)}
></Route>

@ -0,0 +1,36 @@
import React,{ Component } from "react";
import { Skeleton ,Spin ,PageHeader} from "antd";
class NewStatistics extends Component{
constructor(props){
super(props);
this.state = {
}
}
render(){
return(
<div className="newContainer">
<div className="newMain clearfix">
<div className={"educontent mt20"}>
<div className="clearfix mb30">
<PageHeader
style={{
border: '1px solid rgb(235, 237, 240)',
}}
title="学习统计"
subTitle="| Android综合实训之物联网移动应用"
/>
</div>
</div>
</div>
</div>
)
}
}
export default NewStatistics;

@ -1,9 +1,7 @@
import React, {Component} from 'react';
import {BrowserRouter as Router, Route, Link, Switch} from "react-router-dom";
import {getImageUrl,broadcastChannelPostMessage} from 'educoder';
import {Tabs, Input, Checkbox, Button, notification,Menu} from 'antd';
import md5 from 'md5';
import passopen from '../../../src/images/login/passopen.png';
import passoff from '../../../src/images/login/passoff.png';
import axios from 'axios';
@ -184,7 +182,7 @@ class LoginRegisterComponent extends Component {
message: "提示",
description: messge,
onClick: () => {
console.log('Notification Clicked12312313123!');
},
});
}
@ -217,7 +215,7 @@ class LoginRegisterComponent extends Component {
}
}
onTabChange = (activeKey) => {
console.log("onTabChange");
}
// -------------------- LOGIN START
//下次自动登入
@ -229,7 +227,7 @@ class LoginRegisterComponent extends Component {
isCorrectname = (value, id) => {
if (id === 1) {
console.log(value.length);
if (value.length === 0) {
this.setState({
Phonenumberisnotco: undefined,
@ -265,7 +263,7 @@ class LoginRegisterComponent extends Component {
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
console.log("s0");
return;
}
@ -283,7 +281,7 @@ class LoginRegisterComponent extends Component {
Phonenumberisnotcobool: false,
dragOk:true,
})
console.log("s1");
} else {
this.setState({
Phonenumberisnotcos: undefined,
@ -307,11 +305,11 @@ class LoginRegisterComponent extends Component {
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
});
console.log("s2");
return
} else {
console.log("s222222");
this.setState({
Phonenumberisnotcos: undefined,
Phonenumberisnotcobool: false,
@ -571,7 +569,7 @@ class LoginRegisterComponent extends Component {
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
console.log("s5");
}
return;
@ -582,7 +580,7 @@ class LoginRegisterComponent extends Component {
dragOk:false,
Whethertoverify:this.state.Whethertoverify===true?false:true,
})
console.log("s6");
return;
}
@ -611,11 +609,14 @@ class LoginRegisterComponent extends Component {
};
//短信验证
SMSverification = () => {
const opens ="79e33abd4b6588941ab7622aed1e67e8";
let newopens=md5(opens+this.state.logins);
var url = `/accounts/get_verification_code.json`;
axios.get((url), {
params: {
login: this.state.logins,
type: 1,
smscode:newopens
}
}).then((result) => {
//验证有问题{"status":1,"message":"success"}
@ -624,13 +625,13 @@ class LoginRegisterComponent extends Component {
}).catch((error) => {
console.log(error);
})
}
//显示和不显示密码
Showandhide = (e) => {
console.log("显示于隐藏");
if (this.state.classpassbool === true) {
this.setState({
passopens:passoff ,
@ -649,7 +650,6 @@ class LoginRegisterComponent extends Component {
//倒计时
getverificationcode = () => {
debugger
// console.log(this.state.Phonenumberisnotcobool);
// console.log(this.state.dragOk);
if(this.state.logins === undefined || this.state.logins.length===0){
@ -821,7 +821,7 @@ class LoginRegisterComponent extends Component {
}
//获取注册登入
loginInputonChanges = (e) => {
console.log(e.target.value);
var stirngt;
if(e.target.value.length>0){
var str= e.target.value.replace(/\s*/g,"")
@ -874,7 +874,7 @@ class LoginRegisterComponent extends Component {
this.setState({
tab:e.key
})
console.log(e.key);
if(e.key === 0){
this.setState({
Phonenumberisnotcos:undefined

Loading…
Cancel
Save