Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
3028447c
Commit
3028447c
authored
Jun 18, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'intelligent-recommend' into dev
parents
165e9abd
95f355c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
22 deletions
+23
-22
src/App.js
+20
-20
src/components/intelligent-recommend/index.js
+3
-2
No files found.
src/App.js
View file @
3028447c
...
...
@@ -29,7 +29,7 @@ class App extends Component {
super
(
props
)
this
.
state
=
{
isShowActivityEntry
:
0
,
isShowChannel
:
0
isShowChannel
:
0
,
}
this
.
globalEntry
=
null
}
...
...
@@ -69,8 +69,8 @@ class App extends Component {
this
.
getUser
()
this
.
utm
()
const
{
history
}
=
this
.
props
const
{
history
,
location
}
=
this
.
props
this
.
records
.
push
(
location
)
this
.
setNavigationRecord
(
this
.
props
.
location
,
this
.
props
.
history
.
action
)
this
.
setPreviousLocation
()
...
...
@@ -95,9 +95,9 @@ class App extends Component {
from
:
{
pathname
:
this
.
previousLocation
.
pathname
,
search
:
this
.
previousLocation
.
search
,
hash
:
this
.
previousLocation
.
hash
}
}
hash
:
this
.
previousLocation
.
hash
,
}
,
}
,
}
}
else
{
this
.
removeShareCodeCookie
()
...
...
@@ -114,7 +114,7 @@ class App extends Component {
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
this
.
setState
({
isShowActivityEntry
:
data
.
treasure_stage
,
isShowChannel
:
data
.
is_show_site_window_by_channel
isShowChannel
:
data
.
is_show_site_window_by_channel
,
},
()
=>
{
data
.
treasure_stage
&&
this
.
bindGlobalEntry
()
})
...
...
@@ -171,7 +171,7 @@ class App extends Component {
if
(
zhihu_cb
)
{
let
data
=
{
'zhihu_cb'
:
zhihu_cb
'zhihu_cb'
:
zhihu_cb
,
}
http
.
post
(
`
${
API
[
'home'
]}
/sys/zhihu/firstRecord`
,
data
)
...
...
@@ -253,8 +253,8 @@ class App extends Component {
user_name
:
username
,
is_vip
:
isVIP
,
uid
,
code
}
code
,
}
,
}
=
res
.
data
payload
=
{
...
...
@@ -265,15 +265,15 @@ class App extends Component {
isVIP
,
avatar
,
uid
,
code
}
code
,
}
,
}
}
else
{
payload
=
{
hasError
:
true
,
msg
:
res
.
data
.
msg
,
code
:
res
.
data
.
code
,
data
:
{}
data
:
{}
,
}
}
return
payload
...
...
@@ -284,7 +284,7 @@ class App extends Component {
if
(
data
.
errno
==
200
)
{
//移除红包统计cookie
this
.
removeShareCodeCookie
()
let
{
uid
,
token
,
avatar_file
:
avatar
,
uname
:
username
,
}
=
data
.
data
let
{
uid
,
token
,
avatar_file
:
avatar
,
uname
:
username
}
=
data
.
data
return
{
hasError
:
false
,
...
...
@@ -292,9 +292,9 @@ class App extends Component {
uid
,
token
,
avatar
,
username
username
,
},
msg
:
data
.
msg
msg
:
data
.
msg
,
}
}
else
{
let
{
code
,
msg
}
=
data
.
data
...
...
@@ -302,7 +302,7 @@ class App extends Component {
code
,
msg
,
hasError
:
true
,
data
:
{}
data
:
{}
,
}
}
}
...
...
@@ -338,7 +338,7 @@ class App extends Component {
closeGlobalEntry
=
()
=>
{
localStorage
.
setItem
(
'globalEntryClosedTime'
,
Date
.
now
().
toString
())
this
.
setState
({
isShowActivityEntry
:
0
isShowActivityEntry
:
0
,
})
}
...
...
@@ -377,7 +377,7 @@ class App extends Component {
export
default
compose
(
connect
(
state
=>
({
user
:
state
.
user
}),
{
setCurrentUser
,
startFetchUser
}
{
setCurrentUser
,
startFetchUser
}
,
),
withRouter
withRouter
,
)(
App
)
src/components/intelligent-recommend/index.js
View file @
3028447c
...
...
@@ -31,11 +31,12 @@ class IntelligentRecommend extends Component {
}
componentDidMount
()
{
const
{
user
,
intelligentRecommend
,
history
}
=
this
.
props
const
{
user
,
intelligentRecommend
,
history
,
reselect
}
=
this
.
props
if
(
user
.
hasError
)
{
return
history
.
push
(
'/passport'
)
}
if
(
!
intelligentRecommend
.
processing
.
length
)
{
if
(
isEmpty
(
intelligentRecommend
.
result
))
{
reselect
()
this
.
getMessage
()
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment