Commit b94da842 authored by haiyoucuv's avatar haiyoucuv

Merge remote-tracking branch 'origin/master'

parents 4efdb1b9 c6148f8d
...@@ -35,17 +35,17 @@ ...@@ -35,17 +35,17 @@
// https://activity.m.duiba.com.cn/customShare/share?id=Did1NjA5Mjc // https://activity.m.duiba.com.cn/customShare/share?id=Did1NjA5Mjc
CFG.loginUrl = 'https://98570-activity.m.dexfu.cn/customShare/share?id=Did1NjA5ODM' CFG.loginUrl = 'https://98570-activity.m.dexfu.cn/customShare/share?id=Did1NjA5ODM'
</script> </script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/index-BRtIxcL_.js"></script> <script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1747634680122/assets/index-CMTp7qoQ.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/vendor-B0ON_Ogt.js"> <link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747634680122/assets/vendor-DaUNT6jQ.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/vendor-CWeaUrOh.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747634680122/assets/vendor-CWeaUrOh.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/index-lbaSWz8H.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747634680122/assets/index-BEiGbEt9.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>
<body> <body>
<div id="root"></div> <div id="root"></div>
<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/1747381612146/assets/polyfills-legacy-C2MhNPfJ.js"></script> <script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1747634680122/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/index-legacy-cz-zYnz_.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/1747634680122/assets/index-legacy-I9_YX3vD.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
......
import {AESEncrypt} from "./Crypto"; import {AESEncrypt} from "./Crypto";
export default [ export default [
{
url: '/draw/draw.do',
method: 'get',
response: ({query}) => {
return {
"data": "<p>以下是游戏规则:手速要快,点击红包雨。。333。。。。。。。。。。。。。。。。。。。。11111111111111sadasdadadsad5555555557777777777799999999999911111111111111111111111222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333311111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333331111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333333333333333</p>",
"success": true
}
},
},
{ {
url: '/projectRule.query', url: '/projectRule.query',
method: 'get', method: 'get',
......
...@@ -13,6 +13,13 @@ ...@@ -13,6 +13,13 @@
position: absolute; position: absolute;
.sparkBg("drawPop/bg.png"); .sparkBg("drawPop/bg.png");
} }
.bgsvga {
width: 679px;
height: 671px;
left: 35px;
top: 369px;
position: absolute;
}
.boxs { .boxs {
width: 584px; width: 584px;
height: 361px; height: 361px;
...@@ -22,10 +29,10 @@ ...@@ -22,10 +29,10 @@
.sparkBg("drawPop/boxs.png"); .sparkBg("drawPop/boxs.png");
} }
.svga { .svga {
width: 412px; width: 679px;
height: 362px; height: 671px;
left: 177px; left: 35px;
top: 555px; top: 369px;
position: absolute; position: absolute;
} }
.title { .title {
......
...@@ -9,7 +9,8 @@ import API from '@/api'; ...@@ -9,7 +9,8 @@ import API from '@/api';
import { _asyncThrottle } from '@/utils/utils'; import { _asyncThrottle } from '@/utils/utils';
import Drawnoprizepop from '../drawnoprizepop/drawnoprizepop'; import Drawnoprizepop from '../drawnoprizepop/drawnoprizepop';
import Drawprizepop from '../drawprizepop/drawprizepop'; import Drawprizepop from '../drawprizepop/drawprizepop';
import drawSvga from "../../../src/assets/svga/8输出抽奖.svga"; import drawSvga from "../../../src/assets/svga/2输出选中.svga";
import bgSvga from "../../../src/assets/svga/1输出标题.svga";
import { SvgaPlayer } from '@grace/svgaplayer'; import { SvgaPlayer } from '@grace/svgaplayer';
import store from '@/store/store'; import store from '@/store/store';
// 定义 Drawpop 组件的 state 类型 // 定义 Drawpop 组件的 state 类型
...@@ -51,20 +52,21 @@ class Drawpop extends React.Component<{}, DrawpopState> { ...@@ -51,20 +52,21 @@ class Drawpop extends React.Component<{}, DrawpopState> {
this.setState({ this.setState({
showSvga: true showSvga: true
}) })
ModalCtrl.closeModal(); // ModalCtrl.closeModal();
if (this.drawInfo.prizeId == "thanks") { // if (this.drawInfo.prizeId == "thanks") {
ModalCtrl.showModal(Drawnoprizepop) // ModalCtrl.showModal(Drawnoprizepop)
} else { // } else {
ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo }) // ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo })
} // }
} }
}) })
render() { render() {
return ( return (
<div className="drawpop modal_center"> <div className="drawpop modal_center">
<span className="bg"></span> {/* <span className="bg"></span> */}
<span className="boxs"></span> <SvgaPlayer className='bgsvga' src={bgSvga}></SvgaPlayer>
{/* { {!this.state.showSvga && <span className="boxs"></span>}
{
this.state.showSvga && <SvgaPlayer className='svga' src={drawSvga} loop={1} onEnd={() => { this.state.showSvga && <SvgaPlayer className='svga' src={drawSvga} loop={1} onEnd={() => {
ModalCtrl.closeModal(); ModalCtrl.closeModal();
...@@ -74,7 +76,7 @@ class Drawpop extends React.Component<{}, DrawpopState> { ...@@ -74,7 +76,7 @@ class Drawpop extends React.Component<{}, DrawpopState> {
ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo }) ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo })
} }
}}></SvgaPlayer> }}></SvgaPlayer>
} */} }
{/* <span className="title"></span> */} {/* <span className="title"></span> */}
<Button className={"drawbtn md25" + (this.state.remainDrawTimes > 0 ? " btnBreath" : "")} onClick={this.drawPrize}> <Button className={"drawbtn md25" + (this.state.remainDrawTimes > 0 ? " btnBreath" : "")} onClick={this.drawPrize}>
<span className="drawbg"></span> <span className="drawbg"></span>
......
...@@ -60,4 +60,12 @@ ...@@ -60,4 +60,12 @@
position: absolute; position: absolute;
.sparkBg("posterPop/tips.png"); .sparkBg("posterPop/tips.png");
} }
.close {
width: 70px;
height: 70px;
left: 640px;
top: 201px;
position: absolute;
.sparkBg("posterPop/close.png");
}
} }
...@@ -7,6 +7,7 @@ import QRCode from 'qrcode'; ...@@ -7,6 +7,7 @@ import QRCode from 'qrcode';
import html2canvas from 'html2canvas'; import html2canvas from 'html2canvas';
import API from '@/api'; import API from '@/api';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl'; import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import { Button } from '@grace/ui';
type PosterpopState = { type PosterpopState = {
codeImg: string; codeImg: string;
shareImg: string; shareImg: string;
...@@ -39,7 +40,7 @@ class Posterpop extends React.Component<{}, PosterpopState> { ...@@ -39,7 +40,7 @@ class Posterpop extends React.Component<{}, PosterpopState> {
render() { render() {
return ( return (
<div className="posterpop modal_center md33"> <div className="posterpop modal_center md33">
<div className='back' onClick={this.closePop}></div> <div className='back'></div>
<div className="noRem-poster" id='poster'> <div className="noRem-poster" id='poster'>
<span className="posteriimg"></span> <span className="posteriimg"></span>
{ {
...@@ -60,6 +61,7 @@ class Posterpop extends React.Component<{}, PosterpopState> { ...@@ -60,6 +61,7 @@ class Posterpop extends React.Component<{}, PosterpopState> {
this.state.shareImg && <img className='show' src={this.state.shareImg}></img> this.state.shareImg && <img className='show' src={this.state.shareImg}></img>
} }
<span className="tips"></span> <span className="tips"></span>
<Button className='close' onClick={this.closePop}></Button>
</div> </div>
); );
} }
......
...@@ -46,21 +46,25 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> { ...@@ -46,21 +46,25 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
// getParentCode // getParentCode
async componentDidMount() { async componentDidMount() {
//获取省 //获取省
await this.getCodeList(null, "provinceList"); await this.getCodeList(null, "provinceList", async () => { //获取市
//获取市 const { provinceList, provinceCode } = this.state;
const { provinceList, provinceCode } = this.state; await this.getCodeList(provinceList[0]?.adCode, "cityList", async () => {//获取区
await this.getCodeList(provinceList[provinceCode]?.adCode, "cityList"); const { cityList, cityCode } = this.state;
//获取区 await this.getCodeList(cityList[0]?.adCode, "areaList", async () => {
const { cityList, cityCode } = this.state; //获取街道
await this.getCodeList(cityList[cityCode]?.adCode, "areaList"); const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[0]?.adCode, "streetList", async () => { });
//获取街道 });
const { areaList, areaCode } = this.state; });
await this.getCodeList(areaList[areaCode]?.adCode, "streetList"); });
} }
/**获取省市区接口 */ /**获取省市区接口 */
async getCodeList(parentCode, type) { async getCodeList(parentCode, type, callback) {
const params: GetParentCodeParams = {}; const params: GetParentCodeParams = {};
if (parentCode) { if (parentCode) {
params.parentCode = parentCode; params.parentCode = parentCode;
...@@ -69,7 +73,9 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> { ...@@ -69,7 +73,9 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
if (success) { if (success) {
this.setState({ this.setState({
[type]: data, [type]: data,
} as Pick<SelectModalState, typeof type>); } as Pick<SelectModalState, typeof type>, () => {
callback && callback()
});
} }
} }
...@@ -85,19 +91,20 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> { ...@@ -85,19 +91,20 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
this.setState( this.setState(
{ {
provinceCode: swiper.activeIndex, provinceCode: swiper.activeIndex,
cityCode: 0
}, },
async () => { async () => {
//获取市 //获取市
const { provinceList } = this.state; const { provinceList } = this.state;
await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList"); await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList", async () => {
//获取区 //获取区
const { cityList, cityCode } = this.state; const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[cityCode]?.adCode, "areaList"); await this.getCodeList(cityList[0]?.adCode, "areaList", async () => { });
});
} }
); );
this.swiperRef?.slideTo(0); this.swiperRef?.slideTo(0, 0, false);
this.swiperRef2?.slideTo(0); this.swiperRef2?.slideTo(0, 0, false);
}); });
} }
}; };
...@@ -110,14 +117,15 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> { ...@@ -110,14 +117,15 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
this.setState( this.setState(
{ {
cityCode: swiper.activeIndex, cityCode: swiper.activeIndex,
areaCode: 0
}, },
async () => { async () => {
//获取区 //获取区
const { cityList } = this.state; const { cityList } = this.state;
await this.getCodeList(cityList[swiper.activeIndex]?.adCode, "areaList"); await this.getCodeList(cityList[swiper.activeIndex]?.adCode, "areaList", async () => { });
} }
); );
this.swiperRef2?.slideTo(0); this.swiperRef2?.slideTo(0, 0, false);
}; };
/** /**
* 区选择 * 区选择
......
...@@ -30,13 +30,29 @@ import { isWechatMiniProgram } from '@/AppTools'; ...@@ -30,13 +30,29 @@ import { isWechatMiniProgram } from '@/AppTools';
class HomePage extends React.Component<any, any> { class HomePage extends React.Component<any, any> {
root: HTMLDivElement; root: HTMLDivElement;
visibilityChangeHandler: () => void;
componentDidMount() { componentDidMount() {
store.updateIndex(); store.updateIndex();
store.queryTask() store.queryTask()
// 定义页面显隐事件处理函数
this.visibilityChangeHandler = () => {
if (document.hidden) {
// 页面隐藏时的逻辑
console.log('页面已隐藏');
} else {
// 页面显示时的逻辑,可根据需求更新数据
store.updateIndex();
store.queryTask();
}
};
document.addEventListener('visibilitychange', this.visibilityChangeHandler);
}
componentWillUnmount() {
document.removeEventListener('visibilitychange', this.visibilityChangeHandler);
} }
/** 开始游戏按钮*/ /** 开始游戏按钮*/
startGame = _asyncThrottle(async () => { startGame = _asyncThrottle(async () => {
if (!store.judgeActTime()) return; if (!store.judgeActTime()) return;
......
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