Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RB_StrongestBrain_250520
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_StrongestBrain_250520
Commits
e894de3d
Commit
e894de3d
authored
May 23, 2025
by
cc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
cf89c018
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
22 deletions
+21
-22
MyPrize.tsx
src/pages/MyPrize/MyPrize.tsx
+6
-7
sensors.js
src/utils/sensors.js
+15
-15
No files found.
src/pages/MyPrize/MyPrize.tsx
View file @
e894de3d
...
@@ -44,17 +44,16 @@ class MyPrize extends React.Component<any, any> {
...
@@ -44,17 +44,16 @@ class MyPrize extends React.Component<any, any> {
getPrize
=
async
(
projectId
:
String
)
=>
{
getPrize
=
async
(
projectId
:
String
)
=>
{
let
params
=
{};
let
params
=
{};
console
.
log
(
"!!!!"
,
store
?.
homeInfo
?.
prod
)
if
(
projectId
)
{
if
(
projectId
)
{
params
=
{
params
=
{
projectId
:
projectId
,
projectId
:
projectId
,
page
:
1
,
page
:
1
,
prod
:
store
?.
homeInfo
?.
prod
!==
undefined
?
(
store
?.
homeInfo
?.
prod
||
false
)
:
true
prod
:
CFG
.
env
==
"prod"
};
};
}
else
{
}
else
{
params
=
{
params
=
{
page
:
1
,
page
:
1
,
prod
:
store
.
homeInfo
?.
prod
!==
undefined
?
(
store
.
homeInfo
?.
prod
||
false
)
:
true
,
prod
:
CFG
.
env
==
"prod"
};
};
}
}
const
res
=
await
API
.
prize
(
params
);
const
res
=
await
API
.
prize
(
params
);
...
...
src/utils/sensors.js
View file @
e894de3d
...
@@ -120,7 +120,7 @@ export const initSensors = (uid) => {
...
@@ -120,7 +120,7 @@ export const initSensors = (uid) => {
export
const
sensorLog
=
(
logKey
,
bid
,
did
,
options
)
=>
{
export
const
sensorLog
=
(
logKey
,
bid
,
did
,
options
)
=>
{
if
(
!
isInit
)
{
if
(
!
isInit
)
{
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
const
uid
=
store
.
homeInfo
?.
uid
;
const
uid
=
store
.
indexData
?.
uid
;
initSensors
(
uid
);
initSensors
(
uid
);
}
}
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
...
@@ -130,7 +130,7 @@ export const sensorLog = (logKey, bid, did, options) => {
...
@@ -130,7 +130,7 @@ export const sensorLog = (logKey, bid, did, options) => {
operation_id
:
CFG
.
operationId
,
operation_id
:
CFG
.
operationId
,
act_type
:
"客经"
,
act_type
:
"客经"
,
location_type
:
"活动"
,
location_type
:
"活动"
,
agent_code
:
store
.
homeInfo
?.
agentCode
,
agent_code
:
store
.
indexData
?.
agentCode
,
act_id
:
CFG
.
actId
,
act_id
:
CFG
.
actId
,
...
options
...
options
});
});
...
@@ -139,7 +139,7 @@ export const sensorLog = (logKey, bid, did, options) => {
...
@@ -139,7 +139,7 @@ export const sensorLog = (logKey, bid, did, options) => {
export
const
pageViewD
=
(
bid
,
did
,
options
)
=>
{
export
const
pageViewD
=
(
bid
,
did
,
options
)
=>
{
if
(
!
isInit
)
{
if
(
!
isInit
)
{
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
const
uid
=
store
.
homeInfo
?.
uid
;
const
uid
=
store
.
indexData
?.
uid
;
initSensors
(
uid
);
initSensors
(
uid
);
}
}
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
...
@@ -149,7 +149,7 @@ export const pageViewD = (bid, did, options) => {
...
@@ -149,7 +149,7 @@ export const pageViewD = (bid, did, options) => {
avtivity_name
:
"谁是最强大脑"
,
avtivity_name
:
"谁是最强大脑"
,
act_type
:
"客经"
,
act_type
:
"客经"
,
location_type
:
"活动"
,
location_type
:
"活动"
,
agent_code
:
store
.
homeInfo
?.
agentCode
,
agent_code
:
store
.
indexData
?.
agentCode
,
act_id
:
CFG
.
actId
,
act_id
:
CFG
.
actId
,
...
options
...
options
});
});
...
@@ -163,7 +163,7 @@ export const pageViewD = (bid, did, options) => {
...
@@ -163,7 +163,7 @@ export const pageViewD = (bid, did, options) => {
export
const
pageView
=
(
bid
,
options
)
=>
{
export
const
pageView
=
(
bid
,
options
)
=>
{
if
(
!
isInit
)
{
if
(
!
isInit
)
{
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
const
uid
=
store
.
homeInfo
?.
uid
;
const
uid
=
store
.
indexData
?.
uid
;
initSensors
(
uid
);
initSensors
(
uid
);
}
}
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
// console.log(`%c type: ${logKey} track_sign: ${`aL06Activity.${bid}.${did}.${logKey}.${EVENT_NAME[logKey]}`}`, "font-size: 20px; color: rgb(244, 123, 93)");
...
@@ -173,7 +173,7 @@ export const pageView = (bid, options) => {
...
@@ -173,7 +173,7 @@ export const pageView = (bid, options) => {
avtivity_name
:
"谁是最强大脑"
,
avtivity_name
:
"谁是最强大脑"
,
act_type
:
"客经"
,
act_type
:
"客经"
,
location_type
:
"活动"
,
location_type
:
"活动"
,
agent_code
:
store
.
homeInfo
?.
agentCode
,
agent_code
:
store
.
indexData
?.
agentCode
,
act_id
:
CFG
.
actId
,
act_id
:
CFG
.
actId
,
...
options
...
options
});
});
...
@@ -182,18 +182,18 @@ export const pageView = (bid, options) => {
...
@@ -182,18 +182,18 @@ export const pageView = (bid, options) => {
export
const
MatterViewOpt
=
(
bid
,
options
)
=>
{
export
const
MatterViewOpt
=
(
bid
,
options
)
=>
{
if
(
!
isInit
)
{
if
(
!
isInit
)
{
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
const
uid
=
store
.
homeInfo
?.
uid
;
const
uid
=
store
.
indexData
?.
uid
;
initSensors
(
uid
);
initSensors
(
uid
);
}
}
sensors
.
track
(
EVENT_NAME
[
LOG_KEY
.
MatterView
],
{
sensors
.
track
(
EVENT_NAME
[
LOG_KEY
.
MatterView
],
{
track_sign
:
`aL06Activity.
${
bid
}
.
${
LOG_KEY
.
pageview
}
.
${
EVENT_NAME
[
LOG_KEY
.
MatterView
]}
`
,
track_sign
:
`aL06Activity.
${
bid
}
.
${
LOG_KEY
.
pageview
}
.
${
EVENT_NAME
[
LOG_KEY
.
MatterView
]}
`
,
operation_id
:
CFG
.
operationId
,
operation_id
:
CFG
.
operationId
,
agent_code
:
store
.
homeInfo
?.
agentCode
,
agent_code
:
store
.
indexData
?.
agentCode
,
act_id
:
CFG
.
actId
,
act_id
:
CFG
.
actId
,
act_type
:
"客经"
,
act_type
:
"客经"
,
location_type
:
"活动"
,
location_type
:
"活动"
,
entrance
:
extranceName
[
CFG
.
channel
],
entrance
:
extranceName
[
CFG
.
channel
],
sales_id
:
CFG
.
workerCode
||
store
.
homeInfo
?.
agentCode
,
// todo
sales_id
:
CFG
.
workerCode
||
store
.
indexData
?.
agentCode
,
// todo
avtivity_name
:
"谁是最强大脑"
,
avtivity_name
:
"谁是最强大脑"
,
...
options
...
options
});
});
...
@@ -203,18 +203,18 @@ export const MatterViewOpt = (bid, options) => {
...
@@ -203,18 +203,18 @@ export const MatterViewOpt = (bid, options) => {
export
const
MatterShareOpt
=
(
bid
,
did
,
options
)
=>
{
export
const
MatterShareOpt
=
(
bid
,
did
,
options
)
=>
{
if
(
!
isInit
)
{
if
(
!
isInit
)
{
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
const
uid
=
store
.
homeInfo
?.
uid
;
const
uid
=
store
.
indexData
?.
uid
;
initSensors
(
uid
);
initSensors
(
uid
);
}
}
sensors
.
track
(
EVENT_NAME
[
LOG_KEY
.
MatterShare
],
{
sensors
.
track
(
EVENT_NAME
[
LOG_KEY
.
MatterShare
],
{
track_sign
:
`aL06Activity.
${
bid
}
.
${
did
}
.click.
${
EVENT_NAME
[
LOG_KEY
.
MatterShare
]}
`
,
track_sign
:
`aL06Activity.
${
bid
}
.
${
did
}
.click.
${
EVENT_NAME
[
LOG_KEY
.
MatterShare
]}
`
,
operation_id
:
CFG
.
operationId
,
operation_id
:
CFG
.
operationId
,
agent_code
:
store
.
homeInfo
?.
agentCode
,
agent_code
:
store
.
indexData
?.
agentCode
,
act_id
:
CFG
.
actId
,
act_id
:
CFG
.
actId
,
act_type
:
"客经"
,
act_type
:
"客经"
,
location_type
:
"活动"
,
location_type
:
"活动"
,
entrance
:
extranceName
[
CFG
.
channel
],
entrance
:
extranceName
[
CFG
.
channel
],
sales_id
:
CFG
.
workerCode
||
store
.
homeInfo
?.
agentCode
,
// todo
sales_id
:
CFG
.
workerCode
||
store
.
indexData
?.
agentCode
,
// todo
avtivity_name
:
"谁是最强大脑"
,
avtivity_name
:
"谁是最强大脑"
,
...
options
...
options
});
});
...
@@ -224,18 +224,18 @@ export const MatterShareOpt = (bid, did, options) => {
...
@@ -224,18 +224,18 @@ export const MatterShareOpt = (bid, did, options) => {
export
const
MatterViewDuration
=
(
bid
,
time
,
options
)
=>
{
export
const
MatterViewDuration
=
(
bid
,
time
,
options
)
=>
{
if
(
!
isInit
)
{
if
(
!
isInit
)
{
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
console
.
info
(
`%c 神策上报地址:
${
serverUrl
[
env
]}
当前环境:
${
env
}
`
,
"font-size: 12px; color: green"
);
const
uid
=
store
.
homeInfo
?.
uid
;
const
uid
=
store
.
indexData
?.
uid
;
initSensors
(
uid
);
initSensors
(
uid
);
}
}
sensors
.
track
(
EVENT_NAME
[
LOG_KEY
.
pageViewTime
],
{
sensors
.
track
(
EVENT_NAME
[
LOG_KEY
.
pageViewTime
],
{
track_sign
:
`aL06Activity.
${
bid
}
.
${
LOG_KEY
.
pageViewTime
}
.
${
EVENT_NAME
[
LOG_KEY
.
pageViewTime
]}
`
,
track_sign
:
`aL06Activity.
${
bid
}
.
${
LOG_KEY
.
pageViewTime
}
.
${
EVENT_NAME
[
LOG_KEY
.
pageViewTime
]}
`
,
operation_id
:
CFG
.
operationId
,
operation_id
:
CFG
.
operationId
,
agent_code
:
store
.
homeInfo
?.
agentCode
,
agent_code
:
store
.
indexData
?.
agentCode
,
act_id
:
CFG
.
actId
,
act_id
:
CFG
.
actId
,
act_type
:
"客经"
,
act_type
:
"客经"
,
location_type
:
"活动"
,
location_type
:
"活动"
,
entrance
:
extranceName
[
CFG
.
channel
],
entrance
:
extranceName
[
CFG
.
channel
],
sales_id
:
CFG
.
workerCode
||
store
.
homeInfo
?.
agentCode
,
// todo
sales_id
:
CFG
.
workerCode
||
store
.
indexData
?.
agentCode
,
// todo
avtivity_name
:
"谁是最强大脑"
,
avtivity_name
:
"谁是最强大脑"
,
$event_duration
:
time
,
$event_duration
:
time
,
...
options
...
options
...
...
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