Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
techbook
Project
Project
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
front-end-dev
techbook
Commits
4364e7d9
Commit
4364e7d9
authored
Jan 13, 2021
by
zhangyanni
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交埋点
parent
b79f46ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
3 deletions
+70
-3
stagerouter.vue
src/views/mobile/proFeedback/stagerouter.vue
+70
-3
No files found.
src/views/mobile/proFeedback/stagerouter.vue
View file @
4364e7d9
...
...
@@ -9,12 +9,15 @@
<
script
>
import
api
from
'./api'
import
commonApi
from
'../../../common/commonApi'
export
default
{
name
:
"stagerouter"
,
data
(){
return
{
stage
:
this
.
$route
.
query
.
stage
?
this
.
$route
.
query
.
stage
:
null
,
id
:
this
.
$route
.
query
.
id
id
:
this
.
$route
.
query
.
id
,
documentFront
:
""
,
pathfrom
:
""
,
}
},
methods
:{
...
...
@@ -33,18 +36,82 @@
this
.
$toast
(
err
);
})
}
}
},
//获取浏览器前缀
getDocumentFunc
(){
commonApi
.
getDocumentAxios
().
then
(
response
=>
{
if
(
response
.
code
==
0
)
{
this
.
documentFront
=
response
.
result
.
websitePrefix
+
"#"
;
this
.
maiDianFunc
();
}
else
{
this
.
$toast
(
response
.
msgCode
)
}
}).
catch
(
error
=>
{
this
.
$toast
(
error
);
});
},
//埋点
maiDianFunc
(
type
,
data
){
//type=1 视频下一句话介绍
//type=2 列表初始化
//type=3 点评
//type=4 视频播放后的分享
//type=5 视频下的分享
//type=6 视频播放后的详情
let
params
=
{
type
:
"activity-index"
,
parameters
:{
activityId
:
this
.
$route
.
query
.
id
,
projectId
:
this
.
$route
.
query
.
proId
?
this
.
$route
.
query
.
proId
:
undefined
,
rDeviceId
:
this
.
publicFun
.
getCookie
(
"rDeviceId"
)
&&
this
.
publicFun
.
getCookie
(
"rDeviceId"
)
!=
undefined
?
this
.
publicFun
.
getCookie
(
"rDeviceId"
)
:
null
,
rEmpId
:
this
.
publicFun
.
getCookie
(
"rEmpId"
)
&&
this
.
publicFun
.
getCookie
(
"rEmpId"
)
!=
undefined
?
this
.
publicFun
.
getCookie
(
"rEmpId"
)
:
null
,
rTargetType
:
this
.
publicFun
.
getCookie
(
"rTargetType"
)
&&
this
.
publicFun
.
getCookie
(
"rTargetType"
)
!=
undefined
?
this
.
publicFun
.
getCookie
(
"rTargetType"
)
:
null
,
targetType
:
data
?
data
:
undefined
},
purl
:
this
.
pathfrom
==
'/'
?
undefined
:
this
.
documentFront
+
this
.
pathfrom
,
curl
:
document
.
location
.
href
};
api
.
maiDianAxios
(
params
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
){
if
(
type
==
3
){
let
query
=
{
subId
:
this
.
currentData
.
id
,
proId
:
this
.
currentData
.
projectId
,
activityId
:
this
.
$route
.
query
.
id
,
isList
:
true
,
stage
:
this
.
$route
.
query
.
stage
};
this
.
$router
.
push
({
path
:
"/secondStageDetail"
,
query
:
query
});
}
}
else
{
this
.
$toast
(
res
.
msg
);
}
}).
catch
((
err
)
=>
{
this
.
$toast
(
err
);
})
},
},
mounted
(){
this
.
publicFun
.
setUserInfoCookie
(
"sendCurrentStage"
,
true
);
this
.
getInitStage
();
this
.
getDocumentFunc
()
},
beforeRouteLeave
(
to
,
form
,
next
)
{
this
.
publicFun
.
removeCookie
(
"sendCurrentStage"
);
next
()
}
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
// 这里的vm指的就是vue实例,可以用来当做this使用
vm
.
pathfrom
=
from
.
fullPath
;
})
},
}
</
script
>
...
...
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