Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
study
Project
Project
Details
Activity
Releases
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
Damon
study
Commits
a4875794
Commit
a4875794
authored
Aug 06, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: 埋点数据补充
parent
2eaee313
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
19 deletions
+36
-19
App.vue
src/App.vue
+1
-11
answer.vue
src/pages/learn/answer.vue
+25
-6
score.vue
src/pages/learn/score.vue
+7
-1
detail.vue
src/pages/search/detail.vue
+3
-1
No files found.
src/App.vue
View file @
a4875794
...
@@ -180,17 +180,7 @@ export default {
...
@@ -180,17 +180,7 @@ export default {
if
(
AnalysysAgent
)
{
if
(
AnalysysAgent
)
{
AnalysysAgent
.
pageView
(
pageName
,
properties
)
AnalysysAgent
.
pageView
(
pageName
,
properties
)
}
}
},
}
initShare
(
option
)
{
option
=
option
||
{}
if
(
AnalysysAgent
&&
option
.
user_id
)
{
let
shareUserInfo
=
{
share_from_id
:
option
.
user_id
||
''
,
share_from_nickname
:
option
.
user_name
||
''
,
}
AnalysysAgent
.
registerSuperProperties
(
shareUserInfo
)
}
},
/* ------------------------- 数据埋点end ------------------------------ */
/* ------------------------- 数据埋点end ------------------------------ */
},
},
}
}
...
...
src/pages/learn/answer.vue
View file @
a4875794
...
@@ -299,8 +299,13 @@ export default {
...
@@ -299,8 +299,13 @@ export default {
recordId
:
this
.
recordId
,
recordId
:
this
.
recordId
,
source
:
this
.
source
,
source
:
this
.
source
,
}
}
getApp
().
track
(
"answer"
,
params
)
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
}
getApp
().
track
(
"answer"
,
trackParams
)
this
.
$u
.
api
.
getQuestionTotal
(
params
).
then
((
res
)
=>
{
this
.
$u
.
api
.
getQuestionTotal
(
params
).
then
((
res
)
=>
{
// 列表总长度,一定要在第一次请求列表数据前明确该值
// 列表总长度,一定要在第一次请求列表数据前明确该值
...
@@ -547,7 +552,12 @@ export default {
...
@@ -547,7 +552,12 @@ export default {
recordId
:
this
.
recordId
,
recordId
:
this
.
recordId
,
source
:
this
.
source
,
source
:
this
.
source
,
}
}
getApp
().
track
(
"submitAnswers"
,
params
)
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
}
getApp
().
track
(
"submitAnswers"
,
trackParams
)
this
.
$u
.
api
.
answer
([
params
]).
then
((
res
)
=>
{
this
.
$u
.
api
.
answer
([
params
]).
then
((
res
)
=>
{
if
(
this
.
source
===
2
)
{
if
(
this
.
source
===
2
)
{
// 每日一练
// 每日一练
...
@@ -580,7 +590,12 @@ export default {
...
@@ -580,7 +590,12 @@ export default {
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'正在计算考试成绩'
,
title
:
'正在计算考试成绩'
,
})
})
getApp
().
track
(
"handPaper"
,
data
)
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
data
}
getApp
().
track
(
"handPaper"
,
trackParams
)
this
.
$u
.
api
.
submitExamRecord
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
submitExamRecord
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
if
(
res
)
{
if
(
res
)
{
...
@@ -631,7 +646,9 @@ export default {
...
@@ -631,7 +646,9 @@ export default {
const
action
=
status
?
'removeCollection'
:
'joinCollection'
const
action
=
status
?
'removeCollection'
:
'joinCollection'
getApp
().
track
(
"collect"
,
{
getApp
().
track
(
"collect"
,
{
action
:
action
,
action
:
action
,
questionId
:
info
.
id
questionId
:
info
.
id
,
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
})
})
this
.
$u
.
api
[
action
]({
questionId
:
info
.
id
}).
then
((
res
)
=>
{
this
.
$u
.
api
[
action
]({
questionId
:
info
.
id
}).
then
((
res
)
=>
{
if
(
res
)
{
if
(
res
)
{
...
@@ -661,7 +678,9 @@ export default {
...
@@ -661,7 +678,9 @@ export default {
remove
()
{
remove
()
{
const
info
=
this
.
list
.
find
((
v
)
=>
v
.
index
===
this
.
currentIndex
)
const
info
=
this
.
list
.
find
((
v
)
=>
v
.
index
===
this
.
currentIndex
)
getApp
().
track
(
"removeError"
,
{
getApp
().
track
(
"removeError"
,
{
questionId
:
info
.
id
questionId
:
info
.
id
,
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
})
})
this
.
$u
.
api
.
removeError
({
questionId
:
info
.
id
}).
then
((
res
)
=>
{
this
.
$u
.
api
.
removeError
({
questionId
:
info
.
id
}).
then
((
res
)
=>
{
if
(
res
)
this
.
init
(
this
.
currentIndex
)
if
(
res
)
this
.
init
(
this
.
currentIndex
)
...
...
src/pages/learn/score.vue
View file @
a4875794
...
@@ -185,10 +185,16 @@ export default {
...
@@ -185,10 +185,16 @@ export default {
},
},
},
},
onShareAppMessage
(
res
)
{
onShareAppMessage
(
res
)
{
return
{
let
toShareProperties
=
{
title
:
'模考大师'
,
title
:
'模考大师'
,
path
:
`/pages/learn/score?id=
${
this
.
id
}
`
,
path
:
`/pages/learn/score?id=
${
this
.
id
}
`
,
}
}
let
trackProperties
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
}
getApp
().
share
(
toShareProperties
,
trackProperties
)
return
toShareProperties
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
getApp
().
trackPage
(
'考试成绩'
)
getApp
().
trackPage
(
'考试成绩'
)
...
...
src/pages/search/detail.vue
View file @
a4875794
...
@@ -100,8 +100,10 @@ export default {
...
@@ -100,8 +100,10 @@ export default {
getApp
().
track
(
"search"
,
{
getApp
().
track
(
"search"
,
{
questionWarehouseId
:
this
.
questionWarehouseId
,
questionWarehouseId
:
this
.
questionWarehouseId
,
keyword
:
this
.
keyword
,
keyword
:
this
.
keyword
,
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
})
})
this
.
loadStatus
=
'loading'
this
.
loadStatus
=
'loading'
this
.
$u
.
api
.
searchQuestion
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
searchQuestion
(
data
).
then
((
res
)
=>
{
this
.
total
=
res
.
total
this
.
total
=
res
.
total
...
...
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