Commit 316586ea by 万亚飞

fix

parent 14763990
...@@ -42,10 +42,10 @@ class TrainItem extends Component { ...@@ -42,10 +42,10 @@ class TrainItem extends Component {
console.log(this.props.history); console.log(this.props.history);
if (data.auditStatus == 1) return; if (data.auditStatus == 1) return;
if (iType === 3) { if (iType === 3) {
linkTo(`/user/train/${data.id}?modifyId=${data.modifyId}`); linkTo(`/new/user/train/${data.id}?modifyId=${data.modifyId}`);
// this.props.history.push(); // this.props.history.push();
} else { } else {
linkTo(`/user/job/${data.id}?index=${iType}&modifyId=${data.modifyId}`); linkTo(`/new/user/job/${data.id}?index=${iType}&modifyId=${data.modifyId}`);
// this.props.history.push(); // this.props.history.push();
} }
}} }}
......
...@@ -19,7 +19,7 @@ function AddView(props) { ...@@ -19,7 +19,7 @@ function AddView(props) {
<a <a
className="am-button am-button-primary" className="am-button am-button-primary"
onClick={() => { onClick={() => {
linkTo(`/user/job/add?index=${props.tabIndex}`); linkTo(`/new/user/job/add?index=${props.tabIndex}`);
}} }}
> >
添加{MATERIAL_ARR[props.tabIndex]} 添加{MATERIAL_ARR[props.tabIndex]}
...@@ -32,7 +32,7 @@ function NoDataView(props) { ...@@ -32,7 +32,7 @@ function NoDataView(props) {
<a <a
className="add-train" className="add-train"
onClick={() => { onClick={() => {
linkTo(`/user/job/add?index=${props.tabIndex}`); linkTo(`/new/user/job/add?index=${props.tabIndex}`);
}} }}
> >
<i className="y-icon-add" /> <i className="y-icon-add" />
...@@ -73,6 +73,7 @@ class JobList extends Component { ...@@ -73,6 +73,7 @@ class JobList extends Component {
}; };
} }
componentWillMount() { componentWillMount() {
const _this = this;
document.title = '职业背景'; document.title = '职业背景';
this.setState({ this.setState({
tabIndex: parseInt(getParameterByName('index', location.href)) || 0 tabIndex: parseInt(getParameterByName('index', location.href)) || 0
......
...@@ -78,7 +78,7 @@ class TrainList extends Component { ...@@ -78,7 +78,7 @@ class TrainList extends Component {
<div className="bottom-operate"> <div className="bottom-operate">
<a <a
onClick={() => { onClick={() => {
linkTo('/user/train/add'); linkTo('/new/user/train/add');
}} }}
className="am-button am-button-primary" className="am-button am-button-primary"
> >
...@@ -111,7 +111,7 @@ class TrainList extends Component { ...@@ -111,7 +111,7 @@ class TrainList extends Component {
) : ( ) : (
<a <a
onClick={() => { onClick={() => {
linkTo('/user/train/add'); linkTo('/new/user/train/add');
}} }}
className="add-train" className="add-train"
> >
......
...@@ -52,8 +52,12 @@ export function getImgNaturalDimensions(imgSrc, callback) { ...@@ -52,8 +52,12 @@ export function getImgNaturalDimensions(imgSrc, callback) {
// } // }
return [nWidth, nHeight]; return [nWidth, nHeight];
} }
export function linkTo(url) { export function linkTo(url, isReplace) {
location.href = url; if (isReplace) {
location.replace(url);
} else {
location.href = url;
}
// alert(`${location.origin}${url}`); // alert(`${location.origin}${url}`);
// app().goPage('壹点零', `${location.origin}${url}`); // app().goPage('壹点零', `${location.origin}${url}`);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment