Commit 91ab28d9 by xuzhenghua

pull

parent 0d89d717
......@@ -488,7 +488,10 @@ class BlessingPreheat extends Component {
}
{
showRecordList &&
<RecordPopup handleToHide={() => this.handleToHide('showRecordList')}/>
<RecordPopup
history={this.props.history}
handleToHide={() => this.handleToHide('showRecordList')}
/>
}
{
shareMark &&
......
import React, { Component } from 'react'
import './index.scss'
import { http } from '@/utils';
import { http, getParam } from '@/utils';
export default class RecordPopup extends Component {
constructor(props) {
......@@ -21,6 +21,16 @@ export default class RecordPopup extends Component {
});
}
handleToTestRecord = (e, id) => {
e.preventDefault();
const { history } = this.props;
if(getParam('version')) {
location.href = `${API.m}/levelTest/report?id=${id}&version=${getParam('version')}`;
} else {
location.href = `${API.m}/levelTest/report?id=${id}&version=${getParam('version')}`;
}
}
render() {
let {recordList} = this.state;
......@@ -49,7 +59,7 @@ export default class RecordPopup extends Component {
<span className="tr">
{
index === 0 ? (
<a href={`/levelTest/report?id=${item.id}`}>测试记录</a>
<a onClick={(e) => this.handleToTestRecord(e, item.id)}>测试记录</a>
) : (null)
}
</span>
......
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