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
41f4c4cf
Commit
41f4c4cf
authored
Jan 04, 2020
by
xuzhenghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户id
parent
69a8c351
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
src/App.js
+18
-16
No files found.
src/App.js
View file @
41f4c4cf
...
@@ -32,13 +32,12 @@ class App extends Component {
...
@@ -32,13 +32,12 @@ class App extends Component {
pathnameBlacklist
=
[
'/country'
,
'/passport'
]
pathnameBlacklist
=
[
'/country'
,
'/passport'
]
firstLoad
=
true
firstLoad
=
true
componentWillMount
(){
this
.
getqimoClientId
()
}
componentDidMount
()
{
componentDidMount
()
{
this
.
umengStatistic
()
this
.
umengStatistic
()
this
.
QimoClient
()
//平台信息
//平台信息
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
cookie
.
set
(
'plat'
,
'5'
,
{
domain
:
'.julyedu.com'
})
...
@@ -204,6 +203,10 @@ class App extends Component {
...
@@ -204,6 +203,10 @@ class App extends Component {
if
(
!
this
.
props
.
user
.
hasError
&&
getParam
(
'redirect'
))
{
if
(
!
this
.
props
.
user
.
hasError
&&
getParam
(
'redirect'
))
{
window
.
location
.
href
=
getParam
(
'redirect'
)
window
.
location
.
href
=
getParam
(
'redirect'
)
}
}
this
.
QimoClient
()
}
}
setPreviousLocation
=
()
=>
{
setPreviousLocation
=
()
=>
{
...
@@ -279,6 +282,17 @@ class App extends Component {
...
@@ -279,6 +282,17 @@ class App extends Component {
// 七陌客服代码 start
// 七陌客服代码 start
getqimoClientId
=
()
=>
{
http
.
post
(
`
${
API
[
'home'
]}
/qiMoUserId`
)
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
window
.
qimoClientId
=
res
.
data
.
data
.
userId
}
})
.
catch
(
function
()
{
})
}
QimoClient
=
()
=>
{
QimoClient
=
()
=>
{
let
utm_source
=
getParam
(
'utm_source'
)
let
utm_source
=
getParam
(
'utm_source'
)
let
utm_medium
=
getParam
(
'utm_medium'
)
let
utm_medium
=
getParam
(
'utm_medium'
)
...
@@ -295,23 +309,11 @@ class App extends Component {
...
@@ -295,23 +309,11 @@ class App extends Component {
src
=
'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=fbcf9aa0-2d03-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
src
=
'https://webchat.7moor.com/javascripts/7moorInit.js?accessId=fbcf9aa0-2d03-11ea-84c3-43908ae47640&autoShow=true&language=ZHCN'
}
}
var
timestamp
=
new
Date
().
getTime
()
cookie
.
set
(
'qimoClientIdTimestamp'
,
timestamp
,
{
domain
:
'.julyedu.com'
})
var
script
=
document
.
createElement
(
'script'
)
var
script
=
document
.
createElement
(
'script'
)
script
.
type
=
'text/javascript'
script
.
type
=
'text/javascript'
script
.
src
=
src
script
.
src
=
src
script
.
async
=
'async'
script
.
async
=
'async'
var
qimoClientId
=
''
// 自定义用户的唯一id,由英文字母,数字,下划线组成
http
.
get
(
`
${
API
[
'home'
]}
/qiMoUserId`
)
.
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
qimoClientId
=
res
.
data
.
data
.
userId
}
console
.
log
(
qimoClientId
)
document
.
body
.
appendChild
(
script
)
document
.
body
.
appendChild
(
script
)
})
}
}
// 七陌客服代码 end
// 七陌客服代码 end
...
...
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