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 @@
...
@@ -25,7 +25,9 @@
</view>
</view>
<view
class=
"line-view"
></view>
<view
class=
"line-view"
></view>
<view
class=
"tip-view"
<view
class=
"tip-view"
>
温馨提示:模拟考试中不能修改答案,每做错1道题扣1分,合格标准为
{{
info
.
passPoint
}}
分。
</view
>
温馨提示:模拟考试中不能修改答案,每做错1道题扣1分,合格标准为
{{
info
.
passPoint
}}
分。
</view
>
>
<view
class=
"bottom-view"
>
<view
class=
"bottom-view"
>
<u-button
<u-button
...
@@ -85,32 +87,50 @@ export default {
...
@@ -85,32 +87,50 @@ export default {
methods
:
{
methods
:
{
init
()
{
init
()
{
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
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
:
'根据国家规定比例随机抽取'
}
})
})
// 埋点-模拟考试页面获取信息
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
()
{
handleClick
()
{
const
params
=
{
const
params
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
questionWarehouseId
:
this
.
questionWarehouseId
,
paperId
:
this
.
info
.
id
paperId
:
this
.
info
.
id
,
}
}
uni
.
showLoading
({
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
()
uni
.
hideLoading
()
if
(
res
)
{
if
(
res
)
{
this
.
$u
.
route
({
this
.
$u
.
route
({
...
@@ -120,8 +140,8 @@ export default {
...
@@ -120,8 +140,8 @@ export default {
source
:
3
,
source
:
3
,
passPoint
:
this
.
info
.
passPoint
,
passPoint
:
this
.
info
.
passPoint
,
totalPoint
:
this
.
info
.
totalPoint
,
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 {
...
@@ -95,6 +95,13 @@ export default {
},
},
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
// 埋点-扫码
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'scanCode-boundQuestionsPage'
,
trackParams
)
wx
.
scanCode
({
wx
.
scanCode
({
onlyFromCamera
:
true
,
onlyFromCamera
:
true
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
...
@@ -142,6 +149,14 @@ export default {
...
@@ -142,6 +149,14 @@ export default {
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
})
})
// 埋点-购买
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
data
,
}
getApp
().
track
(
'payOrder-boundQuestionsPage'
,
trackParams
)
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
pay
(
res
)
this
.
pay
(
res
)
...
...
src/pages/learn/boundTest.vue
View file @
1e1d1681
...
@@ -74,6 +74,13 @@ export default {
...
@@ -74,6 +74,13 @@ export default {
methods
:
{
methods
:
{
handleClick
()
{
handleClick
()
{
this
.
loading
=
true
this
.
loading
=
true
// 埋点-绑卡
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'bindCard-boundTestPage'
,
trackParams
)
this
.
$u
.
api
this
.
$u
.
api
.
bindCard
(
this
.
param
)
.
bindCard
(
this
.
param
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
...
src/pages/learn/detail.vue
View file @
1e1d1681
...
@@ -178,6 +178,14 @@ export default {
...
@@ -178,6 +178,14 @@ export default {
},
},
methods
:
{
methods
:
{
queryQuestionWarehouseById
(
id
)
{
queryQuestionWarehouseById
(
id
)
{
// 埋点-获取题库信息
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
id
:
id
,
}
getApp
().
track
(
'queryQuestionWarehouseById-DetailPage'
,
trackParams
)
this
.
$u
.
api
this
.
$u
.
api
.
queryQuestionWarehouseById
(
id
)
.
queryQuestionWarehouseById
(
id
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -213,6 +221,14 @@ export default {
...
@@ -213,6 +221,14 @@ export default {
uni
.
showLoading
({
uni
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
})
})
// 埋点-购买
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
data
,
}
getApp
().
track
(
'payOrder-DetailPage'
,
trackParams
)
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
this
.
$u
.
api
.
payOrder
(
data
).
then
((
res
)
=>
{
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
pay
(
res
)
this
.
pay
(
res
)
...
...
src/pages/learn/examSetting.vue
View file @
1e1d1681
...
@@ -210,6 +210,14 @@ export default {
...
@@ -210,6 +210,14 @@ export default {
},
},
// 获取省份列表
// 获取省份列表
async
getProvinceList
(
id
)
{
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
)
let
res
=
await
this
.
$u
.
api
.
getProvinceList
(
id
)
console
.
log
(
res
)
console
.
log
(
res
)
this
.
range
=
res
||
[]
this
.
range
=
res
||
[]
...
@@ -235,6 +243,14 @@ export default {
...
@@ -235,6 +243,14 @@ export default {
provinceId
:
this
.
range
[
this
.
index
].
id
,
provinceId
:
this
.
range
[
this
.
index
].
id
,
type
:
this
.
selectedTypeId
,
type
:
this
.
selectedTypeId
,
}
}
// 埋点-获取题库信息
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
param
,
}
getApp
().
track
(
'getQuestionWarehouse-examSettingPage'
,
trackParams
)
// 获取科目对应的题库
// 获取科目对应的题库
this
.
$u
.
api
this
.
$u
.
api
.
getQuestionWarehouse
(
this
.
category
.
id
,
param
)
.
getQuestionWarehouse
(
this
.
category
.
id
,
param
)
...
@@ -242,6 +258,14 @@ export default {
...
@@ -242,6 +258,14 @@ export default {
if
(
res
&&
res
.
length
>
0
)
{
if
(
res
&&
res
.
length
>
0
)
{
let
data
=
res
[
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
this
.
$u
.
api
.
addQuestionWarehouse
({
.
addQuestionWarehouse
({
...
...
src/pages/learn/manualBinding.vue
View file @
1e1d1681
...
@@ -130,6 +130,16 @@ export default {
...
@@ -130,6 +130,16 @@ export default {
}
}
this
.
loading
=
true
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
this
.
$u
.
api
.
bindCard
({
.
bindCard
({
cardNumber
:
this
.
code
,
cardNumber
:
this
.
code
,
...
...
src/pages/learn/record.vue
View file @
1e1d1681
...
@@ -236,6 +236,16 @@ export default {
...
@@ -236,6 +236,16 @@ export default {
'yyyy-mm-dd'
'yyyy-mm-dd'
),
),
}
}
// 埋点-每日一练统计
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
id
:
this
.
questionWarehouseId
,
...
params
,
}
getApp
().
track
(
'everyTaskList-recordPage'
,
trackParams
)
this
.
$u
.
api
this
.
$u
.
api
.
everyTaskList
(
this
.
questionWarehouseId
,
params
)
.
everyTaskList
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -252,6 +262,14 @@ export default {
...
@@ -252,6 +262,14 @@ export default {
},
},
// 练习分析
// 练习分析
studyRecord
(
params
)
{
studyRecord
(
params
)
{
// 埋点-练习分析
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
...
params
,
}
getApp
().
track
(
'studyRecord-recordPage'
,
trackParams
)
this
.
$u
.
api
this
.
$u
.
api
.
studyRecord
(
this
.
questionWarehouseId
,
params
)
.
studyRecord
(
this
.
questionWarehouseId
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
...
@@ -278,31 +296,40 @@ export default {
...
@@ -278,31 +296,40 @@ export default {
// 模考记录
// 模考记录
queryExamRecord
()
{
queryExamRecord
()
{
this
.
recordParams
.
current
+=
1
this
.
recordParams
.
current
+=
1
;(
this
.
recordParams
.
model
=
{
this
.
recordParams
.
model
=
{
questionWarehouseId
:
this
.
questionWarehouseId
,
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
=
this
.
$u
.
api
res
.
total
>
this
.
lists
.
length
&&
.
queryExamRecord
(
this
.
recordParams
)
(
res
.
records
||
[]).
length
==
this
.
recordParams
.
size
.
then
((
res
)
=>
{
?
'loadmore'
this
.
loaded
=
true
:
'nomore'
if
(
this
.
recordParams
.
current
==
1
)
{
})
this
.
lists
=
[]
.
catch
((
err
)
=>
{
}
this
.
loaded
=
true
console
.
log
(
err
)
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
)
{
handleChangeMonth
(
e
)
{
this
.
everyTaskList
(
e
.
year
,
e
.
month
)
this
.
everyTaskList
(
e
.
year
,
e
.
month
)
...
...
src/pages/learn/selectCategory.vue
View file @
1e1d1681
...
@@ -150,6 +150,14 @@ export default {
...
@@ -150,6 +150,14 @@ export default {
async
loadLabel
()
{
async
loadLabel
()
{
this
.
tapLoading
=
true
this
.
tapLoading
=
true
let
param
=
{}
let
param
=
{}
// 埋点-获取科目列表
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'subjectList-selectCategoryPage'
,
trackParams
)
let
res
=
await
this
.
$u
.
api
.
subjectList
(
param
)
let
res
=
await
this
.
$u
.
api
.
subjectList
(
param
)
this
.
tapLoading
=
false
this
.
tapLoading
=
false
this
.
result
=
res
this
.
result
=
res
...
...
src/pages/learn/selectedList.vue
View file @
1e1d1681
...
@@ -89,6 +89,14 @@ export default {
...
@@ -89,6 +89,14 @@ export default {
loadList
()
{
loadList
()
{
this
.
loading
=
true
this
.
loading
=
true
let
param
=
{}
let
param
=
{}
// 埋点-获取已选题库列表
let
trackParams
=
{
openId
:
this
.
openId
,
nickname
:
this
.
userInfo
.
nickName
,
}
getApp
().
track
(
'getMyQuestionWarehouseList-selectedList'
,
trackParams
)
this
.
$u
.
api
this
.
$u
.
api
.
getMyQuestionWarehouseList
(
param
)
.
getMyQuestionWarehouseList
(
param
)
.
then
((
res
)
=>
{
.
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