Commit 96a6ef8d by zhanghaozhe

Merge branch 'intelligent-recommend' into dev

parents f387fba5 592cdf5b
...@@ -69,8 +69,7 @@ class App extends Component { ...@@ -69,8 +69,7 @@ class App extends Component {
this.getUser() this.getUser()
this.utm() this.utm()
const {history, location} = this.props const {history} = this.props
this.records.push(location)
this.setNavigationRecord(this.props.location, this.props.history.action) this.setNavigationRecord(this.props.location, this.props.history.action)
this.setPreviousLocation() this.setPreviousLocation()
...@@ -142,13 +141,12 @@ class App extends Component { ...@@ -142,13 +141,12 @@ class App extends Component {
const {pathname, search, hash} = location const {pathname, search, hash} = location
let isLastRecord = location.pathname === (this.records.length && this.records[this.records.length - 1].pathname) let isLastRecord = location.pathname === (this.records.length && this.records[this.records.length - 1].pathname)
let needHistoryMutation = location.pathname !== this.previousLocation.pathname let needHistoryMutation = location.pathname !== this.previousLocation.pathname
switch (action) { switch (action) {
case 'POP': case 'POP':
if (needHistoryMutation) { if (needHistoryMutation) {
this.firstLoad ? this.records.push({pathname, search, hash}) : this.records.pop() this.firstLoad ? this.records.push({pathname, search, hash}) : this.records.pop()
} else { } else {
this.records[this.records.length - 1] = location this.records.length ? (this.records[this.records.length - 1] = location) : this.records = [location]
} }
break break
case 'REPLACE': case 'REPLACE':
...@@ -160,8 +158,10 @@ class App extends Component { ...@@ -160,8 +158,10 @@ class App extends Component {
location.state && location.state.records location.state && location.state.records
? (location.state.records = this.records) ? (location.state.records = this.records)
: location.state ? location.state = {...location.state, records: this.records} : location.state ? location.state = {
: (location.state = {records: this.records}) ...location.state,
records: this.records,
} : (location.state = {records: this.records})
} }
......
...@@ -202,7 +202,8 @@ class IntelligentRecommend extends Component { ...@@ -202,7 +202,8 @@ class IntelligentRecommend extends Component {
alt=""/> alt=""/>
</div> </div>
<div className="info"> <div className="info">
<div className={'title'}>{item.recmd_title}</div> {/*<div className={'title'}>{item.recmd_title}</div>*/}
<div className={'title'}>Python数据分析 升级版[6K,都if就饿哦今晚i哦减肥i</div>
<div className={'des'}>{item.recmd_desc}</div> <div className={'des'}>{item.recmd_desc}</div>
<div className="bar"> <div className="bar">
{ {
......
#intelligent-recommend { #intelligent-recommend {
background: linear-gradient(to right, #F1F0F6, #EBF4F9); background: linear-gradient(to right, #F1F0F6, #EBF4F9);
padding: 59px 10px 18px; padding: 59px 10px 18px;
height: 100%; min-height: 100%;
.clearfix { .clearfix {
&::after { &::after {
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
} }
.title { .title {
width: 97%; width: 190px;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
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