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
7fb7b733
Commit
7fb7b733
authored
Jan 20, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app内登录bug
parent
7e60f9c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
16 deletions
+20
-16
src/App.js
+20
-16
No files found.
src/App.js
View file @
7fb7b733
...
...
@@ -3,7 +3,7 @@ import Routes from './router'
import
cookie
from
'js-cookie'
import
{
connect
}
from
"react-redux"
import
{
setCurrentUser
,
startFetchUser
}
from
"@/store/userAction"
import
{
initialState
}
from
"@/store/userReducer"
import
{
initialState
}
from
"@/store/userReducer"
import
{
withRouter
,
Link
}
from
'react-router-dom'
import
{
compose
}
from
'redux'
import
{
getParam
,
http
,
browser
}
from
"@/utils"
...
...
@@ -34,18 +34,22 @@ class App extends Component {
pathnameBlacklist
=
[
'/country'
,
'/passport'
]
firstLoad
=
true
componentWillMount
(){
componentWillMount
()
{
if
(
!
getParam
(
'version'
))
{
if
(
!
cookie
.
get
(
'qimoClientIdedu'
))
{
if
(
!
cookie
.
get
(
'qimoClientIdedu'
))
{
this
.
getqimoClientId
()
}
else
{
window
.
qimoClientId
=
cookie
.
get
(
'qimoClientIdedu'
)}
window
.
qimoClientId
=
cookie
.
get
(
'qimoClientIdedu'
)
}
}
}
componentDidMount
()
{
this
.
umengStatistic
()
//平台信息
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
!
getParam
(
'version'
)
&&
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
if
(
browser
.
isWeixin
&&
browser
.
isIOS
)
{
sessionStorage
.
setItem
(
'enter_url'
,
window
.
location
.
href
)
...
...
@@ -285,19 +289,19 @@ class App extends Component {
// 七陌客服代码 start
getqimoClientId
=
()
=>
{
getqimoClientId
=
()
=>
{
http
.
post
(
`
${
API
[
'home'
]}
/qiMoUserId`
)
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
window
.
qimoClientId
=
res
.
data
.
data
.
userId
cookie
.
set
(
'qimoClientIdedu'
,
res
.
data
.
data
.
userId
,
{
domain
:
'.julyedu.com'
})
}
})
.
catch
(
function
()
{
})
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
window
.
qimoClientId
=
res
.
data
.
data
.
userId
cookie
.
set
(
'qimoClientIdedu'
,
res
.
data
.
data
.
userId
,
{
domain
:
'.julyedu.com'
})
}
})
.
catch
(
function
()
{
})
}
QimoClient
=
()
=>
{
QimoClient
=
()
=>
{
let
utm_source
=
getParam
(
'utm_source'
)
let
utm_medium
=
getParam
(
'utm_medium'
)
let
utm_campaign
=
getParam
(
'utm_campaign'
)
...
...
@@ -320,8 +324,8 @@ class App extends Component {
document
.
body
.
appendChild
(
script
)
}
// 七陌客服代码 end
// 七陌客服代码 end
render
()
{
...
...
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