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
1e1d1681
Commit
1e1d1681
authored
Aug 06, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 用户操作触发调用接口埋点
parent
abf8ed2f
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
178 additions
and
43 deletions
+178
-43
beginAnswer.vue
src/pages/learn/beginAnswer.vue
+41
-21
boundQuestions.vue
src/pages/learn/boundQuestions.vue
+15
-0
boundTest.vue
src/pages/learn/boundTest.vue
+7
-0
detail.vue
src/pages/learn/detail.vue
+16
-0
examSetting.vue
src/pages/learn/examSetting.vue
+24
-0
manualBinding.vue
src/pages/learn/manualBinding.vue
+10
-0
record.vue
src/pages/learn/record.vue
+49
-22
selectCategory.vue
src/pages/learn/selectCategory.vue
+8
-0
selectedList.vue
src/pages/learn/selectedList.vue
+8
-0
No files found.
src/pages/learn/beginAnswer.vue
View file @
1e1d1681
...
...
@@ -25,7 +25,9 @@
</view>
<view
class=
"line-view"
></view>
<view
class=
"tip-view"
>
温馨提示:模拟考试中不能修改答案,每做错1道题扣1分,合格标准为
{{
info
.
passPoint
}}
分。
</view
>
温馨提示:模拟考试中不能修改答案,每做错1道题扣1分,合格标准为
{{
info
.
passPoint
}}
分。
</view
>
<view
class=
"bottom-view"
>
<u-button
...
...
@@ -85,32 +87,50 @@ export default {
methods
:
{
init
()
{
uni
.
showLoading
({
title
:
'加载中'
})
this
.
$u
.
api
.
getExamPaper
({
questionWarehouseId
:
this
.
questionWarehouseId
}).
then
(
res
=>
{
uni
.
hideLoading
()
this
.
info
=
{
id
:
res
.
id
,
kemu
:
res
.
echoMap
?.
questionWarehouseId
?.
title
,
tishu
:
`
${
res
.
totalPoint
}
题`
,
totalPoint
:
res
.
totalPoint
,
biaozhun
:
`
${
res
.
passPoint
}
分`
,
passPoint
:
res
.
passPoint
,
duration
:
`
${
res
.
duration
}
分钟`
,
durationNumber
:
res
.
duration
,
guize
:
'根据国家规定比例随机抽取'
}
title
:
'加载中'
,
})
// 埋点-模拟考试页面获取信息
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
questionWarehouseId
:
this
.
questionWarehouseId
,
}
getApp
().
track
(
'getExamPaper-beginAnswerPage'
,
trackParams
)
this
.
$u
.
api
.
getExamPaper
({
questionWarehouseId
:
this
.
questionWarehouseId
})
.
then
((
res
)
=>
{
uni
.
hideLoading
()
this
.
info
=
{
id
:
res
.
id
,
kemu
:
res
.
echoMap
?.
questionWarehouseId
?.
title
,
tishu
:
`
${
res
.
totalPoint
}
题`
,
totalPoint
:
res
.
totalPoint
,
biaozhun
:
`
${
res
.
passPoint
}
分`
,
passPoint
:
res
.
passPoint
,
duration
:
`
${
res
.
duration
}
分钟`
,
durationNumber
:
res
.
duration
,
guize
:
'根据国家规定比例随机抽取'
,
}
})
},
handleClick
()
{
const
params
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
paperId
:
this
.
info
.
id
paperId
:
this
.
info
.
id
,
}
uni
.
showLoading
({
title
:
'载入试题中'
title
:
'载入试题中'
,
})
this
.
$u
.
api
.
applyExam
(
params
).
then
(
res
=>
{
// 埋点-去模拟考试
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
,
}
getApp
().
track
(
'applyExam-beginAnswerPage'
,
trackParams
)
this
.
$u
.
api
.
applyExam
(
params
).
then
((
res
)
=>
{
uni
.
hideLoading
()
if
(
res
)
{
this
.
$u
.
route
({
...
...
@@ -120,8 +140,8 @@ export default {
source
:
3
,
passPoint
:
this
.
info
.
passPoint
,
totalPoint
:
this
.
info
.
totalPoint
,
duration
:
this
.
info
.
durationNumber
}
duration
:
this
.
info
.
durationNumber
,
}
,
})
}
})
...
...
src/pages/learn/boundQuestions.vue
View file @
1e1d1681
...
...
@@ -95,6 +95,13 @@ export default {
},
methods
:
{
handleClick
()
{
// 埋点-扫码
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'scanCode-boundQuestionsPage'
,
trackParams
)
wx
.
scanCode
({
onlyFromCamera
:
true
,
success
:
(
res
)
=>
{
...
...
@@ -142,6 +149,14 @@ export default {
uni
.
showLoading
({
title
:
'加载中'
,
})
// 埋点-购买
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
data
,
}
getApp
().
track
(
'payOrder-boundQuestionsPage'
,
trackParams
)
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
this
.
pay
(
res
)
...
...
src/pages/learn/boundTest.vue
View file @
1e1d1681
...
...
@@ -74,6 +74,13 @@ export default {
methods
:
{
handleClick
()
{
this
.
loading
=
true
// 埋点-绑卡
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'bindCard-boundTestPage'
,
trackParams
)
this
.
$u
.
api
.
bindCard
(
this
.
param
)
.
then
((
res
)
=>
{
...
...
src/pages/learn/detail.vue
View file @
1e1d1681
...
...
@@ -178,6 +178,14 @@ export default {
},
methods
:
{
queryQuestionWarehouseById
(
id
)
{
// 埋点-获取题库信息
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
id
:
id
,
}
getApp
().
track
(
'queryQuestionWarehouseById-DetailPage'
,
trackParams
)
this
.
$u
.
api
.
queryQuestionWarehouseById
(
id
)
.
then
((
res
)
=>
{
...
...
@@ -213,6 +221,14 @@ export default {
uni
.
showLoading
({
title
:
'加载中'
,
})
// 埋点-购买
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
data
,
}
getApp
().
track
(
'payOrder-DetailPage'
,
trackParams
)
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
this
.
pay
(
res
)
...
...
src/pages/learn/examSetting.vue
View file @
1e1d1681
...
...
@@ -210,6 +210,14 @@ export default {
},
// 获取省份列表
async
getProvinceList
(
id
)
{
// 埋点-获取省份
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
id
:
id
,
}
getApp
().
track
(
'getProvinceList-examSettingPage'
,
trackParams
)
let
res
=
await
this
.
$u
.
api
.
getProvinceList
(
id
)
console
.
log
(
res
)
this
.
range
=
res
||
[]
...
...
@@ -235,6 +243,14 @@ export default {
provinceId
:
this
.
range
[
this
.
index
].
id
,
type
:
this
.
selectedTypeId
,
}
// 埋点-获取题库信息
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
param
,
}
getApp
().
track
(
'getQuestionWarehouse-examSettingPage'
,
trackParams
)
// 获取科目对应的题库
this
.
$u
.
api
.
getQuestionWarehouse
(
this
.
category
.
id
,
param
)
...
...
@@ -242,6 +258,14 @@ export default {
if
(
res
&&
res
.
length
>
0
)
{
let
data
=
res
[
0
]
// 埋点-添加题库
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
questionWarehouseId
:
data
.
id
,
}
getApp
().
track
(
'addQuestionWarehouse-examSettingPage'
,
trackParams
)
// 学员增加自己的题库
this
.
$u
.
api
.
addQuestionWarehouse
({
...
...
src/pages/learn/manualBinding.vue
View file @
1e1d1681
...
...
@@ -130,6 +130,16 @@ export default {
}
this
.
loading
=
true
// 埋点-手动绑卡
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
cardNumber
:
this
.
code
,
cardSecret
:
this
.
password
,
questionWarehouseId
:
this
.
relationId
,
}
getApp
().
track
(
'bindCard-manualBindingPage'
,
trackParams
)
this
.
$u
.
api
.
bindCard
({
cardNumber
:
this
.
code
,
...
...
src/pages/learn/record.vue
View file @
1e1d1681
...
...
@@ -236,6 +236,16 @@ export default {
'yyyy-mm-dd'
),
}
// 埋点-每日一练统计
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
id
:
this
.
questionWarehouseId
,
...
params
,
}
getApp
().
track
(
'everyTaskList-recordPage'
,
trackParams
)
this
.
$u
.
api
.
everyTaskList
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
...
...
@@ -252,6 +262,14 @@ export default {
},
// 练习分析
studyRecord
(
params
)
{
// 埋点-练习分析
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
,
}
getApp
().
track
(
'studyRecord-recordPage'
,
trackParams
)
this
.
$u
.
api
.
studyRecord
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
...
...
@@ -278,31 +296,40 @@ export default {
// 模考记录
queryExamRecord
()
{
this
.
recordParams
.
current
+=
1
;(
this
.
recordParams
.
model
=
{
this
.
recordParams
.
model
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
}),
this
.
$u
.
api
.
queryExamRecord
(
this
.
recordParams
)
.
then
((
res
)
=>
{
this
.
loaded
=
true
if
(
this
.
recordParams
.
current
==
1
)
{
this
.
lists
=
[]
}
}
if
((
res
.
records
||
[]).
length
>
0
)
{
this
.
lists
.
push
(...
res
.
records
)
}
// 埋点-模考记录
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
this
.
recordParams
,
}
getApp
().
track
(
'queryExamRecord-recordPage'
,
trackParams
)
this
.
currentLoadStatus
=
res
.
total
>
this
.
lists
.
length
&&
(
res
.
records
||
[]).
length
==
this
.
recordParams
.
size
?
'loadmore'
:
'nomore'
})
.
catch
((
err
)
=>
{
this
.
loaded
=
true
console
.
log
(
err
)
})
this
.
$u
.
api
.
queryExamRecord
(
this
.
recordParams
)
.
then
((
res
)
=>
{
this
.
loaded
=
true
if
(
this
.
recordParams
.
current
==
1
)
{
this
.
lists
=
[]
}
if
((
res
.
records
||
[]).
length
>
0
)
{
this
.
lists
.
push
(...
res
.
records
)
}
this
.
currentLoadStatus
=
res
.
total
>
this
.
lists
.
length
&&
(
res
.
records
||
[]).
length
==
this
.
recordParams
.
size
?
'loadmore'
:
'nomore'
})
.
catch
((
err
)
=>
{
this
.
loaded
=
true
console
.
log
(
err
)
})
},
handleChangeMonth
(
e
)
{
this
.
everyTaskList
(
e
.
year
,
e
.
month
)
...
...
src/pages/learn/selectCategory.vue
View file @
1e1d1681
...
...
@@ -150,6 +150,14 @@ export default {
async
loadLabel
()
{
this
.
tapLoading
=
true
let
param
=
{}
// 埋点-获取科目列表
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'subjectList-selectCategoryPage'
,
trackParams
)
let
res
=
await
this
.
$u
.
api
.
subjectList
(
param
)
this
.
tapLoading
=
false
this
.
result
=
res
...
...
src/pages/learn/selectedList.vue
View file @
1e1d1681
...
...
@@ -89,6 +89,14 @@ export default {
loadList
()
{
this
.
loading
=
true
let
param
=
{}
// 埋点-获取已选题库列表
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'getMyQuestionWarehouseList-selectedList'
,
trackParams
)
this
.
$u
.
api
.
getMyQuestionWarehouseList
(
param
)
.
then
((
res
)
=>
{
...
...
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