Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB-studyChina-20250617
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
RB-studyChina-20250617
Commits
f3e09ac3
Commit
f3e09ac3
authored
Jun 24, 2025
by
俞嘉婷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 神策埋点
parent
efa876b6
Changes
19
Show whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
204 additions
and
210 deletions
+204
-210
main.ts
mock/main.ts
+42
-3
CodePop.jsx
src/components/CodePop/CodePop.jsx
+3
-3
LoginPop.jsx
src/components/LoginPop/LoginPop.jsx
+7
-7
rulepop.jsx
src/components/rulepop/rulepop.jsx
+3
-3
ModalCtrl.tsx
src/core/ctrls/ModalCtrl.tsx
+0
-2
GamePage.tsx
src/pages/GamePage/GamePage.tsx
+28
-0
HomePage.tsx
src/pages/HomePage/HomePage.tsx
+25
-31
MyPrize.jsx
src/pages/MyPrize/MyPrize.jsx
+7
-7
sharepage.jsx
src/pages/agentSharepage/sharepage.jsx
+5
-5
sharepage.jsx
src/pages/sharepage/sharepage.jsx
+9
-9
index.jsx
src/panels/AwardPopup/index.jsx
+15
-0
index.jsx
src/panels/FailPopup/index.jsx
+24
-0
FillAddress.jsx
src/panels/FillAddress/FillAddress.jsx
+3
-3
TipPanel.less
src/panels/TipPanel/TipPanel.less
+0
-53
TipPanel.tsx
src/panels/TipPanel/TipPanel.tsx
+0
-64
index.jsx
src/panels/VictoryPopup/index.jsx
+22
-0
taskpop.jsx
src/panels/taskpop/taskpop.jsx
+7
-16
yinsirulepop.jsx
src/panels/yinsirulepop/yinsirulepop.jsx
+3
-3
sensors.js
src/utils/sensors.js
+1
-1
No files found.
mock/main.ts
View file @
f3e09ac3
...
...
@@ -8,14 +8,14 @@ export default [
"success"
:
true
,
"message"
:
"message"
,
"data"
:
{
"actStartTimestamp"
:
Date
.
now
()
-
42625488.007563084
,
"actStartTimestamp"
:
Date
.
now
()
-
42625488.007563084
,
"leftGameTimes"
:
10
,
"rewardDailyFreeGameTimes"
:
666
,
"uid"
:
"00000000000"
,
"currentTimestamp"
:
Date
.
now
(),
"actEndTimestamp"
:
Date
.
now
()
+
42625488.007563084
,
"actEndTimestamp"
:
Date
.
now
()
+
42625488.007563084
,
"avatar"
:
"/src/assets/homePage/head.png"
,
"privacyContent"
:
'143sjhbkrjgjkfgbjfb fnsjnfdrhgkfngjknfcmgfcm fjkxdngjhrdkghkfxgjfb'
,
"privacyContent"
:
'143sjhbkrjgjkfgbjfb fnsjnfdrhgkfngjknfcmgfcm fjkxdngjhrdkghkfxgjfb'
,
"rulePop"
:
false
,
"userId"
:
"qui id deserunt"
,
"validUid"
:
true
,
...
...
@@ -59,4 +59,43 @@ export default [
}
},
},
{
url
:
'/map/info.do'
,
response
:
({
query
})
=>
{
return
{
"code"
:
null
,
"data"
:
{
"spInfoList"
:
[{
"icon"
:
"//yun.duiba.com.cn/polaris/1-锅-250x250.0c794c93c9013f41c2bb9dae3a2bdeec35b94b70.png"
,
"name"
:
"北京"
,
"spId"
:
"sp_landmark1"
,
"unlockFlag"
:
true
},
{
"icon"
:
"//yun.duiba.com.cn/polaris/2-碗-250x250.1e35277dc1af5cb9d94536b4831147db841eef8a.png"
,
"name"
:
"西安"
,
"spId"
:
"sp_landmark2"
,
"unlockFlag"
:
true
},
{
"icon"
:
"//yun.duiba.com.cn/polaris/3-瓢-250x250.7752bdaa5525ad653b6d736f80966768fae6322d.png"
,
"name"
:
"上海"
,
"spId"
:
"sp_landmark3"
,
"unlockFlag"
:
true
},
{
"icon"
:
"//yun.duiba.com.cn/polaris/4-盆-250x250.421924078032955b46300eda17d2ef3b8b1ed559.png"
,
"name"
:
"杭州"
,
"spId"
:
"sp_landmark4"
,
"unlockFlag"
:
true
},
{
"icon"
:
"//yun.duiba.com.cn/polaris/doge.d374f48a39087c6664a2533a7db7712da5686fc0.png"
,
"name"
:
"成都"
,
"spId"
:
"sp_landmark5"
,
"unlockFlag"
:
false
}]
},
"message"
:
null
,
"success"
:
true
,
"timeStamp"
:
1750749512476
}
},
},
]
src/components/CodePop/CodePop.jsx
View file @
f3e09ac3
...
...
@@ -18,10 +18,10 @@ class CodePop extends React.Component {
componentDidMount
=
async
()
=>
{
await
this
.
creatCode
();
pageView
(
"b14
292
"
,
{
pageView
(
"b14
620
"
,
{
page_name
:
"换端弹窗"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
292"
,
"d14293
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
620"
,
"d14621
"
,
{
page_name
:
"换端弹窗"
,
button_name
:
"关闭按钮"
,
});
...
...
@@ -42,7 +42,7 @@ class CodePop extends React.Component {
/** 关闭 */
clickClose
=
()
=>
{
ModalCtrl
.
closeModal
()
sensorLog
(
LOG_KEY
.
click
,
"b14
292"
,
"d14293
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
620"
,
"d14621
"
,
{
page_name
:
"换端弹窗"
,
button_name
:
"关闭按钮"
,
});
...
...
src/components/LoginPop/LoginPop.jsx
View file @
f3e09ac3
...
...
@@ -19,14 +19,14 @@ class LoginPop extends React.Component {
};
componentDidMount
()
{
pageView
(
"b14
257
"
,
{
pageView
(
"b14
593
"
,
{
page_name
:
"手机号登录页"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
257"
,
"d14260
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
593"
,
"d14597
"
,
{
page_name
:
"手机号登录页"
,
button_name
:
"登录按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
257"
,
"d14258
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
593"
,
"d14595
"
,
{
page_name
:
"手机号登录页"
,
button_name
:
"发送验证码按钮"
,
});
...
...
@@ -46,7 +46,7 @@ class LoginPop extends React.Component {
isSend
:
false
,
reSend
:
true
,
},()
=>
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
257"
,
"d14259
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
593"
,
"d14596
"
,
{
page_name
:
"手机号登录页"
,
button_name
:
"重新发送按钮"
,
});
...
...
@@ -58,12 +58,12 @@ class LoginPop extends React.Component {
clickSend
=
_asyncThrottle
(
async
()
=>
{
const
{
phone
,
reSend
}
=
this
.
state
;
if
(
reSend
){
sensorLog
(
LOG_KEY
.
click
,
"b14
257"
,
"d14259
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
593"
,
"d14596
"
,
{
page_name
:
"手机号登录页"
,
button_name
:
"重新发送按钮"
,
});
}
else
{
sensorLog
(
LOG_KEY
.
click
,
"b14
257"
,
"d14258
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
593"
,
"d14595
"
,
{
page_name
:
"手机号登录页"
,
button_name
:
"发送验证码按钮"
,
});
...
...
@@ -80,7 +80,7 @@ class LoginPop extends React.Component {
});
closeLogin
=
_asyncThrottle
(
async
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14
257"
,
"d14260
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
593"
,
"d14597
"
,
{
page_name
:
"手机号登录页"
,
button_name
:
"登录按钮"
,
});
...
...
src/components/rulepop/rulepop.jsx
View file @
f3e09ac3
...
...
@@ -23,18 +23,18 @@ class Rulepop extends React.Component {
store
.
updateIndex
()
}
pageView
(
"b14
294
"
,
{
pageView
(
"b14
622
"
,
{
page_name
:
"活动规则弹窗"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
294"
,
"d14295
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
622"
,
"d14623
"
,
{
page_name
:
"活动规则弹窗"
,
button_name
:
"关闭按钮"
,
});
}
handleClose
=
_asyncThrottle
(()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14
294"
,
"d14295
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
622"
,
"d14623
"
,
{
page_name
:
"活动规则弹窗"
,
button_name
:
"关闭按钮"
,
});
...
...
src/core/ctrls/ModalCtrl.tsx
View file @
f3e09ac3
import
React
,
{
ComponentType
,
Component
}
from
"react"
;
import
styles
from
"./ModalCtrl.module.less"
;
import
TipPanel
from
"@/panels/TipPanel/TipPanel.tsx"
;
// 弹窗优先级配置Map,key为弹窗组件名(建议用组件.displayName或组件名字符串),value为优先级数值
// 数值越大优先级越高,未配置的默认0
const
modalPriorityMap
=
new
Map
<
ComponentType
<
any
>
,
number
>
([
[
TipPanel
,
15
],
]);
interface
ModalItem
{
...
...
src/pages/GamePage/GamePage.tsx
View file @
f3e09ac3
...
...
@@ -60,6 +60,34 @@ class GamePage extends React.Component<any, any> {
needGuide
:
store
.
indexData
?.
newGuideFlag
==
1
,
handleLogExposure
:
handleLogExposure
,
handleLogClick
:
handleLogClick
,
// 退出游戏确认弹窗-曝光埋点
exitPopSensorExposure
:
()
=>
{
pageView
(
"b14611"
,
{
page_name
:
"退出提示弹窗"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14611"
,
"d14613"
,
{
page_name
:
"退出提示弹窗"
,
button_name
:
"确认按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14611"
,
"d14612"
,
{
page_name
:
"退出提示弹窗"
,
button_name
:
"继续游戏按钮"
,
});
},
// 退出游戏确认弹窗-确认按钮-点击埋点
exitPopExitBtnSensorClick
:
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14611"
,
"d14613"
,
{
page_name
:
"退出提示弹窗"
,
button_name
:
"确认按钮"
,
});
},
// 退出游戏确认弹窗-继续游戏按钮-点击埋点
exitPopContinueBtnSensorClick
:
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14611"
,
"d14612"
,
{
page_name
:
"退出提示弹窗"
,
button_name
:
"继续游戏按钮"
,
});
}
})
if
(
store
.
indexData
?.
newGuideFlag
==
1
)
{
API
.
completeGuide
({
flag
:
2
})
...
...
src/pages/HomePage/HomePage.tsx
View file @
f3e09ac3
...
...
@@ -20,12 +20,6 @@ import gameStore from "@/store/gameStore.ts";
import
GamePage
from
"@/pages/GamePage/GamePage.tsx"
;
import
MapPage
from
"@/pages/MapPage/mappage.jsx"
;
import
MusicBtn
from
'@/core/components/MusicBtn/MusicBtn.tsx'
;
import
AwardPopup
from
'@/panels/AwardPopup/index.jsx'
import
NotWinPopup
from
'@/panels/NotWinPopup/index.jsx'
import
GiftPackPopup
from
'@/panels/GiftPackPopup/index.jsx'
import
VictoryPopup
from
'@/panels/VictoryPopup/index.jsx'
import
FailPopup
from
'@/panels/FailPopup/index.jsx'
import
CodePop
from
"@/components/CodePop/CodePop.jsx"
;
import
{
SvgaPlayer
}
from
"@grace/svgaplayer"
;
import
{
Swiper
,
SwiperSlide
}
from
"swiper/react"
;
import
{
Autoplay
}
from
"swiper"
;
...
...
@@ -50,7 +44,7 @@ class Homepage extends React.Component {
}
componentWillUnmount
()
{
if
(
CFG
.
channel
==
CHANNEL_PARAMS
.
YK_MINI
||
CFG
.
channel
==
CHANNEL_PARAMS
.
YK_PUBLIC
)
{
MatterViewDuration
(
"b14
268
"
,
+
new
Date
()
-
startTime
,
{
MatterViewDuration
(
"b14
605
"
,
+
new
Date
()
-
startTime
,
{
page_name
:
"友客首页"
,
});
}
...
...
@@ -64,16 +58,16 @@ class Homepage extends React.Component {
switch
(
number
)
{
// 0 研学地图
case
0
:
sensorLog
(
LOG_KEY
.
click
,
"b14
261"
,
"d14264
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
598"
,
"d14602
"
,
{
page_name
:
"活动首页"
,
button_name
:
"
我的排名
按钮"
,
button_name
:
"
研学地图
按钮"
,
});
PageCtrl
.
changePage
(
MapPage
);
break
;
// 1 抽奖
case
1
:
sensorLog
(
LOG_KEY
.
click
,
"b14
261"
,
"d14266
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
598"
,
"d14601
"
,
{
page_name
:
"活动首页"
,
button_name
:
"抽奖按钮"
,
});
...
...
@@ -82,18 +76,18 @@ class Homepage extends React.Component {
// 2 做任务
case
2
:
sensorLog
(
LOG_KEY
.
click
,
"b14
261"
,
"d14267
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
598"
,
"d14604
"
,
{
page_name
:
"活动首页"
,
button_name
:
"
做任务,
赚次数按钮"
,
button_name
:
"赚次数按钮"
,
});
ModalCtrl
.
showModal
(
Taskpop
);
break
;
// 3 开始游戏
case
3
:
sensorLog
(
LOG_KEY
.
click
,
"b14
261"
,
"d14265
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
598"
,
"d14603
"
,
{
page_name
:
"活动首页"
,
button_name
:
"开始
答题
按钮"
,
button_name
:
"开始
游戏
按钮"
,
});
if
(
!
store
.
indexData
?.
leftGameTimes
)
{
...
...
@@ -109,7 +103,7 @@ class Homepage extends React.Component {
// 4 我的奖品
case
4
:
sensorLog
(
LOG_KEY
.
click
,
"b14
261"
,
"d14263
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
598"
,
"d14600
"
,
{
page_name
:
"活动首页"
,
button_name
:
"奖品按钮"
,
});
...
...
@@ -123,7 +117,7 @@ class Homepage extends React.Component {
// 5 活动规则
case
5
:
sensorLog
(
LOG_KEY
.
click
,
"b14
261"
,
"d14262
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
598"
,
"d14599
"
,
{
page_name
:
"活动首页"
,
button_name
:
"规则按钮"
,
});
...
...
@@ -132,7 +126,7 @@ class Homepage extends React.Component {
// 6 拜访清单
case
6
:
sensorLog
(
LOG_KEY
.
click
,
"b14
268"
,
"d14269
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
605"
,
"d14606
"
,
{
page_name
:
"友客首页"
,
button_name
:
"拜访清单按钮"
,
});
...
...
@@ -145,7 +139,7 @@ class Homepage extends React.Component {
// 7 分享活动
case
7
:
MatterShareOpt
(
"b14
268"
,
"d14322
"
,
{
MatterShareOpt
(
"b14
605"
,
"d14607
"
,
{
button_name
:
"分享活动按钮"
,
page_name
:
"友客首页"
,
})
...
...
@@ -158,49 +152,49 @@ class Homepage extends React.Component {
})
initSensor
=
()
=>
{
if
(
CFG
.
channel
==
CHANNEL_PARAMS
.
YK_MINI
)
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
268"
,
"d14322
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
605"
,
"d14607
"
,
{
page_name
:
"友客首页"
,
button_name
:
"分享活动按钮"
,
});
}
if
(
CFG
.
channel
==
CHANNEL_PARAMS
.
YK_MINI
||
CFG
.
channel
==
CHANNEL_PARAMS
.
YK_PUBLIC
)
{
MatterViewOpt
(
"b14
268
"
,
{
MatterViewOpt
(
"b14
605
"
,
{
page_name
:
"友客首页"
,
})
if
(
store
?.
indexData
?.
isAgent
)
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
268"
,
"d14269
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
605"
,
"d14606
"
,
{
page_name
:
"友客首页"
,
button_name
:
"拜访清单按钮"
,
});
}
}
pageView
(
"b14
261
"
,
{
pageView
(
"b14
598
"
,
{
page_name
:
"活动首页"
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
261"
,
"d14267
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
598"
,
"d14604
"
,
{
page_name
:
"活动首页"
,
button_name
:
"
做任务,
赚次数按钮"
,
button_name
:
"赚次数按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
261"
,
"d14266
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
598"
,
"d14601
"
,
{
page_name
:
"活动首页"
,
button_name
:
"抽奖按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
261"
,
"d14265
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
598"
,
"d14603
"
,
{
page_name
:
"活动首页"
,
button_name
:
"开始
答题
按钮"
,
button_name
:
"开始
游戏
按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
261"
,
"d14264
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
598"
,
"d14602
"
,
{
page_name
:
"活动首页"
,
button_name
:
"
我的排名
按钮"
,
button_name
:
"
研学地图
按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
261"
,
"d14263
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
598"
,
"d14600
"
,
{
page_name
:
"活动首页"
,
button_name
:
"奖品按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
261"
,
"d14262
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
598"
,
"d14599
"
,
{
page_name
:
"活动首页"
,
button_name
:
"规则按钮"
,
});
...
...
src/pages/MyPrize/MyPrize.jsx
View file @
f3e09ac3
...
...
@@ -34,11 +34,11 @@ class MyPrize extends React.Component {
componentDidMount
()
{
pageView
(
"b14
298
"
,
{
pageView
(
"b14
626
"
,
{
page_name
:
"我的奖品页"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
298"
,
"d14300
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
626"
,
"d14628
"
,
{
page_name
:
"我的奖品页"
,
button_name
:
"返回按钮"
,
});
...
...
@@ -89,9 +89,9 @@ class MyPrize extends React.Component {
PrizeList
.
forEach
((
item
)
=>
{
if
(
!
item
?.
invalid
)
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
298"
,
"d14299
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
626"
,
"d14627
"
,
{
page_name
:
"我的奖品页"
,
button_name
:
"去
领取
按钮"
,
button_name
:
"去
查看
按钮"
,
});
}
});
...
...
@@ -105,9 +105,9 @@ class MyPrize extends React.Component {
return
;
}
handleLogClick
(
38
)
sensorLog
(
LOG_KEY
.
click
,
"b14
298"
,
"d14299
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
626"
,
"d14627
"
,
{
page_name
:
"我的奖品页"
,
button_name
:
"去
领取
按钮"
,
button_name
:
"去
查看
按钮"
,
});
// stopSound('bg_music')
...
...
@@ -209,7 +209,7 @@ class MyPrize extends React.Component {
});
});
clickBack
=
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14
298"
,
"d14300
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
626"
,
"d14628
"
,
{
page_name
:
"我的奖品页"
,
button_name
:
"返回按钮"
,
});
...
...
src/pages/agentSharepage/sharepage.jsx
View file @
f3e09ac3
...
...
@@ -25,11 +25,11 @@ class AgentSharepage extends React.Component {
async
componentDidMount
()
{
MatterViewOpt
(
"b14
316
"
,
{
MatterViewOpt
(
"b14
641
"
,
{
page_name
:
"落地页"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
316"
,
"d14317
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
641"
,
"d14642
"
,
{
page_name
:
"落地页"
,
button_name
:
"分享活动"
,
});
...
...
@@ -42,7 +42,7 @@ class AgentSharepage extends React.Component {
}
componentWillUnmount
()
{
MatterViewDuration
(
"b14
316
"
,
+
new
Date
()
-
this
.
startTime
,
{
MatterViewDuration
(
"b14
641
"
,
+
new
Date
()
-
this
.
startTime
,
{
page_name
:
"落地页"
,
});
...
...
@@ -61,7 +61,7 @@ class AgentSharepage extends React.Component {
toWeActHandle
=
()
=>
{
CFG
.
workerCode
=
getUrlParam
(
"ykCode"
);
let
url
=
CFG
.
domain
+
CFG
.
indexUrl
+
'&channel='
+
CFG
.
channel
+
`
${
!!
getUrlParam
(
"inviteCode"
)
?
(
"&inviteCode="
+
getUrlParam
(
"inviteCode"
))
:
""
}
`
+
`
${
!!
CFG
.
workerCode
?
`&ykCode=
${
CFG
.
workerCode
}
`
:
""
}
`
MatterViewDuration
(
"b14
316
"
,
+
new
Date
()
-
this
.
startTime
,
{
MatterViewDuration
(
"b14
641
"
,
+
new
Date
()
-
this
.
startTime
,
{
page_name
:
"落地页"
,
});
setTimeout
(()
=>
{
...
...
@@ -70,7 +70,7 @@ class AgentSharepage extends React.Component {
}
handleShareAct
=
_throttle
(()
=>
{
MatterShareOpt
(
"b14
316"
,
"d14317
"
,
{
MatterShareOpt
(
"b14
641"
,
"d14642
"
,
{
button_name
:
"分享活动按钮"
,
page_name
:
"落地页"
,
})
...
...
src/pages/sharepage/sharepage.jsx
View file @
f3e09ac3
...
...
@@ -30,14 +30,14 @@ class Sharepage extends React.Component {
// accessLog(506)
await
store
.
checkBindStatus
();
await
this
.
getShareInfo
();
MatterViewOpt
(
"b14
316
"
,
{
MatterViewOpt
(
"b14
641
"
,
{
page_name
:
"落地页"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
316"
,
"d14319
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
641"
,
"d14644
"
,
{
page_name
:
"落地页"
,
button_name
:
"
进入活动
按钮"
,
button_name
:
"
立即参与
按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
316"
,
"d14318
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
641"
,
"d14643
"
,
{
page_name
:
"落地页"
,
button_name
:
"为TA助力按钮"
,
});
...
...
@@ -56,7 +56,7 @@ class Sharepage extends React.Component {
}
componentWillUnmount
()
{
MatterViewDuration
(
"b14
316
"
,
+
new
Date
()
-
this
.
startTime
,
{
MatterViewDuration
(
"b14
641
"
,
+
new
Date
()
-
this
.
startTime
,
{
page_name
:
"落地页"
,
});
...
...
@@ -82,14 +82,14 @@ class Sharepage extends React.Component {
if
(
getUrlParam
(
"inviteCode"
))
{
handleLogClick
(
25
)
sensorLog
(
LOG_KEY
.
click
,
"b14
316"
,
"d14318
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
641"
,
"d14643
"
,
{
page_name
:
"落地页"
,
button_name
:
"为TA助力按钮"
,
});
}
else
{
sensorLog
(
LOG_KEY
.
click
,
"b14
316"
,
"d14319
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
641"
,
"d14644
"
,
{
page_name
:
"落地页"
,
button_name
:
"
进入活动
按钮"
,
button_name
:
"
立即参与
按钮"
,
});
handleLogClick
(
26
)
}
...
...
@@ -108,7 +108,7 @@ class Sharepage extends React.Component {
`
${
!!
CFG
.
workerCode
?
`&ykCode=
${
CFG
.
workerCode
}
`
:
""
}
`
+
`&agentCode=
${
CFG
.
agentCode
||
""
}
&actPlatforms=
${
CFG
.
actPlatforms
||
""
}
&actId=
${
CFG
.
actId
||
""
}
`
;
// alert(url)
MatterViewDuration
(
"b14
316
"
,
+
new
Date
()
-
this
.
startTime
,
{
MatterViewDuration
(
"b14
641
"
,
+
new
Date
()
-
this
.
startTime
,
{
page_name
:
"落地页"
,
});
setTimeout
(()
=>
{
...
...
src/panels/AwardPopup/index.jsx
View file @
f3e09ac3
...
...
@@ -8,6 +8,7 @@ import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import
store
from
"@/store/store.js"
;
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl"
;
import
HomePage
from
'@/pages/HomePage/HomePage.tsx'
;
import
{
LOG_KEY
,
pageView
,
sensorLog
}
from
"../../utils/sensors.js"
;
@
observer
class
AwardPopup
extends
React
.
Component
{
...
...
@@ -19,6 +20,16 @@ class AwardPopup extends React.Component {
};
}
componentDidMount
=
async
()
=>
{
pageView
(
"b14618"
,
{
page_name
:
"抽奖中奖弹窗"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14618"
,
"d14619"
,
{
page_name
:
"抽奖中奖弹窗"
,
button_name
:
"开心收下按钮"
,
});
};
//关闭
onClose
=
()
=>
{
ModalCtrl
.
closeModal
();
...
...
@@ -27,6 +38,10 @@ class AwardPopup extends React.Component {
//开心收下
onReceive
=
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14618"
,
"d14619"
,
{
page_name
:
"抽奖中奖弹窗"
,
button_name
:
"开心收下按钮"
,
});
ModalCtrl
.
closeModal
();
PageCtrl
.
changePage
(
HomePage
);
}
...
...
src/panels/FailPopup/index.jsx
View file @
f3e09ac3
...
...
@@ -9,6 +9,7 @@ import store from "@/store/store.js";
import
gameStore
from
"@/store/gameStore.js"
;
import
{
PageCtrl
}
from
"@/core/ctrls/PageCtrl"
;
import
HomePage
from
'@/pages/HomePage/HomePage.tsx'
;
import
{
LOG_KEY
,
pageView
,
sensorLog
}
from
"../../utils/sensors.js"
;
@
observer
class
FailPopup
extends
React
.
Component
{
...
...
@@ -21,14 +22,37 @@ class FailPopup extends React.Component {
// }
}
componentDidMount
=
async
()
=>
{
pageView
(
"b14614"
,
{
page_name
:
"游戏失败弹窗"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14614"
,
"d14617"
,
{
page_name
:
"游戏失败弹窗"
,
button_name
:
"关闭按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14614"
,
"d14615"
,
{
page_name
:
"游戏失败弹窗"
,
button_name
:
"再玩一次按钮"
,
});
};
//关闭
onClose
=
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14614"
,
"d14617"
,
{
page_name
:
"游戏失败弹窗"
,
button_name
:
"关闭按钮"
,
});
ModalCtrl
.
closeModal
();
PageCtrl
.
changePage
(
HomePage
);
//回到首页
}
//再玩一次
onReceive
=
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14614"
,
"d14615"
,
{
page_name
:
"游戏失败弹窗"
,
button_name
:
"再玩一次按钮"
,
});
ModalCtrl
.
closeModal
();
PageCtrl
.
changePage
(
HomePage
);
//回到首页
//重玩游戏
...
...
src/panels/FillAddress/FillAddress.jsx
View file @
f3e09ac3
...
...
@@ -34,10 +34,10 @@ class FillAddress extends React.Component {
}
initSensor
(){
pageView
(
"b14
310
"
,
{
pageView
(
"b14
636
"
,
{
page_name
:
"地址填写页"
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
310"
,
"d14311
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
636"
,
"d14637
"
,
{
page_name
:
"地址填写页"
,
button_name
:
"提交信息按钮"
,
});
...
...
@@ -94,7 +94,7 @@ class FillAddress extends React.Component {
}
clickSubmit
=
_throttle
(
async
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14
310"
,
"d14311
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
636"
,
"d14637
"
,
{
page_name
:
"地址填写页"
,
button_name
:
"提交信息按钮"
,
});
...
...
src/panels/TipPanel/TipPanel.less
deleted
100644 → 0
View file @
efa876b6
@import "../../res.less";
.TipPanel {
width: 750px;
height: 1624px;
position: absolute;
left: 0;
top: 0;
.bg {
position: absolute;
left: 105px;
top: 491px;
width: 593px;
height: 475px;
.webpBg("TipPanel/bg.png");
}
.text {
position: absolute;
left: 138px;
top: 550px;
width: 464px;
height: 215px;
font-size: 36px;
color: rgb(153, 57, 27);
font-weight: bold;
text-align: center;
display: flex;
align-items: center;
justify-content: center;
}
.btn {
position: absolute;
left: 244px;
top: 766px;
width: 263px;
height: 92px;
.webpBg("TipPanel/btn.png");
}
.close {
position: absolute;
left: 343px;
top: 1058px;
width: 64px;
height: 64px;
.webpBg("common/close.png");
}
}
src/panels/TipPanel/TipPanel.tsx
deleted
100644 → 0
View file @
efa876b6
import
React
from
"react"
;
import
{
observer
}
from
"mobx-react"
;
import
"./TipPanel.less"
;
import
{
Button
}
from
"@grace/ui"
;
import
{
ModalCtrl
}
from
"@/core/ctrls/ModalCtrl.tsx"
;
import
{
LOG_KEY
,
pageView
,
sensorLog
}
from
"@/utils/sensors"
;
export
interface
ITipPanelProps
{
tip
:
string
;
onClose
:
()
=>
void
;
}
@
observer
class
TipPanel
extends
React
.
Component
<
ITipPanelProps
>
{
componentDidMount
()
{
pageView
(
"b14273"
,
{
page_name
:
"提示弹窗"
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14273"
,
"d14275"
,
{
page_name
:
"提示弹窗"
,
button_name
:
"关闭按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14273"
,
"d14274"
,
{
page_name
:
"提示弹窗"
,
button_name
:
"我知道了按钮"
,
});
}
clickClose
=
()
=>
{
ModalCtrl
.
closeModal
();
sensorLog
(
LOG_KEY
.
click
,
"b14273"
,
"d14275"
,
{
page_name
:
"提示弹窗"
,
button_name
:
"关闭按钮"
,
});
this
.
props
.
onClose
&&
this
.
props
.
onClose
();
};
clickBtn
=
()
=>
{
ModalCtrl
.
closeModal
();
sensorLog
(
LOG_KEY
.
click
,
"b14273"
,
"d14274"
,
{
page_name
:
"提示弹窗"
,
button_name
:
"我知道了按钮"
,
});
this
.
props
.
onClose
&&
this
.
props
.
onClose
();
};
render
()
{
const
{
tip
}
=
this
.
props
;
const
isNoTimes
=
tip
===
"获取提示机会已用完"
;
return
<
div
className=
"TipPanel modal_center"
>
<
div
className=
"bg"
/>
<
div
className=
"text"
dangerouslySetInnerHTML=
{
{
__html
:
tip
,
}
}
/>
<
Button
className=
{
`btn md${isNoTimes ? 24 : 15}`
}
onClick=
{
this
.
clickBtn
}
/>
<
Button
className=
{
`close ${isNoTimes ? "" : "md16"}`
}
onClick=
{
this
.
clickClose
}
/>
</
div
>;
}
}
export
default
TipPanel
;
src/panels/VictoryPopup/index.jsx
View file @
f3e09ac3
...
...
@@ -32,14 +32,36 @@ class VictoryPopup extends React.Component {
this
.
state
=
props
;
}
componentDidMount
=
async
()
=>
{
pageView
(
"b14608"
,
{
page_name
:
"成功解锁地标页面"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14608"
,
"d14610"
,
{
page_name
:
"成功解锁地标页面"
,
button_name
:
"关闭按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14608"
,
"d14609"
,
{
page_name
:
"成功解锁地标页面"
,
button_name
:
"去抽奖按钮"
,
});
};
//关闭
onClose
=
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14608"
,
"d14610"
,
{
page_name
:
"成功解锁地标页面"
,
button_name
:
"关闭按钮"
,
});
ModalCtrl
.
closeModal
();
PageCtrl
.
changePage
(
HomePage
)
}
//抽奖
onDraw
=
async
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14608"
,
"d14609"
,
{
page_name
:
"成功解锁地标页面"
,
button_name
:
"去抽奖按钮"
,
});
ModalCtrl
.
closeModal
();
// ModalCtrl.showModal(GiftPackPopup);
await
store
.
getDrawInfo
();
...
...
src/panels/taskpop/taskpop.jsx
View file @
f3e09ac3
...
...
@@ -37,27 +37,23 @@ class Taskpop extends React.Component {
initSensor
()
{
MatterViewOpt
(
"b14
312
"
,
{
MatterViewOpt
(
"b14
638
"
,
{
page_name
:
"做任务,赚次数弹窗"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
312"
,
"d14314
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
638"
,
"d14640
"
,
{
page_name
:
"做任务,赚次数弹窗"
,
button_name
:
"领取奖励按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
312"
,
"d14313
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
638"
,
"d14639
"
,
{
page_name
:
"做任务,赚次数弹窗"
,
button_name
:
"去完成按钮"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14312"
,
"d14315"
,
{
page_name
:
"做任务,赚次数弹窗"
,
button_name
:
"关闭按钮"
,
});
}
componentWillUnmount
()
{
unwatchPageVisibility
(
this
.
onPageVisibilityChange
);
MatterViewDuration
(
"b14
312
"
,
+
new
Date
()
-
this
.
startTime
,
{
MatterViewDuration
(
"b14
638
"
,
+
new
Date
()
-
this
.
startTime
,
{
page_name
:
"做任务,赚次数弹窗"
,
});
}
...
...
@@ -74,13 +70,13 @@ class Taskpop extends React.Component {
const
{
taskStatus
,
code
}
=
item
||
{};
handleLogClick
(
24
,
code
,
1
)
if
(
code
==
TASK_CODE
.
INVITE
){
MatterShareOpt
(
"b14
312"
,
"d14313
"
,
{
MatterShareOpt
(
"b14
638"
,
"d14639
"
,
{
button_name
:
"做任务,赚次数弹窗"
,
page_name
:
"去完成按钮"
,
})
}
else
{
sensorLog
(
LOG_KEY
.
click
,
"b14
312"
,
"d14313
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
638"
,
"d14639
"
,
{
page_name
:
"做任务,赚次数弹窗"
,
button_name
:
"去完成按钮"
,
});
...
...
@@ -92,7 +88,7 @@ class Taskpop extends React.Component {
taskPrizeHandle
=
_asyncThrottle
(
async
(
item
)
=>
{
const
{
code
,
taskStatus
}
=
item
||
{};
handleLogClick
(
24
,
code
,
2
)
sensorLog
(
LOG_KEY
.
click
,
"b14
312"
,
"d14314
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
638"
,
"d14640
"
,
{
page_name
:
"做任务,赚次数弹窗"
,
button_name
:
"领取奖励按钮"
,
});
...
...
@@ -101,11 +97,6 @@ class Taskpop extends React.Component {
})
close
=
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14312"
,
"d14315"
,
{
page_name
:
"做任务,赚次数弹窗"
,
button_name
:
"关闭按钮"
,
});
ModalCtrl
.
closeModal
()
store
.
updateIndex
()
}
...
...
src/panels/yinsirulepop/yinsirulepop.jsx
View file @
f3e09ac3
...
...
@@ -17,11 +17,11 @@ class Yinsirulepop extends React.Component {
}
componentDidMount
()
{
pageView
(
"b14
296
"
,
{
pageView
(
"b14
624
"
,
{
page_name
:
"隐私协议页"
,
});
sensorLog
(
LOG_KEY
.
exposure
,
"b14
296"
,
"d14297
"
,
{
sensorLog
(
LOG_KEY
.
exposure
,
"b14
624"
,
"d14625
"
,
{
page_name
:
"隐私协议页"
,
button_name
:
"同意按钮"
,
});
...
...
@@ -31,7 +31,7 @@ class Yinsirulepop extends React.Component {
}
clickTo
=
_asyncThrottle
(
async
()
=>
{
sensorLog
(
LOG_KEY
.
click
,
"b14
296"
,
"d14297
"
,
{
sensorLog
(
LOG_KEY
.
click
,
"b14
624"
,
"d14625
"
,
{
page_name
:
"隐私协议页"
,
button_name
:
"同意按钮"
,
});
...
...
src/utils/sensors.js
View file @
f3e09ac3
...
...
@@ -99,7 +99,7 @@ export const initSensors = (uid) => {
source
:
CHANNEL_MAP
[
CFG
.
channel
],
platform_name
:
extranceName
[
CFG
.
channel
],
platform_type
:
platformType
[
CFG
.
channel
],
requirement_id
:
1
669
,
requirement_id
:
1
702
,
is_login
:
uid
?
"是"
:
"否"
,
operation_name
:
"研学游中国"
,
source_platform
:
CHANNEL_MAP
?.[
CFG
.
channel
]
||
CFG
.
channel
,
...
...
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