Commit 58455dfa authored by wangzhujun's avatar wangzhujun

新增招财猫表情+气泡文案

parent 561724c5
......@@ -56,10 +56,10 @@
// alert("【警告】检测到活动url中没有appID参数\n缺少该参数会导致埋点、分享、app信息获取错误。")
}
</script>
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1749021104605/assets/index-CLl7s1US.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749021104605/assets/vendor-CQqJ1av2.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749021104605/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749021104605/assets/index-DpiysrmT.css">
<script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1749463049989/assets/index-BWVPJfed.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749463049989/assets/vendor-TG-5W37H.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749463049989/assets/vendor-BQh5NVNk.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1749463049989/assets/index-D5i8y4j5.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>
......@@ -67,8 +67,8 @@
<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/1749021104605/assets/polyfills-legacy-arANKBzQ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1749021104605/assets/index-legacy-9uWEo0Wf.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/1749463049989/assets/polyfills-legacy-arANKBzQ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1749463049989/assets/index-legacy-B8eTI6r_.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body>
</html>
\ No newline at end of file
......@@ -25,6 +25,7 @@ export default [
"test_config_02": "111",
// 规则长图
"ruleImg": '//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png',
shareInfo: [
{
"title": 'normal',
......@@ -97,8 +98,8 @@ export default [
"prizeId": "g0e432eeb",
"type": 4,
"moneyStatus": 10,
"moneyCanReissueStartTimestamp": Date.now() -1565213353000,
"moneyCanReissueEndTimestamp": Date.now() + 1565213353000,
"moneyCanReissueStartTimestamp": Date.now() - 1565213353000,
"moneyCanReissueEndTimestamp": Date.now() + 1565213353000,
},
{
"extra": {
......
{"proName":"未命名项目","proDesc":"","proPath":"D:\\Duiba\\口味王\\天天领积分\\kww_dayDayGetCredits_250512","createTime":1729847802806}
{"proName":"未命名项目","proDesc":"","proPath":"F:\\2025\\20250609天天领积分","createTime":1729847802806}
......@@ -36,6 +36,23 @@
background-position: top center;
background-color: #fff2e4;
.tipPop {
position: absolute;
left: 150px;
top: 224px;
width: 449px;
height: 71px;
pointer-events: none;
.webpBg("HomePage/tipsPop.png");
.tipsLab {
width: 100%;
text-align: center;
font-size: 28px;
position: absolute;
color: #ffffff;
top: 13px;
}
}
.homeSvga{
position: absolute;
left: 53px;
......
......@@ -20,6 +20,9 @@ class HomePage extends React.Component<any, any> {
store.updateIndex();
store.getTaskInfo()
store.getBaseIndex()
if (store.frontVariable?.homeTip?.length > 0) {
store.changeHomeTip()
}
// store.queryTask()
// if (getUrlParam('inviteCode')) {
// store.doAssist()
......@@ -46,25 +49,33 @@ class HomePage extends React.Component<any, any> {
Toast.show("活动已结束");
}
componentWillUnmount(): void {
clearTimeout(store.homeTipsCon)
}
render() {
const { creditsNum, guideFlag, actStartTime, currentTime, actEndTime } = store.indexData
return <>
<div className="homepage" ref={(el) => this.root = el}>
<div className="homeRoot">
<Top />
{
store.frontVariable.homeTip?.length > 0 && <span className='tipPop'>
<span className='tipsLab'>{store.frontVariable.homeTip[store.homeTipIndex]}</span>
</span>
}
<Sign />
<Check />
<Button className="credits"
onClick={this.clickCredits}>{creditsNum > 999999 ? "999999+" : creditsNum}</Button>
{/*<Button className="cash"><span>¥</span>32.88</Button>*/}
{currentTime >= actEndTime && <div className="ActEndMask" onClick={this.clickActEnd}/>}
{currentTime >= actEndTime && <div className="ActEndMask" onClick={this.clickActEnd} />}
<Button className="rule" onClick={this.clickRule} />
<Button className="prize" onClick={this.clickPrize} />
{currentTime < actStartTime && <div className="ActPreMask" onClick={this.clickActPre}/>}
{currentTime < actStartTime && <div className="ActPreMask" onClick={this.clickActPre} />}
</div>
</div>
......
......@@ -15,6 +15,7 @@ export class Game extends Base {
fullAni: AnimatedSprite;
dropAni: GifSprite;
bubbleMgr: BubbleMgr;
eyesAni: AnimatedSprite;
onLoad() {
const bg = this.addChild(new Sprite(Assets.get("招财猫_底.png")));
......@@ -41,10 +42,21 @@ export class Game extends Base {
top.position.set(168, 332);
// top.alpha = 0.7;
const smile = this.addChild(new Sprite(Assets.get("表情_微笑.png")));
smile.anchor.set(0.5);
smile.scale.set(0.66);
smile.position.set(378, 564);
// const smile = this.addChild(new Sprite(Assets.get("表情_微笑.png")));
// smile.anchor.set(0.5);
// smile.scale.set(0.66);
// smile.position.set(378, 564);
const EyesTextures = new Array(4).fill(0).map((_, i) => {
return Assets.get(`eyes/眨眼_${prefixInteger(i, 5)}.png`);
});
const eyesAni = this.eyesAni = this.addChild(new AnimatedSprite(EyesTextures));
eyesAni.anchor.set(0.5);
eyesAni.scale.set(0.66);
eyesAni.position.set(378, 554);
eyesAni.loop = true;
eyesAni.animationSpeed = 0.15
eyesAni.play();
this.bubbleMgr = this.addChild(new BubbleMgr());
......
import { makeAutoObservable, } from 'mobx';
import { makeAutoObservable, toJS, } from 'mobx';
import API from '../api/index';
import { Toast } from "@grace/ui";
import { initWx, IWxShareInfo } from "@/built-in/share/weixin/weixin.ts";
......@@ -33,6 +33,7 @@ class Store {
/** 前端开发配置 */
frontVariable: {
homeTip: any;
shareInfo: any,
ruleImg?: string,
} = {
......@@ -41,6 +42,7 @@ class Store {
desc: "",
imgUrl: "",
},
homeTip: ''
};
ruleInfo = '';
......@@ -55,12 +57,29 @@ class Store {
this.ruleInfo = data;
}
homeTipIndex = 0;
homeTipsCon = null
changeHomeTip = () => {
console.log("changeHomeTip",toJS(this.homeTipIndex))
clearTimeout(this.homeTipsCon)
this.homeTipsCon = setTimeout(() => {
if (this.homeTipIndex < this.frontVariable.homeTip.length - 1) {
this.homeTipIndex++;
} else {
this.homeTipIndex = 0;
}
this.changeHomeTip()
}, 5000)
}
/** 获取前端配置项 */
async getFrontVariable() {
// 获取前端开发配置
const { data } = await API.getFrontVariable();
this.frontVariable = data || {};
console.log('前端开发配置', data)
if (data.homeTip?.length > 0) {
this.changeHomeTip()
}
}
indexData: {
......
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