Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
junlebao-milk-20240619
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
SparkProjects
junlebao-milk-20240619
Commits
e2f48a88
Commit
e2f48a88
authored
Jun 27, 2024
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 埋点
parent
a251c1ee
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
37 additions
and
2 deletions
+37
-2
AlreadyGetPanel.ts
miniprogram/components/AlreadyGetPanel/AlreadyGetPanel.ts
+7
-1
GetPanel.ts
miniprogram/components/GetPanel/GetPanel.ts
+8
-1
activity.ts
miniprogram/pages/activity/activity.ts
+6
-0
activity.wxml
miniprogram/pages/activity/activity.wxml
+1
-0
index.ts
miniprogram/pages/index/index.ts
+3
-0
my.ts
miniprogram/pages/my/my.ts
+1
-0
store.ts
miniprogram/store/store.ts
+11
-0
No files found.
miniprogram/components/AlreadyGetPanel/AlreadyGetPanel.ts
View file @
e2f48a88
// components/AlreadyGetPanel/AlreadyGetPanel.ts
Component
({
import
{
ComponentWithStore
}
from
"mobx-miniprogram-bindings"
;
import
{
store
}
from
"../../store/store"
;
ComponentWithStore
({
/**
* 组件的属性列表
...
...
@@ -15,6 +18,9 @@ Component({
* 组件的方法列表
*/
methods
:
{
onShow
()
{
store
.
doLog
(
507
,
2
)
},
onClose
()
{
this
.
triggerEvent
(
'close'
);
},
...
...
miniprogram/components/GetPanel/GetPanel.ts
View file @
e2f48a88
// components/GetPanel/GetPanel.ts
Component
({
import
{
ComponentWithStore
}
from
"mobx-miniprogram-bindings"
;
import
{
store
}
from
"../../store/store"
;
ComponentWithStore
({
/**
* 组件的属性列表
...
...
@@ -15,6 +18,10 @@ Component({
* 组件的方法列表
*/
methods
:
{
onShow
()
{
store
.
doLog
(
507
,
1
)
},
onClose
()
{
this
.
triggerEvent
(
'close'
);
},
...
...
miniprogram/pages/activity/activity.ts
View file @
e2f48a88
...
...
@@ -23,9 +23,15 @@ ComponentWithStore({
store
.
updateActivity
();
},
methods
:
{
onShow
()
{
store
.
doLog
(
507
,
9
)
},
// 跳转活动详情页
jumpDetailPage
:
_asyncThrottle
(
async
function
(
e
)
{
const
item
=
e
.
currentTarget
.
dataset
.
item
console
.
log
(
'item'
,
item
);
store
.
doLog
(
508
,
5
+
item
.
index
)
wx
.
navigateTo
({
url
:
`/pages/activityDetail/activityDetail?imgUrl=
${
item
.
detailImg
}
`
})
}),
...
...
miniprogram/pages/activity/activity.wxml
View file @
e2f48a88
...
...
@@ -19,6 +19,7 @@
hover-stay-time="0"
bindtap="jumpDetailPage"
data-item="{{item}}"
data-index="{{index}}"
/>
</view>
</view>
...
...
miniprogram/pages/index/index.ts
View file @
e2f48a88
...
...
@@ -31,6 +31,7 @@ ComponentWithStore({
},
methods
:
{
async
onShow
()
{
store
.
doLog
(
507
,
10
)
await
this
.
updateHomeInfo
();
const
{
channel
,
city
}
=
this
.
options
||
{};
store
.
paramsObj
=
{
channel
,
city
};
...
...
@@ -81,6 +82,7 @@ ComponentWithStore({
clickSubscribe
:
_asyncThrottle
(
async
function
()
{
console
.
log
(
'clickSubscribe'
,
this
)
store
.
doLog
(
508
,
3
)
await
request
({
url
:
API_PATH
.
subscribe
,
});
...
...
@@ -89,6 +91,7 @@ ComponentWithStore({
// 跳转活动页
jumpActPage
:
_asyncThrottle
(
async
function
()
{
store
.
doLog
(
508
,
4
)
wx
.
switchTab
({
url
:
"/pages/activity/activity"
})
}),
...
...
miniprogram/pages/my/my.ts
View file @
e2f48a88
...
...
@@ -19,6 +19,7 @@ ComponentWithStore({
},
methods
:
{
onShow
()
{
store
.
doLog
(
507
,
11
)
this
.
setData
({
userInfo
:
{
avatarUrl
:
store
.
homeInfo
.
avatar
||
defaultInfo
.
avatar
,
...
...
miniprogram/store/store.ts
View file @
e2f48a88
...
...
@@ -84,6 +84,17 @@ class Store {
if
(
!
success
)
return
''
;
return
data
;
}
async
doLog
(
pageBizId
:
number
,
eventId
:
number
)
{
await
request
({
url
:
API_PATH
.
buried
,
data
:
{
pageBizId
,
// 埋点号
eventId
,
// 事件id
},
});
}
}
// 数据仓库
...
...
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