Commit b94da842 authored by haiyoucuv's avatar haiyoucuv

Merge remote-tracking branch 'origin/master'

parents 4efdb1b9 c6148f8d
......@@ -35,17 +35,17 @@
// https://activity.m.duiba.com.cn/customShare/share?id=Did1NjA5Mjc
CFG.loginUrl = 'https://98570-activity.m.dexfu.cn/customShare/share?id=Did1NjA5ODM'
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/index-BRtIxcL_.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1747381612146/assets/vendor-B0ON_Ogt.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/1747381612146/assets/index-lbaSWz8H.css">
<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/1747634680122/assets/vendor-DaUNT6jQ.js">
<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/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">!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>
<body>
<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 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-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-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/1747634680122/assets/index-legacy-I9_YX3vD.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
......
import {AESEncrypt} from "./Crypto";
export default [
{
url: '/draw/draw.do',
method: 'get',
response: ({query}) => {
return {
"data": "<p>以下是游戏规则:手速要快,点击红包雨。。333。。。。。。。。。。。。。。。。。。。。11111111111111sadasdadadsad5555555557777777777799999999999911111111111111111111111222222222222222222222222222222222222222222222222222222222222222333333333333333333333333333333333333333333333333333333333333311111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222222222233333333333333333333333333333333333333333333333333333333333331111111111111111111111111111111111111111111111111111111111111112222222222222222222222222222222222222222222222222222222222222223333333333333333333333333333333333333333333333333333333333333</p>",
"success": true
}
},
},
{
url: '/projectRule.query',
method: 'get',
......
......@@ -13,6 +13,13 @@
position: absolute;
.sparkBg("drawPop/bg.png");
}
.bgsvga {
width: 679px;
height: 671px;
left: 35px;
top: 369px;
position: absolute;
}
.boxs {
width: 584px;
height: 361px;
......@@ -22,10 +29,10 @@
.sparkBg("drawPop/boxs.png");
}
.svga {
width: 412px;
height: 362px;
left: 177px;
top: 555px;
width: 679px;
height: 671px;
left: 35px;
top: 369px;
position: absolute;
}
.title {
......
......@@ -9,7 +9,8 @@ import API from '@/api';
import { _asyncThrottle } from '@/utils/utils';
import Drawnoprizepop from '../drawnoprizepop/drawnoprizepop';
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 store from '@/store/store';
// 定义 Drawpop 组件的 state 类型
......@@ -51,20 +52,21 @@ class Drawpop extends React.Component<{}, DrawpopState> {
this.setState({
showSvga: true
})
ModalCtrl.closeModal();
if (this.drawInfo.prizeId == "thanks") {
ModalCtrl.showModal(Drawnoprizepop)
} else {
ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo })
}
// ModalCtrl.closeModal();
// if (this.drawInfo.prizeId == "thanks") {
// ModalCtrl.showModal(Drawnoprizepop)
// } else {
// ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo })
// }
}
})
render() {
return (
<div className="drawpop modal_center">
<span className="bg"></span>
<span className="boxs"></span>
{/* {
{/* <span className="bg"></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={() => {
ModalCtrl.closeModal();
......@@ -74,7 +76,7 @@ class Drawpop extends React.Component<{}, DrawpopState> {
ModalCtrl.showModal(Drawprizepop, { ...this.drawInfo })
}
}}></SvgaPlayer>
} */}
}
{/* <span className="title"></span> */}
<Button className={"drawbtn md25" + (this.state.remainDrawTimes > 0 ? " btnBreath" : "")} onClick={this.drawPrize}>
<span className="drawbg"></span>
......
......@@ -60,4 +60,12 @@
position: absolute;
.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';
import html2canvas from 'html2canvas';
import API from '@/api';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import { Button } from '@grace/ui';
type PosterpopState = {
codeImg: string;
shareImg: string;
......@@ -39,7 +40,7 @@ class Posterpop extends React.Component<{}, PosterpopState> {
render() {
return (
<div className="posterpop modal_center md33">
<div className='back' onClick={this.closePop}></div>
<div className='back'></div>
<div className="noRem-poster" id='poster'>
<span className="posteriimg"></span>
{
......@@ -60,6 +61,7 @@ class Posterpop extends React.Component<{}, PosterpopState> {
this.state.shareImg && <img className='show' src={this.state.shareImg}></img>
}
<span className="tips"></span>
<Button className='close' onClick={this.closePop}></Button>
</div>
);
}
......
......@@ -46,21 +46,25 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
// getParentCode
async componentDidMount() {
//获取省
await this.getCodeList(null, "provinceList");
//获取市
const { provinceList, provinceCode } = this.state;
await this.getCodeList(provinceList[provinceCode]?.adCode, "cityList");
//获取区
const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[cityCode]?.adCode, "areaList");
//获取街道
const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[areaCode]?.adCode, "streetList");
await this.getCodeList(null, "provinceList", async () => { //获取市
const { provinceList, provinceCode } = this.state;
await this.getCodeList(provinceList[0]?.adCode, "cityList", async () => {//获取区
const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[0]?.adCode, "areaList", async () => {
//获取街道
const { areaList, areaCode } = this.state;
await this.getCodeList(areaList[0]?.adCode, "streetList", async () => { });
});
});
});
}
/**获取省市区接口 */
async getCodeList(parentCode, type) {
async getCodeList(parentCode, type, callback) {
const params: GetParentCodeParams = {};
if (parentCode) {
params.parentCode = parentCode;
......@@ -69,7 +73,9 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
if (success) {
this.setState({
[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> {
this.setState(
{
provinceCode: swiper.activeIndex,
cityCode: 0
},
async () => {
//获取市
const { provinceList } = this.state;
await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList");
//获取区
const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[cityCode]?.adCode, "areaList");
await this.getCodeList(provinceList[swiper.activeIndex]?.adCode, "cityList", async () => {
//获取区
const { cityList, cityCode } = this.state;
await this.getCodeList(cityList[0]?.adCode, "areaList", async () => { });
});
}
);
this.swiperRef?.slideTo(0);
this.swiperRef2?.slideTo(0);
this.swiperRef?.slideTo(0, 0, false);
this.swiperRef2?.slideTo(0, 0, false);
});
}
};
......@@ -110,14 +117,15 @@ class Selectmodal extends React.Component<SelectModalProps, SelectModalState> {
this.setState(
{
cityCode: swiper.activeIndex,
areaCode: 0
},
async () => {
//获取区
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';
class HomePage extends React.Component<any, any> {
root: HTMLDivElement;
visibilityChangeHandler: () => void;
componentDidMount() {
store.updateIndex();
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 () => {
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