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
3148f11e
Commit
3148f11e
authored
Aug 06, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 易观埋点-统计页面
parent
ae546358
Changes
33
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
33 changed files
with
162 additions
and
387 deletions
+162
-387
App.vue
src/App.vue
+92
-9
analysys_paas.js
src/common/analysys_paas.js
+32
-0
AnalysysAgent_WX_SDK.custom.min.js
src/libs/AnalysysAgent_WX_SDK.custom.min.js
+1
-0
AnalysysAgent_encryption.es6.min.js
src/libs/AnalysysAgent_encryption.es6.min.js
+1
-0
detail.vue
src/pages/cert/detail.vue
+1
-0
detailLearn.vue
src/pages/cert/detailLearn.vue
+1
-0
cert.vue
src/pages/index/cert.vue
+1
-0
index.vue
src/pages/index/index.vue
+1
-0
mine.vue
src/pages/index/mine.vue
+3
-0
addExam.vue
src/pages/learn/addExam.vue
+1
-0
answer.vue
src/pages/learn/answer.vue
+1
-0
answerBackup.vue
src/pages/learn/answerBackup.vue
+0
-376
beginAnswer.vue
src/pages/learn/beginAnswer.vue
+1
-0
boundQuestions.vue
src/pages/learn/boundQuestions.vue
+1
-0
boundTest.vue
src/pages/learn/boundTest.vue
+1
-0
detail.vue
src/pages/learn/detail.vue
+1
-1
examSetting.vue
src/pages/learn/examSetting.vue
+1
-0
manualBinding.vue
src/pages/learn/manualBinding.vue
+1
-0
record.vue
src/pages/learn/record.vue
+1
-0
score.vue
src/pages/learn/score.vue
+1
-0
selectCategory.vue
src/pages/learn/selectCategory.vue
+1
-0
selectSpecial.vue
src/pages/learn/selectSpecial.vue
+1
-0
selectedList.vue
src/pages/learn/selectedList.vue
+1
-0
sweepResults.vue
src/pages/learn/sweepResults.vue
+1
-0
index.vue
src/pages/login/index.vue
+1
-0
bank.vue
src/pages/mine/bank.vue
+1
-0
certify.vue
src/pages/mine/certify.vue
+1
-0
company.vue
src/pages/mine/company.vue
+1
-0
customer.vue
src/pages/mine/customer.vue
+3
-0
info.vue
src/pages/mine/info.vue
+1
-0
setting.vue
src/pages/mine/setting.vue
+3
-1
detail.vue
src/pages/search/detail.vue
+1
-0
index.vue
src/pages/search/index.vue
+3
-0
No files found.
src/App.vue
View file @
3148f11e
<
script
>
import
"./../.env.js"
import
'./../.env.js'
import
{
AnalysysAgent
}
from
'@/common/analysys_paas.js'
export
default
{
globalData
:
{
// 开发环境
uniEnv
:
process
.
uniEnv
,
questionList
:
[]
questionList
:
[]
,
},
onLaunch
:
function
(
options
)
{
AnalysysAgent
.
registerSuperProperty
(
'platform'
,
'study'
)
// 版本更新
this
.
updateApp
()
},
onShow
:
function
(
options
)
{
console
.
log
(
"options"
,
options
)
console
.
log
(
'options'
,
options
)
this
.
updateOrgId
(
options
)
},
onHide
:
function
()
{
...
...
@@ -78,14 +80,36 @@ export default {
},
// 更新机构ID
updateOrgId
(
options
)
{
const
orgId
=
options
?.
query
?.
orgId
const
orgId
=
options
?.
query
?.
orgId
// 需要更新机构ID的场景,详细可参考 https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html
const
scene
=
[
1005
,
1006
,
1011
,
1012
,
1013
,
1026
,
1035
,
1047
,
1048
,
1049
,
1053
,
1058
,
1067
,
1091
,
1145
,
1135
,
1183
,
1017
]
if
(
!
this
.
orgId
)
{
// 没有机构ID,更新
const
scene
=
[
1005
,
1006
,
1011
,
1012
,
1013
,
1026
,
1035
,
1047
,
1048
,
1049
,
1053
,
1058
,
1067
,
1091
,
1145
,
1135
,
1183
,
1017
,
]
if
(
!
this
.
orgId
)
{
// 没有机构ID,更新
this
.
$u
.
vuex
(
'orgId'
,
orgId
||
-
1
)
}
else
{
if
(
scene
.
includes
(
options
.
scene
))
{
// 如果需要更新机构ID
if
(
!
orgId
&&
options
.
path
===
'pages/index/index'
)
{
// 针对重新载入小程序 安卓的query参数会清空
if
(
scene
.
includes
(
options
.
scene
))
{
// 如果需要更新机构ID
if
(
!
orgId
&&
options
.
path
===
'pages/index/index'
)
{
// 针对重新载入小程序 安卓的query参数会清空
// 如果没有参数,需要重置为平台的场景
const
platformScene
=
[
1005
,
1006
,
1026
,
1053
,
1145
,
1183
,
1017
]
if
(
platformScene
.
includes
(
options
.
scene
))
{
...
...
@@ -108,7 +132,66 @@ export default {
this
.
$u
.
vuex
(
'questionList'
,
{})
this
.
$u
.
vuex
(
'lastIndex'
,
{})
this
.
$u
.
vuex
(
'answerCount'
,
{})
}
},
/* ------------------------- 数据埋点begin ------------------------------ */
track
(
event
,
properties
)
{
if
(
AnalysysAgent
)
{
// 易观添加事件
let
AnalysysAgent
=
wx
.
AnalysysAgent
AnalysysAgent
.
track
(
'study_'
+
event
,
properties
)
}
},
profileSet
(
vm
)
{
// 设备身份标识
if
(
AnalysysAgent
)
{
let
profile
=
vm
.
$u
.
deepClone
(
vm
.
userInfo
)
profile
.
token
=
vm
.
vuex_token
profile
.
openid
=
vm
.
openId
profile
.
orgid
=
vm
.
orgId
AnalysysAgent
.
profileSet
(
profile
)
}
},
profileAppend
(
vm
)
{
if
(
AnalysysAgent
)
{
let
user
=
vm
.
$u
.
deepClone
(
vm
.
userInfo
)
user
.
token
=
vm
.
vuex_token
user
.
openid
=
vm
.
openId
// 用户id设置
AnalysysAgent
.
alias
(
user
.
openid
+
''
)
// 用户附加属性
let
profile
=
{
userfrom
:
'模考大师'
,
openid
:
user
.
openid
,
nickName
:
user
.
nickName
}
Object
.
keys
(
profile
).
map
((
key
)
=>
{
if
(
key
&&
profile
[
key
])
{
AnalysysAgent
.
profileAppend
(
key
,
profile
[
key
])
}
})
}
},
share
(
toShareProperties
,
trackProperties
)
{
if
(
AnalysysAgent
)
{
AnalysysAgent
.
share
(
toShareProperties
,
trackProperties
)
}
},
trackPage
(
pageName
,
properties
)
{
if
(
AnalysysAgent
)
{
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 ------------------------------ */
},
}
</
script
>
...
...
src/common/analysys_paas.js
0 → 100644
View file @
3148f11e
import
AnalysysAgent
from
'@/libs/AnalysysAgent_WX_SDK.custom.min.js'
/**
* 易观方舟
* @param appkey 易观平台应用key
* @param debugMode 读取evn文件配置
* 0 关闭调试模式(默认)。类型:Number。
* 1 开启调试模式,数据不入库。类型:Number。
* 2 开启调试模式,数据入库。类型:Number。
* @param autoTrack 自动跟踪
* @param uploadURL 跟踪地址
*
*/
const
argo
=
{
appkey
:
'5f2ac5996f36c714'
,
debugMode
:
process
.
uniEnv
.
argoDebugMode
,
autoTrack
:
true
,
uploadURL
:
'https://argo.banshouhui.com/'
,
}
if
(
AnalysysAgent
)
{
AnalysysAgent
.
identify
(
AnalysysAgent
.
getDistinctId
())
AnalysysAgent
.
appkey
=
argo
.
appkey
//设置您的APPKEY
AnalysysAgent
.
debugMode
=
argo
.
debugMode
AnalysysAgent
.
uploadURL
=
argo
.
uploadURL
// AnalysysAgent.autoShare = true
AnalysysAgent
.
allowTimeCheck
=
true
AnalysysAgent
.
autoTrack
=
true
AnalysysAgent
.
registerSuperProperty
(
'platform'
,
'study'
)
}
export
{
AnalysysAgent
}
src/libs/AnalysysAgent_WX_SDK.custom.min.js
0 → 100644
View file @
3148f11e
This diff is collapsed.
Click to expand it.
src/libs/AnalysysAgent_encryption.es6.min.js
0 → 100644
View file @
3148f11e
This diff is collapsed.
Click to expand it.
src/pages/cert/detail.vue
View file @
3148f11e
...
...
@@ -59,6 +59,7 @@ export default {
}
},
onLoad
:
function
()
{
getApp
().
trackPage
(
'证书详情'
)
this
.
formatDataByType
()
},
computed
:
{
...
...
src/pages/cert/detailLearn.vue
View file @
3148f11e
...
...
@@ -88,6 +88,7 @@ export default {
}
},
onLoad
(){
getApp
().
trackPage
(
'我的证书详情'
)
},
onShow
:
function
()
{
this
.
formatDataByType
()
...
...
src/pages/index/cert.vue
View file @
3148f11e
...
...
@@ -173,6 +173,7 @@ export default {
}
},
onLoad
()
{
getApp
().
trackPage
(
'证书查询'
)
this
.
checkType
=
'特种作业操作证查询'
},
onShow
:
function
(
param
)
{
...
...
src/pages/index/index.vue
View file @
3148f11e
...
...
@@ -262,6 +262,7 @@ export default {
// },
// },
onLoad
()
{
getApp
().
trackPage
(
'首页'
)
if
(
this
.
vuex_token
)
{
this
.
loading
=
true
// this.getProvinceList()
...
...
src/pages/index/mine.vue
View file @
3148f11e
...
...
@@ -156,6 +156,9 @@ export default {
return
{
'font-size'
:
'32rpx'
,
coloe
:
'#191C27'
,
'margin-left'
:
'26rpx'
}
},
},
onLoad
()
{
getApp
().
trackPage
(
'我的'
)
},
onShow
()
{
if
(
this
.
userInfo
.
nickName
)
{
this
.
$u
.
api
.
getUserInfo
().
then
((
res
)
=>
{
...
...
src/pages/learn/addExam.vue
View file @
3148f11e
...
...
@@ -72,6 +72,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'选择题库'
)
this
.
getPageInfo
()
},
methods
:
{
...
...
src/pages/learn/answer.vue
View file @
3148f11e
...
...
@@ -288,6 +288,7 @@ export default {
this
.
title
=
'错题记录'
}
getApp
().
trackPage
(
this
.
title
)
this
.
init
()
},
methods
:
{
...
...
src/pages/learn/answerBackup.vue
deleted
100644 → 0
View file @
ae546358
This diff is collapsed.
Click to expand it.
src/pages/learn/beginAnswer.vue
View file @
3148f11e
...
...
@@ -79,6 +79,7 @@ export default {
},
},
onLoad
()
{
getApp
().
trackPage
(
'模拟考试开始'
)
this
.
init
()
},
methods
:
{
...
...
src/pages/learn/boundQuestions.vue
View file @
3148f11e
...
...
@@ -88,6 +88,7 @@ export default {
// if (e && e.relationId) {
// this.relationId = e.relationId
// }
getApp
().
trackPage
(
'绑定题库'
)
if
(
e
&&
e
.
realPrice
)
{
this
.
realPrice
=
e
.
realPrice
}
...
...
src/pages/learn/boundTest.vue
View file @
3148f11e
...
...
@@ -63,6 +63,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'绑定试题'
)
if
(
e
&&
e
.
code
)
{
var
code
=
e
.
code
this
.
param
.
cardNumber
=
code
.
slice
(
0
,
14
)
...
...
src/pages/learn/detail.vue
View file @
3148f11e
...
...
@@ -171,7 +171,7 @@ export default {
// if (e && e.relationId) {
// this.relationId = e.relationId
// }
getApp
().
trackPage
(
'题库详情'
)
if
((
e
&&
e
.
id
)
||
this
.
questionWarehouseId
)
{
this
.
queryQuestionWarehouseById
((
e
&&
e
.
id
)
||
this
.
questionWarehouseId
)
}
...
...
src/pages/learn/examSetting.vue
View file @
3148f11e
...
...
@@ -172,6 +172,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'科目设置'
)
this
.
getPageInfo
()
this
.
getLocation
()
this
.
getProvinceList
(
this
.
category
.
id
)
...
...
src/pages/learn/manualBinding.vue
View file @
3148f11e
...
...
@@ -110,6 +110,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'手动绑定'
)
// if (e && e.relationId) {
// this.relationId = e.relationId
// }
...
...
src/pages/learn/record.vue
View file @
3148f11e
...
...
@@ -209,6 +209,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'每日一练'
)
if
(
e
&&
e
.
key
)
{
this
.
$nextTick
(()
=>
{
// setTimeout(() => {
...
...
src/pages/learn/score.vue
View file @
3148f11e
...
...
@@ -191,6 +191,7 @@ export default {
}
},
onLoad
(
options
)
{
getApp
().
trackPage
(
'考试成绩'
)
if
(
options
)
{
this
.
id
=
options
.
id
}
else
{
...
...
src/pages/learn/selectCategory.vue
View file @
3148f11e
...
...
@@ -94,6 +94,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'题库选择'
)
this
.
loadLabel
()
// 获取标签
},
methods
:
{
...
...
src/pages/learn/selectSpecial.vue
View file @
3148f11e
...
...
@@ -78,6 +78,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'已选题库列表'
)
this
.
getPageInfo
()
},
methods
:
{
...
...
src/pages/learn/selectedList.vue
View file @
3148f11e
...
...
@@ -68,6 +68,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'已选题库'
)
this
.
loadList
()
// 获取已选题库列表
},
methods
:
{
...
...
src/pages/learn/sweepResults.vue
View file @
3148f11e
...
...
@@ -59,6 +59,7 @@ export default {
},
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'绑定试题'
)
if
(
e
&
e
.
result
)
{
this
.
computed
=
e
.
result
}
...
...
src/pages/login/index.vue
View file @
3148f11e
...
...
@@ -44,6 +44,7 @@ export default {
},
},
onLoad
(
params
)
{
getApp
().
trackPage
(
'登录'
)
if
(
params
&&
params
.
path
)
{
this
.
returnUrl
=
decodeURIComponent
(
params
.
path
)
}
...
...
src/pages/mine/bank.vue
View file @
3148f11e
...
...
@@ -44,6 +44,7 @@ export default {
}
},
onLoad
()
{
getApp
().
trackPage
(
'我的题库'
)
this
.
getUserQuestionWareHouseList
()
},
methods
:
{
...
...
src/pages/mine/certify.vue
View file @
3148f11e
...
...
@@ -118,6 +118,7 @@ export default {
},
},
onLoad
()
{
getApp
().
trackPage
(
'实名认证'
)
this
.
student
=
getApp
().
globalData
.
student
this
.
qiToken
=
getApp
().
globalData
.
qiNiuToken
},
...
...
src/pages/mine/company.vue
View file @
3148f11e
...
...
@@ -36,6 +36,7 @@ export default {
},
computed
:
{},
onLoad
()
{
getApp
().
trackPage
(
'工作单位'
)
this
.
student
=
getApp
().
globalData
.
student
if
(
this
.
student
.
workUnit
==
''
||
!
this
.
student
.
workUnit
)
{
this
.
isNotSet
=
true
...
...
src/pages/mine/customer.vue
View file @
3148f11e
...
...
@@ -32,6 +32,9 @@ export default {
erweima
:
process
.
uniEnv
.
qn_base_url
+
'kefuerweima@2x.png'
,
}
},
onLoad
()
{
getApp
().
trackPage
(
'联系客服'
)
}
}
</
script
>
...
...
src/pages/mine/info.vue
View file @
3148f11e
...
...
@@ -117,6 +117,7 @@ export default {
},
},
onLoad
()
{
getApp
().
trackPage
(
'我的信息'
)
this
.
refleshCode
()
this
.
$u
.
api
.
getQiNiuToken
({
bucketName
:
'wsy-exam'
}).
then
((
res
)
=>
{
this
.
qiToken
=
res
...
...
src/pages/mine/setting.vue
View file @
3148f11e
...
...
@@ -21,7 +21,9 @@ export default {
}
},
computed
:
{},
onLoad
()
{},
onLoad
()
{
getApp
().
trackPage
(
'设置'
)
},
methods
:
{
upgrade
:
function
()
{
let
that
=
this
...
...
src/pages/search/detail.vue
View file @
3148f11e
...
...
@@ -74,6 +74,7 @@ export default {
}
},
onLoad
(
e
)
{
getApp
().
trackPage
(
'搜索结果'
)
this
.
keyword
=
e
?
decodeURIComponent
(
e
.
keyword
)
:
''
setList
([])
this
.
lists
=
getList
()
...
...
src/pages/search/index.vue
View file @
3148f11e
...
...
@@ -59,6 +59,9 @@ export default {
return
this
.
searchHistory
}
},
onLoad
()
{
getApp
().
trackPage
(
'搜索'
)
},
methods
:
{
search
(
val
)
{
if
(
val
){
...
...
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