Commit 37c501a8 authored by cc's avatar cc

update

parent 010b1d56
...@@ -8,7 +8,7 @@ import { Button } from '@grace/ui'; ...@@ -8,7 +8,7 @@ import { Button } from '@grace/ui';
import {_asyncThrottle} from "../../utils/utils"; import {_asyncThrottle} from "../../utils/utils";
import { PageCtrl } from "@/core/ctrls/PageCtrl"; import { PageCtrl } from "@/core/ctrls/PageCtrl";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
@observer @observer
class Rulepop extends React.Component { class Rulepop extends React.Component {
constructor(props) { constructor(props) {
...@@ -17,9 +17,22 @@ class Rulepop extends React.Component { ...@@ -17,9 +17,22 @@ class Rulepop extends React.Component {
componentDidMount() { componentDidMount() {
store.initRule(); store.initRule();
pageView("b14294", {
page_name: "活动规则弹窗",
});
sensorLog(LOG_KEY.exposure, "b14294", "d14295", {
page_name: "活动规则弹窗",
button_name: "关闭按钮",
});
} }
handleClose = _asyncThrottle(() => { handleClose = _asyncThrottle(() => {
sensorLog(LOG_KEY.click, "b14294", "d14295", {
page_name: "活动规则弹窗",
button_name: "关闭按钮",
});
ModalCtrl.closeModal() ModalCtrl.closeModal()
}) })
......
...@@ -44,11 +44,19 @@ class Homepage extends React.Component { ...@@ -44,11 +44,19 @@ class Homepage extends React.Component {
// 0 我的排名 // 0 我的排名
case 0: case 0:
// TODO 换成我的排名页面 记得引用 // TODO 换成我的排名页面 记得引用
sensorLog(LOG_KEY.click, "b14261", "d14264", {
page_name: "活动首页",
button_name: "我的排名按钮",
});
PageCtrl.changePage(RankPage); PageCtrl.changePage(RankPage);
break; break;
// 1 抽奖 // 1 抽奖
case 1: case 1:
sensorLog(LOG_KEY.click, "b14261", "d14266", {
page_name: "活动首页",
button_name: "抽奖按钮",
});
PageCtrl.changePage(CapsulePage); PageCtrl.changePage(CapsulePage);
break; break;
...@@ -65,16 +73,29 @@ class Homepage extends React.Component { ...@@ -65,16 +73,29 @@ class Homepage extends React.Component {
// 3 答题 // 3 答题
case 3: case 3:
// TODO // TODO
sensorLog(LOG_KEY.click, "b14261", "d14265", {
page_name: "活动首页",
button_name: "开始答题按钮",
});
break; break;
// 4 我的奖品 // 4 我的奖品
case 4: case 4:
// TODO 换成我的奖品页面 记得引用 // TODO 换成我的奖品页面 记得引用
sensorLog(LOG_KEY.click, "b14261", "d14263", {
page_name: "活动首页",
button_name: "奖品按钮",
});
PageCtrl.changePage(MyPrize); PageCtrl.changePage(MyPrize);
break; break;
// 5 活动规则 // 5 活动规则
case 5: case 5:
sensorLog(LOG_KEY.click, "b14261", "d14262", {
page_name: "活动首页",
button_name: "规则按钮",
});
ModalCtrl.showModal(Rulepop); ModalCtrl.showModal(Rulepop);
break; break;
...@@ -121,23 +142,23 @@ class Homepage extends React.Component { ...@@ -121,23 +142,23 @@ class Homepage extends React.Component {
page_name: "活动首页", page_name: "活动首页",
button_name: "做任务,赚次数按钮", button_name: "做任务,赚次数按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13484", { sensorLog(LOG_KEY.exposure, "b14261", "d14266", {
page_name: "活动首页", page_name: "活动首页",
button_name: "开宝箱按钮", button_name: "抽奖按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13485", { sensorLog(LOG_KEY.exposure, "b14261", "d14265", {
page_name: "活动首页", page_name: "活动首页",
button_name: "掷骰子按钮", button_name: "开始答题按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13483", { sensorLog(LOG_KEY.exposure, "b14261", "d14264", {
page_name: "活动首页", page_name: "活动首页",
button_name: "背包按钮", button_name: "我的排名按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13482", { sensorLog(LOG_KEY.exposure, "b14261", "d14263", {
page_name: "活动首页", page_name: "活动首页",
button_name: "奖品按钮", button_name: "奖品按钮",
}); });
sensorLog(LOG_KEY.exposure, "b13480", "d13481", { sensorLog(LOG_KEY.exposure, "b14261", "d14262", {
page_name: "活动首页", page_name: "活动首页",
button_name: "规则按钮", button_name: "规则按钮",
}); });
......
...@@ -8,9 +8,9 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx"; ...@@ -8,9 +8,9 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import { isWeChat } from '@/utils/share'; import { isWeChat } from '@/utils/share';
import store from '@/store/store'; import store from '@/store/store';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import SignSucPanel from '@/panels/SignSucPanel/SignSucPanel';
import {Axios} from 'axios'; import {Axios} from 'axios';
import FillAddress from '@/panels/FillAddress/FillAddress.jsx'; import FillAddress from '@/panels/FillAddress/FillAddress.jsx';
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
const apiAxios = new Axios({ const apiAxios = new Axios({
timeout: 10000, timeout: 10000,
}); });
...@@ -30,7 +30,15 @@ class MyPrize extends React.Component<any, any> { ...@@ -30,7 +30,15 @@ class MyPrize extends React.Component<any, any> {
componentDidMount() { componentDidMount() {
this.getPrize(); pageView("b14298", {
page_name: "我的奖品页",
});
sensorLog(LOG_KEY.exposure, "b14298", "d14300", {
page_name: "我的奖品页",
button_name: "返回按钮",
});
this.getPrize('');
} }
...@@ -78,12 +86,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -78,12 +86,10 @@ class MyPrize extends React.Component<any, any> {
PrizeList.forEach((item) => { PrizeList.forEach((item) => {
if (!item?.invalid) { if (!item?.invalid) {
// sensorLog(LOG_KEY.exposure, "b11618", "d11619", { sensorLog(LOG_KEY.exposure, "b14298", "d14299", {
// button_name: "去领取", page_name: "我的奖品页",
// page_name: "我的奖品页", button_name: "去领取按钮",
// entrance: extranceName[CFG.channel], });
// operation_name: "去领取",
// });
} }
}); });
} }
...@@ -96,11 +102,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -96,11 +102,10 @@ class MyPrize extends React.Component<any, any> {
return; return;
} }
// sensorLog(LOG_KEY.click, "b11618", "d11619", { sensorLog(LOG_KEY.click, "b14298", "d14299", {
// button_name: "去领取", page_name: "我的奖品页",
// page_name: "我的奖品页", button_name: "去领取按钮",
// operation_name: "去领取", });
// });
// stopSound('bg_music') // stopSound('bg_music')
const { recordId, url, itemType, recordInfo, projectId, drawStatus } = item; const { recordId, url, itemType, recordInfo, projectId, drawStatus } = item;
...@@ -166,14 +171,6 @@ class MyPrize extends React.Component<any, any> { ...@@ -166,14 +171,6 @@ class MyPrize extends React.Component<any, any> {
agentCode: res?.boundYkCode, agentCode: res?.boundYkCode,
prizeProjectId: projectId, prizeProjectId: projectId,
}) })
// modalStore.pushPop("FillAddress", {
// projectId: this.projectId,
// saveAddresUrl: saveAddresUrl,
// getPrize: this.getPrize,
// recordId,
// agentCode: res?.boundYkCode,
// prizeProjectId: projectId,
// });
} else { } else {
//已填写地址或未绑定业务员 //已填写地址或未绑定业务员
if (recordInfo?.status == "0") { if (recordInfo?.status == "0") {
...@@ -209,6 +206,10 @@ class MyPrize extends React.Component<any, any> { ...@@ -209,6 +206,10 @@ class MyPrize extends React.Component<any, any> {
}); });
}); });
clickBack = () => { clickBack = () => {
sensorLog(LOG_KEY.click, "b14298", "d14300", {
page_name: "我的奖品页",
button_name: "返回按钮",
});
PageCtrl.backPage(); PageCtrl.backPage();
} }
......
...@@ -6,6 +6,7 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx"; ...@@ -6,6 +6,7 @@ import { PageCtrl } from "@/core/ctrls/PageCtrl.tsx";
import store from "@/store/store.ts"; import store from "@/store/store.ts";
import HomePage from '../HomePage/HomePage'; import HomePage from '../HomePage/HomePage';
import Countdown from '@/components/ComCountdown/index.jsx'; import Countdown from '@/components/ComCountdown/index.jsx';
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
@observer @observer
class RankPage extends React.Component<any, any> { class RankPage extends React.Component<any, any> {
constructor(props) { constructor(props) {
...@@ -20,6 +21,14 @@ class RankPage extends React.Component<any, any> { ...@@ -20,6 +21,14 @@ class RankPage extends React.Component<any, any> {
} }
componentDidMount(): void { componentDidMount(): void {
this.getRankInfo(); this.getRankInfo();
pageView("b14286", {
page_name: "排行榜页面",
});
sensorLog(LOG_KEY.exposure, "b14286", "d14287", {
page_name: "排行榜页面",
button_name: "返回按钮",
});
} }
getRankInfo = async() =>{ getRankInfo = async() =>{
const {success, data, timeStamp} = await API.rankInfo() const {success, data, timeStamp} = await API.rankInfo()
...@@ -34,6 +43,10 @@ class RankPage extends React.Component<any, any> { ...@@ -34,6 +43,10 @@ class RankPage extends React.Component<any, any> {
} }
} }
clickBack = () => { clickBack = () => {
sensorLog(LOG_KEY.click, "b14286", "d14287", {
page_name: "排行榜页面",
button_name: "返回按钮",
});
PageCtrl.changePage(HomePage); PageCtrl.changePage(HomePage);
} }
......
...@@ -6,6 +6,7 @@ import { Toast } from "@grace/ui"; ...@@ -6,6 +6,7 @@ import { Toast } from "@grace/ui";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import {Axios} from 'axios'; import {Axios} from 'axios';
import Selectmodal from "../selectmodal/selectmodal.jsx"; import Selectmodal from "../selectmodal/selectmodal.jsx";
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors';
const apiAxios = new Axios({ const apiAxios = new Axios({
timeout: 10000, timeout: 10000,
}); });
...@@ -26,14 +27,21 @@ class FillAddress extends React.Component { ...@@ -26,14 +27,21 @@ class FillAddress extends React.Component {
} }
componentDidMount() { componentDidMount() {
// this.initSensor(); this.initSensor();
const { projectId, saveAddresUrl, getPrize, recordId, agentCode, prizeProjectId} = this.props; const { projectId, saveAddresUrl, getPrize, recordId, agentCode, prizeProjectId} = this.props;
console.log('projectId',projectId) console.log('projectId',projectId)
} }
initSensor(){ initSensor(){
pageView("b14310", {
page_name: "地址填写页"
});
sensorLog(LOG_KEY.exposure, "b14310", "d14311", {
page_name: "地址填写页",
button_name: "提交信息按钮",
});
} }
ClickClose = () => { ClickClose = () => {
...@@ -87,10 +95,10 @@ class FillAddress extends React.Component { ...@@ -87,10 +95,10 @@ class FillAddress extends React.Component {
} }
clickSubmit = _throttle(async () => { clickSubmit = _throttle(async () => {
// sensorLog(LOG_KEY.click, "b7391", "d7393", { sensorLog(LOG_KEY.click, "b14310", "d14311", {
// page_name: "地址填写页", page_name: "地址填写页",
// button_name: "提交信息按钮", button_name: "提交信息按钮",
// }); });
const { const {
name, mobile, name, mobile,
......
...@@ -7,10 +7,10 @@ import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibili ...@@ -7,10 +7,10 @@ import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibili
// import { handleLogClick, handleLogExposure } from '../../../MD'; // import { handleLogClick, handleLogExposure } from '../../../MD';
// import { RES_PATH } from '../../../sparkrc'; // import { RES_PATH } from '../../../sparkrc';
import { _throttle } from '../../utils/utils.ts'; import { _throttle } from '../../utils/utils.ts';
import { TASK_CODE,CHANNEL_PARAMS } from '../../utils/constants.ts'; import { TASK_CODE,CHANNEL_PARAMS, extranceName } from '../../utils/constants.ts';
import { setCookies } from '../../store/fetcher.ts'; import { setCookies } from '../../store/fetcher.ts';
import taskStore from '../../store/task.ts'; import taskStore from '../../store/task.ts';
// import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog } from '../../utils/sensors'; import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import { Button } from '@grace/ui'; import { Button } from '@grace/ui';
...@@ -35,23 +35,31 @@ class Taskpop extends React.Component { ...@@ -35,23 +35,31 @@ class Taskpop extends React.Component {
initSensor() { initSensor() {
// pageView("b10875", { MatterViewOpt("b14312", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// }); entrance: extranceName[CFG.channel],
});
// sensorLog(LOG_KEY.exposure,"b7870","d8729");
// sensorLog(LOG_KEY.exposure, "b10875", "d10877", { sensorLog(LOG_KEY.exposure, "b14312", "d14314", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "领取奖励按钮", button_name: "领取奖励按钮",
// }); });
// sensorLog(LOG_KEY.exposure, "b10875", "d10876", { sensorLog(LOG_KEY.exposure, "b14312", "d14313", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "去完成按钮", button_name: "去完成按钮",
// }); });
sensorLog(LOG_KEY.exposure, "b14312", "d14315", {
page_name: "做任务,赚次数弹窗",
button_name: "关闭按钮",
});
} }
componentWillUnmount() { componentWillUnmount() {
unwatchPageVisibility(this.onPageVisibilityChange); unwatchPageVisibility(this.onPageVisibilityChange);
MatterViewDuration("b14312", {
page_name: "做任务,赚次数弹窗",
entrance: extranceName[CFG.channel],
});
} }
onPageVisibilityChange = async (visible) => { onPageVisibilityChange = async (visible) => {
...@@ -67,29 +75,29 @@ class Taskpop extends React.Component { ...@@ -67,29 +75,29 @@ class Taskpop extends React.Component {
// if(code == TASK_CODE.INVITE){ // if(code == TASK_CODE.INVITE){
// MatterShareOpt(LOG_KEY.click,"b7870","d8729") // MatterShareOpt(LOG_KEY.click,"b7870","d8729")
// } // }
// sensorLog(LOG_KEY.click, "b10875", "d10876", { sensorLog(LOG_KEY.click, "b14312", "d14313", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "去完成按钮", button_name: "去完成按钮",
// }); });
await taskStore.doTask(item); await taskStore.doTask(item);
}) })
/** 领奖 */ /** 领奖 */
taskPrizeHandle = _throttle(async (item) => { taskPrizeHandle = _throttle(async (item) => {
const { code, taskStatus } = item || {}; const { code, taskStatus } = item || {};
// sensorLog(LOG_KEY.click, "b10875", "d10877", { sensorLog(LOG_KEY.click, "b14312", "d14314", {
// page_name: "赚次数任务页", page_name: "做任务,赚次数弹窗",
// button_name: "领取奖励按钮", button_name: "领取奖励按钮",
// }); });
await taskStore.getTaskPrize(item); await taskStore.getTaskPrize(item);
}) })
close = () => { close = () => {
// sensorLog(LOG_KEY.click, "b7394", "d7398", { sensorLog(LOG_KEY.click, "b14312", "d14315", {
// page_name: "做任务赚骰子页", page_name: "做任务,赚次数弹窗",
// button_name: "关闭按钮", button_name: "关闭按钮",
// }); });
ModalCtrl.closeModal() ModalCtrl.closeModal()
// store.getHomeInfo() // store.getHomeInfo()
......
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