Commit ef10d02a authored by jtwu's avatar jtwu

Merge branch 'master' of gitlab2.dui88.com:sparkprojects/rb-studychina-20250617

parents 245edc22 a0beaa69
...@@ -84,10 +84,10 @@ ...@@ -84,10 +84,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。") // alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
} }
</script> </script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1750516818753/assets/index-BbVLN6U7.js"></script> <script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1750596681786/assets/index-DFyFtdTQ.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750516818753/assets/vendor-CIBsSgjF.js"> <link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750596681786/assets/vendor-DWHb8WZT.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750516818753/assets/vendor-DhjHFO43.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750596681786/assets/vendor-DhjHFO43.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750516818753/assets/index-DWKwfnt-.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750596681786/assets/index-DmQfCqdL.css">
<script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script> <script type="module">import.meta.url;import("_").catch(()=>1);(async function*(){})().next();if(location.protocol!="file:"){window.__vite_is_modern_browser=true}</script>
<script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script> <script type="module">!function(){if(window.__vite_is_modern_browser)return;console.warn("vite: loading legacy chunks, syntax error above and the same error below should be ignored");var e=document.getElementById("vite-legacy-polyfill"),n=document.createElement("script");n.src=e.src,n.onload=function(){System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))},document.body.appendChild(n)}();</script>
</head> </head>
...@@ -96,8 +96,8 @@ ...@@ -96,8 +96,8 @@
<div id="root"></div> <div id="root"></div>
<!-- <script src="https://yun.duiba.com.cn/db_games/RB_yanxue/250620/js/output.js"></script> --> <!-- <script src="https://yun.duiba.com.cn/db_games/RB_yanxue/250620/js/output.js"></script> -->
<script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script> <script nomodule>!function(){var e=document,t=e.createElement("script");if(!("noModule"in t)&&"onbeforeload"in t){var n=!1;e.addEventListener("beforeload",(function(e){if(e.target===t)n=!0;else if(!e.target.hasAttribute("nomodule")||!n)return;e.preventDefault()}),!0),t.type="module",t.src=".",e.head.appendChild(t),t.remove()}}();</script>
<script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1750516818753/assets/polyfills-legacy-C2MhNPfJ.js"></script> <script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1750596681786/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1750516818753/assets/index-legacy-D3AW57Ac.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script> <script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1750596681786/assets/index-legacy-mXsV-BKH.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
\ No newline at end of file
export default [ export default [
{
url: '/common/visit.do',
method: 'get',
response: ({ query }) => {
return {
success: true,
code: "",
message: "",
data: {
code: '111'
},
}
}
},
{ {
url: '/game/queryBoundYk.do', url: '/game/queryBoundYk.do',
method: 'get', method: 'get',
......
...@@ -9,7 +9,7 @@ const domain = ""; ...@@ -9,7 +9,7 @@ const domain = "";
const channel = getUrlParam("channel"); const channel = getUrlParam("channel");
const dom = `${channel}.0.0.0`; const dom = `${channel}.0.0.0`;
const MDList: IAutoMdData[] = new Array(40).fill("").map((_, i) => { const MDList: IAutoMdData[] = new Array(38).fill("").map((_, i) => {
return { return {
ele: `.md${i + 1}`, ele: `.md${i + 1}`,
data: { data: {
...@@ -23,30 +23,6 @@ const MDList: IAutoMdData[] = new Array(40).fill("").map((_, i) => { ...@@ -23,30 +23,6 @@ const MDList: IAutoMdData[] = new Array(40).fill("").map((_, i) => {
}; };
}); });
MDList.push({
ele: ".md10_0",
data: {
dpm: `${appId}.110.10.0`,
dcm,
dom,
domain,
appId,
},
once: true,
});
MDList.push({
ele: ".md10_1",
data: {
dpm: `${appId}.110.10.1`,
dcm,
dom,
domain,
appId,
},
once: true,
});
MDAuto({ MDAuto({
...@@ -54,20 +30,20 @@ MDAuto({ ...@@ -54,20 +30,20 @@ MDAuto({
click: MDList, // 点击 click: MDList, // 点击
}); });
export function handleLogExposure(id: number | string, id2: number | string = 1) { export function handleLogExposure(id: number | string, id2: number | string = 1, id3: number | string = 0) {
logExposure({ logExposure({
dpm: `${appId}.110.${id}.${id2}`, dpm: `${appId}.110.${id}.${id2}`,
dcm, dcm: "202." + CFG.projectId + "." + id3 + ".0",
domain, domain,
dom, dom,
appId, appId,
}); });
} }
export function handleLogClick(id: number | string, id2: number | string = 1) { export function handleLogClick(id: number | string, id2: number | string = 1, id3: number | string = 0) {
logClick({ logClick({
dpm: `${appId}.110.${id}.${id2}`, dpm: `${appId}.110.${id}.${id2}`,
dcm, dcm: "202." + CFG.projectId + "." + id3 + ".0",
domain, domain,
dom, dom,
appId, appId,
......
...@@ -133,8 +133,6 @@ const API = generateAPI({ ...@@ -133,8 +133,6 @@ const API = generateAPI({
getLongLinkQrcode: `/customActivity/qrcode/getQrcode`, getLongLinkQrcode: `/customActivity/qrcode/getQrcode`,
/**数据推送 */
visit:`common/visit.do`,
/** 绑定友客业务员信息接口 */ /** 绑定友客业务员信息接口 */
bindYk: { bindYk: {
uri: "game/bindYk.do", uri: "game/bindYk.do",
......
This diff is collapsed.
import React from "react";
import {observer} from "mobx-react";
import "./NoPrizeCard.less";
import {SvgaPlayer} from "@grace/svgaplayer";
import {Swiper, SwiperSlide} from "swiper/react";
import "swiper/css";
import {_throttle, randomNum} from "../../utils/utils";
import {Button} from "@grace/ui";
import {ModalCtrl} from "@/core/ctrls/ModalCtrl";
import {LOG_KEY, pageView, sensorLog} from '../../utils/sensors.js';
import afterSvga from "../../assets/svga/7输出撕开.svga";
@observer
class NoPrizeCard extends React.Component {
state = {
card: true,
};
componentDidMount() {
pageView("b14284", {
page_name: "抽中未中奖弹窗",
});
sensorLog(LOG_KEY.exposure, "b14284", "d14285", {
page_name: "抽中未中奖弹窗",
button_name: "点击翻转按钮",
});
}
/** 切换按钮*/
clickExchange1 = () => {
sensorLog(LOG_KEY.click, "b14284", "d14285", {
page_name: "抽中未中奖弹窗",
button_name: "点击翻转按钮",
});
this.setState({
card: false,
svg: true,
});
setTimeout(() => {
this.setState({
svg: false,
card: false,
});
}, 2000);
};
/** 关闭按钮*/
clickClose = _throttle(() => {
ModalCtrl.closeModal();
});
render() {
const { card } = this.state;
const { productInfo } = this.props || {};
console.log(productInfo);
const textSrc = new URL(
`../../assets/NoPrizeCard/text${randomNum(1, 5)}.png?x-oss-process=image/format,webp`,
import.meta.url
).href
return (
<div className="NoPrizeCard modal_center">
{card === true ? (
//翻转前
<div className="card1">
<span className="picture"></span>
<img className="text" src={textSrc}/>
</div>
) : (
//翻转后
<div>
<span className="afterBg"></span>
<Swiper
className="prodSwiper"
indicatorProps={{ style: { display: "none" } }}
>
{productInfo?.map((item, index) => {
return (
<SwiperSlide className="prodItem" key={index}>
<img
className="picture2"
src={item?.productImg}
alt={item?.productText}
/>
<div className="txt">{item?.productText}</div>
</SwiperSlide>
);
})}
</Swiper>
{/* <Button className="exchange2" /> */}
<SvgaPlayer className="after" src={afterSvga} loop={1} />
</div>
)}
{card === true && (
<Button className="exchange1 md26" onClick={this.clickExchange1} />
)}
<Button className="close" onClick={this.clickClose} />
</div>
);
}
}
export default NoPrizeCard;
@import "../../res.less";
.NoPrizeCard {
position: absolute;
left: 0;
top: 0;
width: 750px;
height: 1624px;
.popupCenterShow();
.after {
position: absolute;
left: 20px;
top: 270px;
width: 701px;
height: 1014px;
}
.picture {
position: absolute;
left: 49px;
top: 252px;
width: 653px;
height: 888px;
.sparkBg("NoPrizeCard/picture.png");
}
.afterBg {
position: absolute;
left: 49px;
top: 252px;
width: 653px;
height: 888px;
.sparkBg("NoPrizeCard/afterBg.png");
}
.text {
position: absolute;
left: 275px;
top: 976px;
width: 215px;
height: 115px;
// .fade-in;
}
.prodSwiper {
position: absolute;
left: 155px;
top: 0px;
width: 452px;
height: 1258px;
transition: transform 288ms linear;
transition-delay: 288ms;
.fade-in;
.prodItem {
display: flex;
align-items: center;
justify-content: center;
// .line {
// position: absolute;
// left: 5px;
// top: 1035px;
// width: 438px;
// height: 2px;
// .sparkBg("NoPrizeCard/line.png")
// }
.picture2 {
position: absolute;
left: 0px;
// top: 495px;
top: 430px;
width: 452px;
height: 499px;
border-radius: 18px;
.sparkBg("NoPrizeCard/picture2.png")
}
.txt {
font-size: 22px;
color: rgb(255, 255, 255);
line-height: 1.391;
text-align: left;
position: absolute;
top: 980px;
width: 417px;
height: 86px;
overflow-y: auto;
}
}
}
.exchange1 {
position: absolute;
left: 302px;
top: 1160px;
width: 133px;
height: 29px;
.sparkBg("NoPrizeCard/exchange.png")
}
// .exchange2 {
// position: absolute;
// left: 302px;
// top: 1252px;
// width: 134px;
// height: 29px;
// .sparkBg("NoPrizeCard/exchange2.png")
// }
.close {
position: absolute;
left: 345px;
top: 1276px;
width: 64px;
height: 64px;
.sparkBg("NoPrizeCard/close.png")
}
}
\ No newline at end of file
import { observer } from 'mobx-react';
import React, { Component } from 'react';
import './exitPop.less';
import { Button } from '@grace/ui';
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { PageCtrl } from "@/core/ctrls/PageCtrl";
import HomePage from '@/pages/HomePage/HomePage.tsx';
@observer
class ExitPop extends Component {
closeModal = () => {
ModalCtrl.closeModal();
this.props.cancel && this.props.cancel();
}
backHome = () => {
PageCtrl.changePage(HomePage)
this.closeModal();
}
render() {
return (
<div className="exitPop modal_center">
<div className="bg"></div>
<Button className="continueBtn md21" onClick={this.closeModal}></Button>
<Button className="sureBtn md22" onClick={this.backHome}></Button>
<Button className="closeBtn md23" onClick={this.closeModal}></Button>
</div>
);
}
}
export default ExitPop;
@import '../../res.less';
.exitPop {
width: 100%;
height: 100%;
position: absolute;
.bg {
position: absolute;
left: 72px;
top: 405px;
width: 632px;
height: 642px;
.sparkBg("exitPop/bg.png");
}
.continueBtn {
position: absolute;
left: 141px;
top: 792px;
width: 210px;
height: 87px;
.sparkBg("exitPop/continueBtn.png");
}
.sureBtn {
position: absolute;
left: 373px;
top: 792px;
width: 210px;
height: 87px;
.sparkBg("exitPop/sureBtn.png");
}
.closeBtn {
position: absolute;
left: 343px;
top: 1048px;
width: 64px;
height: 64px;
.sparkBg("exitPop/closeBtn.png");
}
}
\ No newline at end of file
"use strict";
import React from "react";
import { observer } from "mobx-react";
import "./prizepop.less";
import { Button } from "@grace/ui";
import { _asyncThrottle } from "../../utils/utils";
import { PageCtrl } from "@/core/ctrls/PageCtrl";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
@observer
class Prizepop extends React.Component {
constructor(props) {
super(props);
}
componentDidMount(){
pageView("b14282", {
page_name: "抽中中奖弹窗",
});
sensorLog(LOG_KEY.exposure, "b14282", "d14283", {
page_name: "抽中中奖弹窗",
button_name: "开心收下按钮",
});
}
handleReceive = _asyncThrottle(() => {
sensorLog(LOG_KEY.click, "b14282", "d14283", {
page_name: "抽中中奖弹窗",
button_name: "开心收下按钮",
});
ModalCtrl.closeModal()
})
handleClose = _asyncThrottle(() => {
ModalCtrl.closeModal()
})
render() {
const { prizeInfo } = this.props || {};
const { prizeName = "", prizeImg = "" } = prizeInfo;
return (
<div className="prizepop modal_center">
<span className="light"></span>
<span className="bg"></span>
<Button className="receive md25" onClick={this.handleReceive} />
<img className="icon" src={prizeImg} alt={prizeName} />
<span className="name">{prizeName}</span>
<span className="tip">奖品可在首页 我的奖品 中查看</span>
<span className="title"></span>
<Button className="close" onClick={this.handleClose} />
</div>
);
}
}
export default Prizepop;
@import "../../res.less";
.prizepop {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.popupCenterShow();
.light {
width: 750px;
height: 1008px;
left: 0px;
top: 324px;
position: absolute;
.sparkBg("prizePop/light.png");
}
.bg {
width: 646px;
height: 852px;
left: 32px;
top: 325px;
position: absolute;
.sparkBg("prizePop/bg.png");
}
.receive {
width: 263px;
height: 92px;
left: 237px;
top: 921px;
position: absolute;
.sparkBg("prizePop/receive.png");
}
.icon {
width: 217px;
height: 217px;
left: 256px;
top: 604px;
position: absolute;
.sparkBg("prizePop/icon.png");
border-radius: 15px;
}
.name {
width: 550px;
height: 33px;
left: 100px;
top: 843px;
text-align: center;
position: absolute;
font-size: 30px;
line-height: 33px;
color: rgba(153, 57, 27, 1);
.lineClamp1();
}
.tip {
width: 306px;
height: 21px;
left: 216px;
top: 1028px;
position: absolute;
font-size: 22px;
line-height: 21px;
color: rgba(153, 57, 27, 1);
}
.title {
width: 364px;
height: 57px;
left: 179px;
top: 405px;
position: absolute;
.sparkBg("prizePop/title.png");
}
.close {
width: 64px;
height: 64px;
left: 343px;
top: 1251px;
position: absolute;
.sparkBg("prizePop/close.png");
}
}
...@@ -43,7 +43,7 @@ class Rulepop extends React.Component { ...@@ -43,7 +43,7 @@ class Rulepop extends React.Component {
<div className="rulepop modal_center"> <div className="rulepop modal_center">
<span className="bg"></span> <span className="bg"></span>
<span className="rule" dangerouslySetInnerHTML={{ __html: store.ruleInfo }}></span> <span className="rule" dangerouslySetInnerHTML={{ __html: store.ruleInfo }}></span>
<Button className="close md28" onClick={this.handleClose} /> <Button className="close md36" onClick={this.handleClose} />
</div> </div>
); );
} }
......
"use strict";
import React from "react";
import { observer } from "mobx-react";
import "./settlechance.less";
import { Button, Toast } from "@grace/ui";
import { _asyncThrottle } from "../../utils/utils";
import { PageCtrl } from "@/core/ctrls/PageCtrl";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { SvgaPlayer } from "@grace/svgaplayer";
import lightSvga from "../../assets/svga/6输出弹窗.svga";
import Capsulepage from "../../pages/CapsulePage/CapsulePage";
import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, pageView, sensorLog } from "../../utils/sensors.js";
import HomePage from "../../pages/HomePage/HomePage";
@observer
class Settlechance extends React.Component {
constructor(props) {
super(props);
}
componentDidMount(){
pageView("b14276", {
page_name: "结算弹窗",
});
sensorLog(LOG_KEY.exposure, "b14276", "d14279", {
page_name: "结算弹窗",
button_name: "关闭按钮",
});
sensorLog(LOG_KEY.exposure, "b14276", "d14277", {
page_name: "结算弹窗",
button_name: "我知道了按钮",
});
sensorLog(LOG_KEY.exposure, "b14276", "d14278", {
page_name: "结算弹窗",
button_name: "去抽奖按钮",
});
}
handleClose = _asyncThrottle(() => {
ModalCtrl.closeModal()
PageCtrl.changePage(HomePage)
sensorLog(LOG_KEY.click, "b14276", "d14279", {
page_name: "结算弹窗",
button_name: "关闭按钮",
});
})
handleKnow = _asyncThrottle(() => {
ModalCtrl.closeModal()
PageCtrl.changePage(HomePage)
sensorLog(LOG_KEY.click, "b14276", "d14277", {
page_name: "结算弹窗",
button_name: "我知道了按钮",
});
})
handleDraw = _asyncThrottle(() => {
ModalCtrl.closeModal()
PageCtrl.changePage(Capsulepage)
sensorLog(LOG_KEY.click, "b14276", "d14278", {
page_name: "结算弹窗",
button_name: "去抽奖按钮",
});
})
render() {
const { data } = this.props || {};
const {
drawChance = 0,
title = "",
desc = "",
img = "",
score = 0,
} = data || {};
return (
<div className="settlechance modal_center">
<SvgaPlayer className="light" src={lightSvga} />
<span className="bg"></span>
<Button className="draw md19" onClick={this.handleDraw} />
<Button className="know md17" onClick={this.handleKnow} />
<img className="icon"
src = {img}
alt = {title}
/>
<span className="ribbon"></span>
<span className="title">恭喜您, 答对{score}</span>
<span className="tip1">获得了「{title}」称号</span>
<span className="tip2">{desc}</span>
<span className="tip3">恭喜获得抽奖机会+{drawChance}</span>
<Button className="close md18" onClick={this.handleClose} />
</div>
);
}
}
export default Settlechance;
@import "../../res.less";
.settlechance {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
@font-face {
font-family: "MaokenAssortedSans";
src: url('/src/assets/font/MaokenAssortedSans.ttf') format('truetype');
// font-display: swap;
}
.light {
width: 750px;
height: 1624px;
left: 0px;
// top: 213px;
position: absolute;
// .sparkBg("settleChance/dongxiao.png");
}
.bg {
width: 606px;
height: 901px;
left: 72px;
top: 380px;
position: absolute;
.sparkBg("settleChance/bg.png");
}
.draw {
width: 169px;
height: 69px;
left: 435px;
top: 1167px;
position: absolute;
.sparkBg("settleChance/draw.png");
}
.know {
width: 263px;
height: 92px;
left: 237px;
top: 915px;
position: absolute;
.sparkBg("settleChance/know.png");
}
.icon {
width: 237px;
height: 251px;
left: 242px;
top: 540px;
position: absolute;
// .sparkBg("settleChance/icon.png");
}
.title {
// width: 636px;
width: 750px;
height: 201px;
// left: 138px;
left: -10px;
top: 288px;
font-size: 62px;
text-align: center;
position: absolute;
color: rgb(255, 245, 214);
font-family: "MaokenAssortedSans";
}
.ribbon {
width: 636px;
height: 201px;
left: 30px;
top: 214px;
position: absolute;
.sparkBg("settleChance/ribbon.png");
}
.tip1 {
width: 460px;
height: 33px;
left: 134px;
top: 488px;
text-align: center;
position: absolute;
font-size: 30px;
line-height: 33px;
color: rgba(153, 57, 27, 1);
font-weight: bold;
.lineClamp1();
}
.tip2 {
width: 460px;
height: 84px;
left: 134px;
top: 817px;
text-align: center;
position: absolute;
font-size: 22px;
line-height: 38px;
color: rgba(169, 90, 62, 1);
// .lineClamp1();
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.tip3 {
width: 276px;
height: 28px;
left: 133px;
top: 1184px;
position: absolute;
font-size: 29px;
line-height: 28px;
color: rgba(157, 66, 37, 1);
font-weight: bold;
}
.close {
width: 64px;
height: 64px;
left: 343px;
top: 1339px;
position: absolute;
.sparkBg("settleChance/close.png");
}
}
\ No newline at end of file
'use strict';
import React from 'react';
import { observer } from 'mobx-react';
import './settlenochance.less';
import { Button, Toast } from '@grace/ui';
import { _asyncThrottle } from "../../utils/utils";
import { PageCtrl } from "@/core/ctrls/PageCtrl";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { SvgaPlayer } from "@grace/svgaplayer";
import lightSvga from "../../assets/svga/6输出弹窗.svga";
import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, pageView, sensorLog } from "../../utils/sensors.js";
import HomePage from "@/pages/HomePage/HomePage";
@observer
class Settlenochance extends React.Component {
constructor(props) {
super(props);
}
componentDidMount(){
pageView("b14276", {
page_name: "结算弹窗",
});
sensorLog(LOG_KEY.exposure, "b14276", "d14279", {
page_name: "结算弹窗",
button_name: "关闭按钮",
});
sensorLog(LOG_KEY.exposure, "b14276", "d14277", {
page_name: "结算弹窗",
button_name: "我知道了按钮",
});
}
handleClose = _asyncThrottle(() => {
PageCtrl.changePage(HomePage)
ModalCtrl.closeModal()
sensorLog(LOG_KEY.click, "b14276", "d14279", {
page_name: "结算弹窗",
button_name: "关闭按钮",
});
})
handleKnow = _asyncThrottle(() => {
PageCtrl.changePage(HomePage)
ModalCtrl.closeModal()
sensorLog(LOG_KEY.click, "b14276", "d14277", {
page_name: "结算弹窗",
button_name: "我知道了按钮",
});
})
render() {
const { data } = this.props || {};
const {
title = "",
desc = "",
img = "",
score = 0,
} = data || {};
return (
<div className="settlenochance modal_center">
<SvgaPlayer className="light" src={lightSvga} />
<span className="bg"></span>
<Button className="know md17" onClick={this.handleKnow} />
<img className="icon"
src = {img}
alt = {title}
/>
<span className="ribbon"></span>
<span className="title">恭喜您, 答对{score}</span>
<span className="tip1">获得了「{title}」称号</span>
<span className="tip2">{desc}</span>
<Button className="close md18" onClick={this.handleClose} />
</div>
);
}
}
export default Settlenochance;
@import "../../res.less";
.settlenochance {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
@font-face {
font-family: "MaokenAssortedSans";
src: url('/src/assets/font/MaokenAssortedSans.ttf') format('truetype');
// font-display: swap;
}
.light {
width: 750px;
height: 1624px;
left: 0px;
// top: 213px;
position: absolute;
// .sparkBg("settleChance/dongxiao.png");
}
.bg {
width: 606px;
height: 724px;
left: 72px;
top: 491px;
position: absolute;
.sparkBg("settleNoChance/bg.png");
}
.know {
width: 263px;
height: 92px;
left: 237px;
top: 1026px;
position: absolute;
.sparkBg("settleNoChance/know.png");
}
.icon {
width: 198px;
height: 198px;
left: 271px;
top: 686px;
position: absolute;
// .sparkBg("settleNoChance/icon.png");
}
.title {
// width: 636px;
width: 750px;
height: 201px;
// left: 138px;
left: -10px;
top: 288+100px;
font-size: 62px;
text-align: center;
position: absolute;
color: rgb(255, 245, 214);
font-family: "MaokenAssortedSans";
}
.ribbon {
width: 636px;
height: 201px;
left: 30px;
top: 214+100px;
position: absolute;
.sparkBg("settleChance/ribbon.png");
}
.tip1 {
width: 460px;
height: 33px;
left: 134px;
top: 599px;
text-align: center;
position: absolute;
font-size: 30px;
line-height: 33px;
color: rgba(153, 57, 27, 1);
font-weight: bold;
.lineClamp1();
}
.tip2 {
width: 460px;
height: 84px;
left: 134px;
top: 925px;
text-align: center;
position: absolute;
font-size: 22px;
line-height: 38px;
color: rgba(169, 90, 62, 1);
// .lineClamp1();
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.close {
width: 64px;
height: 64px;
left: 343px;
top: 1269px;
position: absolute;
.sparkBg("settleNoChance/close.png");
}
}
\ No newline at end of file
"use strict";
import React from "react";
import { observer } from "mobx-react";
import "./CapsulePage.less";
import { _asyncThrottle, _throttle } from "../../utils/utils.ts";
import store from "../../store/store.ts";
import { CHANNEL_PARAMS } from "../../utils/constants.ts";
import { CircleTurntable } from "@spark/circle-turntable";
import { isWeiXin } from "../../AppTools.ts";
import API from "../../api/index.ts";
import { Button, Toast } from "@grace/ui";
import { PageCtrl } from "@/core/ctrls/PageCtrl";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import { SvgaPlayer } from "@grace/svgaplayer";
import { Swiper, SwiperSlide } from "swiper/react";
import { Autoplay } from "swiper";
import "swiper/css";
import Homepage from "../HomePage/HomePage.tsx";
import Prizepop from "../../components/prizepop/prizepop.jsx";
import NoPrizeCard from "../../components/NoPrizeCard/NoPrizeCard.jsx";
import CodePop from "../../components/CodePop/CodePop.jsx";
import machineSvga from "../../assets/svga/1输出扭蛋机常态.svga";
import normalSvga from "../../assets/svga/2输出待机啊.svga";
import dynamicSvga from "../../assets/svga/3输出出奖啊.svga";
import output1Svga from "../../assets/svga/4中奖扭蛋.svga";
import output2Svga from "../../assets/svga/5中奖弹窗.svga";
import { LOG_KEY, pageView, sensorLog } from "../../utils/sensors.js";
@observer
class Capsulepage extends React.Component {
constructor(props) {
super(props);
this.state = {
drawInfo: {},
btnDynamic: false, // 抽奖机是否动态中
btnOutput: false, // 开扭蛋效果是否启动
};
this.btnStarting = false; // 抽奖机是否启动
// this.turntableRef = null; // 大转盘
// this.drawResultInfo = {};
}
componentDidMount() {
this.getDrawInfo();
pageView("b14280", {
page_name: "抽奖页面",
});
sensorLog(LOG_KEY.exposure, "b14280", "d14281", {
page_name: "抽奖页面",
button_name: "立即抽奖按钮",
});
}
/** 获取抽奖信息 */
getDrawInfo = async () => {
const { success, data } = await API.drawIndex();
if (success && data) {
this.setState({
drawInfo: data || {},
});
}
};
// 开始抽奖
lottteryHandle = _asyncThrottle(async () => {
sensorLog(LOG_KEY.click, "b14280", "d14281", {
page_name: "抽奖页面",
button_name: "立即抽奖按钮",
});
// 微信端拦截
if (isWeiXin()) {
// 友客小程序
if (CFG.channel == CHANNEL_PARAMS.YK_MINI) {
return Toast.show("请前往人保寿险管家app活动抽奖~");
}
// 其他微信端 提醒唤端弹窗
else {
return ModalCtrl.showModal(CodePop);
}
}
const { remainDrawTimes = 0 } = this.state.drawInfo;
// 抽奖次数为0
if (!remainDrawTimes) {
return Toast.show("抽奖次数不足,快去猜谜赚次数吧~");
}
if (this.btnStarting) return false;
this.btnStarting = true;
const { success, data } = await API.drawJoin();
if (success && data) {
// 扭蛋机转动开始抽奖
// this.turntableRef.launch();
this.setState({ btnDynamic: true });
// this.drawResultInfo = data || {};
const {
boolPrize = false,
prizeInfo = {},
productInfo = [],
} = data || {};
// const index = prizeVOs?.findIndex(
// (item) => item.prizeId === (this.drawResultInfo.prizeId || "thanks")
// );
// console.info("index", index);
// 抽奖机停止转动
setTimeout(() => {
this.setState({ btnOutput: true });
}, 1600);
setTimeout(() => {
this.setState({ btnDynamic: false });
this.stopOkHandle(boolPrize, prizeInfo, productInfo);
}, 2000);
// this.turntableRef.braking(index);
} else {
this.btnStarting = false;
this.getDrawInfo();
}
});
// 抽奖停止处理
stopOkHandle = (boolPrize, prizeInfo, productInfo) => {
this.btnStarting = false;
setTimeout(() => {
this.setState({ btnOutput: false });
}, 1600);
// 此时判断是否中奖 true-中奖,取prizeInfo信息,false-为中奖,取productInfo
if (boolPrize) {
// 中奖
setTimeout(() => {
ModalCtrl.showModal(Prizepop, { prizeInfo });
}, 1600);
} else {
// 没中奖
setTimeout(() => {
ModalCtrl.showModal(NoPrizeCard, { productInfo });
}, 1600);
}
this.getDrawInfo();
};
/** 返回 */
backHome = _throttle(() => {
if (this.btnStarting) return false;
// store.changePage(PAGE_MAP.HOME_PAGE)
PageCtrl.changePage(Homepage);
});
goTask = _throttle(() => {
if (this.btnStarting) return false;
// modalStore.pushPop("Taskpop", { onClose: () => this.getDrawInfo() })
});
render() {
const { btnDynamic, btnOutput } = this.state;
const { prizeInfo = [], remainDrawTimes = 0 } = this.state.drawInfo;
console.log(prizeInfo);
return (
<div className="capsule">
<span className="bg"></span>
<span className="logo"></span>
<Button className="back_btn" onClick={this.backHome} />
{/* <Button className="task_btn" onClick={this.goTask} /> */}
<Button className="draw_btn_box md20" onClick={this.lottteryHandle}>
<span className="draw_btn"></span>
<span className="left_num">剩余次数:{remainDrawTimes || 0}</span>
</Button>
{btnDynamic ? (
<SvgaPlayer className="dynamic" src={dynamicSvga} />
) : (
<SvgaPlayer className="normal" src={normalSvga} />
)}
<SvgaPlayer className="machine" src={machineSvga} />
{btnOutput && (
<>
<span className="mengceng"></span>
<SvgaPlayer className="output1" src={output1Svga} />
<SvgaPlayer className="output2" src={output2Svga} />
</>
)}
{/* 底部奖品轮播 */}
<div className="bottomprize">
<div className="prizeindex">
<Swiper
autoplay={{
disableOnInteraction: false,
delay: 300,
}}
modules={[Autoplay]}
slidesPerView={3.6}
loop={true}
initialSlide={0}
speed={1600}
freeMode={true}
freeModeSticy={true}
>
{prizeInfo?.map((item, index) => (
<SwiperSlide key={index}>
<div className="psample">
<img className="psimg" src={item.prizeImg} alt={item.prizeName} />
<span className="psname">{item.prizeName}</span>
</div>
</SwiperSlide>
))}
</Swiper>
</div>
</div>
</div>
);
}
}
export default Capsulepage;
@import "../../res.less";
.capsule {
width: 100%;
height: 100%;
left: 0;
top: 0;
position: absolute;
overflow-x: hidden;
overflow-y: auto;
.bg {
width: 750px;
height: 1624px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("capsulePage/bg.png");
}
.logo {
width: 290px;
height: 28px;
left: 230px;
top: 113px;
position: absolute;
.sparkBg("capsulePage/logo.png");
}
.back_btn {
left: 31px;
top: 115px;
width: 59px;
height: 57px;
position: absolute;
.sparkBg("capsulePage/back.png");
}
.machine {
position: absolute;
width: 742px;
height: 1067px;
top: 184px;
}
.normal {
position: absolute;
width: 515px;
height: 452px;
top: 427px;
left: 114px;
}
.dynamic {
position: absolute;
width: 515px;
height: 452px;
top: 427px;
left: 114px;
}
.output1 {
position: absolute;
width: 750px;
height: 830px;
top: 427px;
// left: 114px;
z-index: 2;
}
.output2 {
position: absolute;
width: 750px;
height: 830px;
top: 427px;
// left: 114px;
z-index: 2;
}
.mengceng {
position: absolute;
width: 750px;
height: 1624px;
// left: 114px;
.sparkBg("capsulePage/mengceng.png");
z-index: 1;
}
// .task_btn {
// position: absolute;
// left: 548px;
// top: 1211px;
// width: 202px;
// height: 203px;
// .sparkBg("common/task.png");
// }
// .prize_info {
// position: absolute;
// left: 57px;
// top: 470px;
// width: 615px;
// height: 46px;
// .prize_info_bg {
// position: absolute;
// left: 0;
// top: 0;
// width: 615px;
// height: 46px;
// .sparkBg("capsulePage/prize_info_bg.png");
// }
// .prize_info_laba {
// position: absolute;
// left: 142px;
// top: 11px;
// width: 31px;
// height: 25px;
// .sparkBg("capsulePage/prize_info_laba.png");
// }
// .prize_info_list {
// width: 360px;
// height: 46px;
// position: absolute;
// left: 185px;
// top: 0;
// .prize_info_item {
// width: 100%;
// height: 46px;
// font-size: 20px;
// color: rgb(40, 85, 84);
// line-height: 46px;
// text-align: left;
// .lineClamp1();
// }
// }
// }
.draw_btn_box {
width: 422px;
height: 154px;
left: 164px;
top: 1222px;
position: absolute;
.draw_btn {
width: 422px;
height: 154px;
left: 0px;
top: 0px;
position: absolute;
.sparkBg("capsulePage/draw_btn.png");
}
.left_num {
width: 100%;
height: 27px;
left: 0px;
top: 92px;
position: absolute;
font-size: 22px;
color: rgb(202, 57, 0);
text-align: center;
}
}
// .turantable {
// left: 35px;
// top: 476px;
// width: 680px;
// height: 681px;
// position: absolute;
// .sparkBg("capsulePage/turantable_box.png");
// pointer-events: none;
// display: flex;
// justify-content: center;
// align-items: center;
// .turantable_box {
// position: relative;
// }
// .turantable_bg {
// width: 584px;
// height: 584px;
// left: 0px;
// top: 0px;
// position: absolute;
// .sparkBg("capsulePage/turantable_bg.png");
// }
// .prize_item {
// width: 190px;
// height: 150px;
// color: rgba(248, 103, 89, 1);
// font-size: 28px;
// box-sizing: border-box;
// text-align: center;
// .prize_name {
// width: 100%;
// font-weight: bold;
// .lineClamp1();
// }
// .prize_img {
// width: 80px;
// height: 70px;
// object-fit: contain;
// margin-top: 10px;
// }
// }
// .pointer {
// position: absolute;
// left: 276px;
// top: 251px;
// width: 126px;
// height: 131px;
// position: absolute;
// .sparkBg("capsulePage/pointer.png");
// }
// }
// .cover {
// left: 318px;
// top: 430px;
// width: 114px;
// height: 138px;
// position: absolute;
// .sparkBg("capsulePage/cover.png");
// pointer-events: none;
// }
.bottomprize {
width: 698px;
height: 158px;
left: 26px;
top: 1400px;
position: absolute;
z-index: 0;
.prizeindex {
width: 644px;
height: 133px;
left: 27px;
top: 14px;
position: absolute;
.psample {
width: 118px;
height: 200px;
left: 0px;
top: 0px;
position: relative;
align-items: center;
justify-content: center;
text-align: center;
.psimg {
width: 142px;
height: 142px;
left: 0px;
top: 0px;
border-radius: 15px;
.sparkBg("capsulePage/PSBg.png");
}
.psname {
width: 142px;
height: 30px;
left: 0;
top: 150px;
text-align: center;
position: absolute;
font-size: 26px;
line-height: 30px;
color: rgb(255, 255, 255);
.lineClamp1();
}
}
}
}
}
\ No newline at end of file
...@@ -18,11 +18,11 @@ import.meta.env.DEV && initDevtools({}); ...@@ -18,11 +18,11 @@ import.meta.env.DEV && initDevtools({});
import { _throttle } from "@/utils/utils.ts"; import { _throttle } from "@/utils/utils.ts";
import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts"; import { GameEvent, globalEvent } from "@/pages/GamePage/GameEvent.ts";
import { LOG_KEY, pageView, sensorLog } from "@/utils/sensors"; import { LOG_KEY, pageView, sensorLog } from "@/utils/sensors";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import "./js/output"; import "./js/output";
import API from '@/api'; import API from '@/api';
import { handleLogClick, handleLogExposure } from '@/MD';
declare const Game: any; declare const Game: any;
...@@ -57,6 +57,8 @@ class GamePage extends React.Component<any, any> { ...@@ -57,6 +57,8 @@ class GamePage extends React.Component<any, any> {
targetTravel: gameStore.gameInfo.targetConfig.target2,//飞机数量 targetTravel: gameStore.gameInfo.targetConfig.target2,//飞机数量
time: gameStore.gameInfo.countdownSeconds,//时间,秒计 time: gameStore.gameInfo.countdownSeconds,//时间,秒计
needGuide: store.indexData?.newGuideFlag == 1, needGuide: store.indexData?.newGuideFlag == 1,
handleLogExposure: handleLogExposure,
handleLogClick: handleLogClick,
}) })
if (store.indexData?.newGuideFlag == 1) { if (store.indexData?.newGuideFlag == 1) {
API.completeGuide({ flag: 2 }) API.completeGuide({ flag: 2 })
......
...@@ -8,7 +8,6 @@ import { _asyncThrottle, windowJumpUrl, getUrlParam } from "../../utils/utils"; ...@@ -8,7 +8,6 @@ import { _asyncThrottle, windowJumpUrl, getUrlParam } 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 Rulepop from "../../components/rulepop/rulepop.jsx"; import Rulepop from "../../components/rulepop/rulepop.jsx";
import CapsulePage from "../CapsulePage/CapsulePage.jsx";
import { isWeiXin } from "../../AppTools.ts"; import { isWeiXin } from "../../AppTools.ts";
import store from '@/store/store'; import store from '@/store/store';
import Taskpop from '@/panels/taskpop/taskpop.jsx'; import Taskpop from '@/panels/taskpop/taskpop.jsx';
...@@ -220,10 +219,10 @@ class Homepage extends React.Component { ...@@ -220,10 +219,10 @@ class Homepage extends React.Component {
<span className="name">用户id:{uid}</span> <span className="name">用户id:{uid}</span>
</div> </div>
<span className="logo"></span> <span className="logo"></span>
<Button className="draw" onClick={() => this.handleButtonClick(1)}> <Button className="draw md10" onClick={() => this.handleButtonClick(1)}>
<span className="draw_num">{leftDrawTimes || 0}</span> <span className="draw_num">{leftDrawTimes || 0}</span>
</Button> </Button>
<Button className="study_map md11" onClick={() => this.handleButtonClick(0)} /> <Button className="study_map md12" onClick={() => this.handleButtonClick(0)} />
<Button className="task md11" onClick={() => this.handleButtonClick(2)} /> <Button className="task md11" onClick={() => this.handleButtonClick(2)} />
<Button className="matter md9" onClick={() => this.handleButtonClick(3)}> <Button className="matter md9" onClick={() => this.handleButtonClick(3)}>
<span className="m_bg"></span> <span className="m_bg"></span>
......
...@@ -13,6 +13,7 @@ import {Axios} from 'axios'; ...@@ -13,6 +13,7 @@ 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'; import { LOG_KEY, MatterShareOpt, MatterViewOpt, pageView, sensorLog,MatterViewDuration } from '../../utils/sensors.js';
import shareStore from '@/store/share.js'; import shareStore from '@/store/share.js';
import { handleLogClick, handleLogExposure } from '../../MD.ts';
const apiAxios = new Axios({ const apiAxios = new Axios({
timeout: 10000, timeout: 10000,
}); });
...@@ -103,7 +104,7 @@ class MyPrize extends React.Component { ...@@ -103,7 +104,7 @@ class MyPrize extends React.Component {
Toast.show("奖品已过期"); Toast.show("奖品已过期");
return; return;
} }
handleLogClick(38)
sensorLog(LOG_KEY.click, "b14298", "d14299", { sensorLog(LOG_KEY.click, "b14298", "d14299", {
page_name: "我的奖品页", page_name: "我的奖品页",
button_name: "去领取按钮", button_name: "去领取按钮",
...@@ -242,6 +243,7 @@ class MyPrize extends React.Component { ...@@ -242,6 +243,7 @@ class MyPrize extends React.Component {
<div className="list"> <div className="list">
{records?.length > 0 ? ( {records?.length > 0 ? (
records.map((item, index) => { records.map((item, index) => {
!item?.invalid && handleLogExposure(38)
return ( return (
<div className="item" key={index} onClick={() => this.goPrizeDetail(item)}> <div className="item" key={index} onClick={() => this.goPrizeDetail(item)}>
<span className="bg_item"></span> <span className="bg_item"></span>
...@@ -251,7 +253,7 @@ class MyPrize extends React.Component { ...@@ -251,7 +253,7 @@ class MyPrize extends React.Component {
<span className="expire_time"> <span className="expire_time">
领奖截止日期:{dateFormatter(item?.expireTime, "yyyy-MM-dd hh:mm:ss")} 领奖截止日期:{dateFormatter(item?.expireTime, "yyyy-MM-dd hh:mm:ss")}
</span> </span>
{item?.invalid ? <Button className="gray_btn grey"></Button> : <Button className="gobtn md30"></Button>} {item?.invalid ? <Button className="gray_btn grey"></Button> : <Button className="gobtn"></Button>}
</div> </div>
); );
}) })
...@@ -259,7 +261,7 @@ class MyPrize extends React.Component { ...@@ -259,7 +261,7 @@ class MyPrize extends React.Component {
<span className="empty">暂无数据</span> <span className="empty">暂无数据</span>
)} )}
</div> </div>
<Button className="back md29" onClick={this.clickBack}></Button> <Button className="back md37" onClick={this.clickBack}></Button>
</div> </div>
</div> </div>
); );
......
...@@ -8,7 +8,6 @@ import { _throttle, getUrlParam, windowJumpUrl } from '@/utils/utils.ts'; ...@@ -8,7 +8,6 @@ import { _throttle, getUrlParam, windowJumpUrl } from '@/utils/utils.ts';
// import store from '@/store'; // import store from '@/store';
import API from '@/api'; import API from '@/api';
import { extranceName } from '@/utils/constants.ts'; import { extranceName } from '@/utils/constants.ts';
// import { handleLogClick, handleLogExposure } from '../../../MD';
import shareStore from '../../store/share.js'; import shareStore from '../../store/share.js';
import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, sensorLog } from '../../utils/sensors.js'; import { LOG_KEY, MatterShareOpt, MatterViewDuration, MatterViewOpt, sensorLog } from '../../utils/sensors.js';
...@@ -37,11 +36,6 @@ class AgentSharepage extends React.Component { ...@@ -37,11 +36,6 @@ class AgentSharepage extends React.Component {
// await store.checkBindStatus(); // await store.checkBindStatus();
// await this.getShareInfo(); // await this.getShareInfo();
if (getUrlParam("inviteCode")) {
// handleLogExposure(13)
} else {
// handleLogExposure(20)
}
// setTimeout(() => { // setTimeout(() => {
// this.shareRef.scrollTo(0, 70) // this.shareRef.scrollTo(0, 70)
// }, 50) // }, 50)
...@@ -91,7 +85,7 @@ class AgentSharepage extends React.Component { ...@@ -91,7 +85,7 @@ class AgentSharepage extends React.Component {
<div className="agentsharepage_wrap" ref={r => this.shareRef = r}> <div className="agentsharepage_wrap" ref={r => this.shareRef = r}>
<div className="sharepage modal_center"> <div className="sharepage modal_center">
<span className="bg"></span> <span className="bg"></span>
<span className="normal_btn md31" onClick={this.handleShareAct}></span> <span className="normal_btn md27" onClick={this.handleShareAct}></span>
</div> </div>
</div> </div>
); );
......
...@@ -46,9 +46,9 @@ class Sharepage extends React.Component { ...@@ -46,9 +46,9 @@ class Sharepage extends React.Component {
if (getUrlParam("inviteCode")) { if (getUrlParam("inviteCode")) {
handleLogExposure(33) handleLogExposure(25)
} else { } else {
handleLogExposure(32) handleLogExposure(26)
} }
// setTimeout(() => { // setTimeout(() => {
// this.shareRef.scrollTo(0, 70) // this.shareRef.scrollTo(0, 70)
...@@ -81,7 +81,7 @@ class Sharepage extends React.Component { ...@@ -81,7 +81,7 @@ class Sharepage extends React.Component {
if (getUrlParam("inviteCode")) { if (getUrlParam("inviteCode")) {
handleLogClick(33) handleLogClick(25)
sensorLog(LOG_KEY.click, "b14316", "d14318", { sensorLog(LOG_KEY.click, "b14316", "d14318", {
page_name: "落地页", page_name: "落地页",
button_name: "为TA助力按钮", button_name: "为TA助力按钮",
...@@ -91,7 +91,7 @@ class Sharepage extends React.Component { ...@@ -91,7 +91,7 @@ class Sharepage extends React.Component {
page_name: "落地页", page_name: "落地页",
button_name: "进入活动按钮", button_name: "进入活动按钮",
}); });
handleLogClick(32) handleLogClick(26)
} }
CFG.workerCode = getUrlParam("ykCode"); CFG.workerCode = getUrlParam("ykCode");
if (isMiniprogram()) { //小程序域名写死 if (isMiniprogram()) { //小程序域名写死
......
...@@ -4,7 +4,7 @@ import React from 'react'; ...@@ -4,7 +4,7 @@ import React from 'react';
import { observer } from 'mobx-react'; import { observer } from 'mobx-react';
import './taskpop.less'; import './taskpop.less';
import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibility-notify.ts'; import { unwatchPageVisibility, watchPageVisibility } from '@/core/page-visibility-notify.ts';
// import { handleLogClick, handleLogExposure } from '../../../MD'; import { handleLogClick, handleLogExposure } from '../../MD.ts';
// import { RES_PATH } from '../../../sparkrc'; // import { RES_PATH } from '../../../sparkrc';
import { _asyncThrottle, _throttle } from '../../utils/utils.ts'; import { _asyncThrottle, _throttle } from '../../utils/utils.ts';
import { TASK_CODE,CHANNEL_PARAMS, extranceName } from '../../utils/constants.ts'; import { TASK_CODE,CHANNEL_PARAMS, extranceName } from '../../utils/constants.ts';
...@@ -72,6 +72,7 @@ class Taskpop extends React.Component { ...@@ -72,6 +72,7 @@ class Taskpop extends React.Component {
/** 去完成 */ /** 去完成 */
taskDoHandle = _asyncThrottle(async (item) => { taskDoHandle = _asyncThrottle(async (item) => {
const {taskStatus, code} = item || {}; const {taskStatus, code} = item || {};
handleLogClick(24, code, 1)
if(code == TASK_CODE.INVITE){ if(code == TASK_CODE.INVITE){
MatterShareOpt("b14312", "d14313", { MatterShareOpt("b14312", "d14313", {
button_name: "做任务,赚次数弹窗", button_name: "做任务,赚次数弹窗",
...@@ -90,6 +91,7 @@ class Taskpop extends React.Component { ...@@ -90,6 +91,7 @@ class Taskpop extends React.Component {
/** 领奖 */ /** 领奖 */
taskPrizeHandle = _asyncThrottle(async (item) => { taskPrizeHandle = _asyncThrottle(async (item) => {
const { code, taskStatus } = item || {}; const { code, taskStatus } = item || {};
handleLogClick(24, code, 2)
sensorLog(LOG_KEY.click, "b14312", "d14314", { sensorLog(LOG_KEY.click, "b14312", "d14314", {
page_name: "做任务,赚次数弹窗", page_name: "做任务,赚次数弹窗",
button_name: "领取奖励按钮", button_name: "领取奖励按钮",
...@@ -113,13 +115,13 @@ class Taskpop extends React.Component { ...@@ -113,13 +115,13 @@ class Taskpop extends React.Component {
return ( return (
<div className="taskpop topPop_move"> <div className="taskpop topPop_move">
<span className="bg"></span> <span className="bg"></span>
<Button className="close md34" onClick={this.close}></Button> <Button className="close md23" onClick={this.close}></Button>
<div className="list"> <div className="list">
{ {
taskList?.length > 0 && taskList?.length > 0 &&
taskList.map((val, key) => { taskList.map((val, key) => {
// val?.taskStatus == 0 && handleLogExposure(37, 1) val?.taskStatus == 0 && handleLogExposure(24, val?.code, 1)
// val?.taskStatus == 1 && handleLogExposure(37, 2) val?.taskStatus == 1 && handleLogExposure(24, val?.code, 2)
return ( return (
<div className="item" key={key}> <div className="item" key={key}>
<span className="bg_item"></span> <span className="bg_item"></span>
......
...@@ -50,7 +50,7 @@ class Yinsirulepop extends React.Component { ...@@ -50,7 +50,7 @@ class Yinsirulepop extends React.Component {
dangerouslySetInnerHTML={{ dangerouslySetInnerHTML={{
__html: store?.indexData?.privacyContent, __html: store?.indexData?.privacyContent,
}}/> }}/>
<span className="btn md27" onClick={this.clickTo}></span> <span className="btn md35" onClick={this.clickTo}></span>
</div> </div>
</div> </div>
); );
......
...@@ -105,7 +105,6 @@ class Store { ...@@ -105,7 +105,6 @@ class Store {
newGuideFlag?: number, newGuideFlag?: number,
} = {}; } = {};
firstIn = true;
async updateIndex() { async updateIndex() {
const { success, data } = await API.index(); const { success, data } = await API.index();
if (!success) { if (!success) {
...@@ -129,10 +128,6 @@ class Store { ...@@ -129,10 +128,6 @@ class Store {
} }
} }
if (this.firstIn && data.validUid) {
API.visit()
this.firstIn = false
}
if (data.rulePop) { if (data.rulePop) {
ModalCtrl.showModal(RulePop) ModalCtrl.showModal(RulePop)
......
...@@ -11,7 +11,6 @@ import { CHANNEL_PARAMS, TASK_CODE } from "../utils/constants"; ...@@ -11,7 +11,6 @@ import { CHANNEL_PARAMS, TASK_CODE } from "../utils/constants";
import { Toast } from "@grace/ui"; import { Toast } from "@grace/ui";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl"; import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import LongImgPop from "@/panels/longImgPop/longImgPop.jsx"; import LongImgPop from "@/panels/longImgPop/longImgPop.jsx";
import { handleLogClick, handleLogExposure } from "../MD";
import { md5 } from "@spark/utils"; import { md5 } from "@spark/utils";
interface TaskItem { interface TaskItem {
...@@ -39,18 +38,6 @@ const taskStore = makeAutoObservable({ ...@@ -39,18 +38,6 @@ const taskStore = makeAutoObservable({
}); });
if ((success && data)) { if ((success && data)) {
this.taskList = data?.item || []; this.taskList = data?.item || [];
(data?.item || []).map((item,index)=>{
console.log('item?.taskStatus',item?.taskStatus)
if(item?.taskStatus == 0){
if(item?.code == 'invite'){
handleLogExposure(35,3)
}else{
handleLogExposure(35,1)
}
}else if(item?.taskStatus == 1){
handleLogExposure(35,2)
}
})
} }
}, },
...@@ -58,11 +45,6 @@ const taskStore = makeAutoObservable({ ...@@ -58,11 +45,6 @@ const taskStore = makeAutoObservable({
async doTask(item) { async doTask(item) {
// jumpUrl 后端已经根据渠道返回对应的链接 // jumpUrl 后端已经根据渠道返回对应的链接
const { code, jumpUrl } = item || {}; const { code, jumpUrl } = item || {};
if(code == TASK_CODE.INVITE){
handleLogClick(35,3)
}else{
handleLogClick(35,1)
}
switch (true) { switch (true) {
//签到 //签到
...@@ -200,7 +182,6 @@ const taskStore = makeAutoObservable({ ...@@ -200,7 +182,6 @@ const taskStore = makeAutoObservable({
async getTaskPrize(item) { async getTaskPrize(item) {
const { id, code, prizePendingCode } = item || {}; const { id, code, prizePendingCode } = item || {};
handleLogClick(35,2)
const { success, data } = await API.sendPrize({ const { success, data } = await API.sendPrize({
taskId: id, taskId: id,
taskCode: code, taskCode: code,
......
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