Commit e894de3d authored by cc's avatar cc

update

parent cf89c018
...@@ -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);
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment