Commit 58455dfa authored by wangzhujun's avatar wangzhujun

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

parent 561724c5
...@@ -56,10 +56,10 @@ ...@@ -56,10 +56,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/1749021104605/assets/index-CLl7s1US.js"></script> <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/1749021104605/assets/vendor-CQqJ1av2.js"> <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/1749021104605/assets/vendor-BQh5NVNk.css"> <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/1749021104605/assets/index-DpiysrmT.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">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>
...@@ -67,8 +67,8 @@ ...@@ -67,8 +67,8 @@
<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/1749021104605/assets/polyfills-legacy-arANKBzQ.js"></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/1749021104605/assets/index-legacy-9uWEo0Wf.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/1749463049989/assets/index-legacy-B8eTI6r_.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -25,6 +25,7 @@ export default [ ...@@ -25,6 +25,7 @@ export default [
"test_config_02": "111", "test_config_02": "111",
// 规则长图 // 规则长图
"ruleImg": '//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png', "ruleImg": '//yun.duiba.com.cn/polaris/bg.18539c61e0103e01a339dd268558b2559ab178ba.png',
shareInfo: [ shareInfo: [
{ {
"title": 'normal', "title": 'normal',
...@@ -97,8 +98,8 @@ export default [ ...@@ -97,8 +98,8 @@ export default [
"prizeId": "g0e432eeb", "prizeId": "g0e432eeb",
"type": 4, "type": 4,
"moneyStatus": 10, "moneyStatus": 10,
"moneyCanReissueStartTimestamp": Date.now() -1565213353000, "moneyCanReissueStartTimestamp": Date.now() - 1565213353000,
"moneyCanReissueEndTimestamp": Date.now() + 1565213353000, "moneyCanReissueEndTimestamp": Date.now() + 1565213353000,
}, },
{ {
"extra": { "extra": {
......
{"proName":"未命名项目","proDesc":"","proPath":"D:\\Duiba\\口味王\\天天领积分\\kww_dayDayGetCredits_250512","createTime":1729847802806} {"proName":"未命名项目","proDesc":"","proPath":"F:\\2025\\20250609天天领积分","createTime":1729847802806}
...@@ -36,6 +36,23 @@ ...@@ -36,6 +36,23 @@
background-position: top center; background-position: top center;
background-color: #fff2e4; 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{ .homeSvga{
position: absolute; position: absolute;
left: 53px; left: 53px;
......
...@@ -20,6 +20,9 @@ class HomePage extends React.Component<any, any> { ...@@ -20,6 +20,9 @@ class HomePage extends React.Component<any, any> {
store.updateIndex(); store.updateIndex();
store.getTaskInfo() store.getTaskInfo()
store.getBaseIndex() store.getBaseIndex()
if (store.frontVariable?.homeTip?.length > 0) {
store.changeHomeTip()
}
// store.queryTask() // store.queryTask()
// if (getUrlParam('inviteCode')) { // if (getUrlParam('inviteCode')) {
// store.doAssist() // store.doAssist()
...@@ -46,25 +49,33 @@ class HomePage extends React.Component<any, any> { ...@@ -46,25 +49,33 @@ class HomePage extends React.Component<any, any> {
Toast.show("活动已结束"); Toast.show("活动已结束");
} }
componentWillUnmount(): void {
clearTimeout(store.homeTipsCon)
}
render() { render() {
const { creditsNum, guideFlag, actStartTime, currentTime, actEndTime } = store.indexData const { creditsNum, guideFlag, actStartTime, currentTime, actEndTime } = store.indexData
return <> return <>
<div className="homepage" ref={(el) => this.root = el}> <div className="homepage" ref={(el) => this.root = el}>
<div className="homeRoot"> <div className="homeRoot">
<Top /> <Top />
{
store.frontVariable.homeTip?.length > 0 && <span className='tipPop'>
<span className='tipsLab'>{store.frontVariable.homeTip[store.homeTipIndex]}</span>
</span>
}
<Sign /> <Sign />
<Check /> <Check />
<Button className="credits" <Button className="credits"
onClick={this.clickCredits}>{creditsNum > 999999 ? "999999+" : creditsNum}</Button> onClick={this.clickCredits}>{creditsNum > 999999 ? "999999+" : creditsNum}</Button>
{/*<Button className="cash"><span>¥</span>32.88</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="rule" onClick={this.clickRule} />
<Button className="prize" onClick={this.clickPrize} /> <Button className="prize" onClick={this.clickPrize} />
{currentTime < actStartTime && <div className="ActPreMask" onClick={this.clickActPre}/>} {currentTime < actStartTime && <div className="ActPreMask" onClick={this.clickActPre} />}
</div> </div>
</div> </div>
......
...@@ -15,6 +15,7 @@ export class Game extends Base { ...@@ -15,6 +15,7 @@ export class Game extends Base {
fullAni: AnimatedSprite; fullAni: AnimatedSprite;
dropAni: GifSprite; dropAni: GifSprite;
bubbleMgr: BubbleMgr; bubbleMgr: BubbleMgr;
eyesAni: AnimatedSprite;
onLoad() { onLoad() {
const bg = this.addChild(new Sprite(Assets.get("招财猫_底.png"))); const bg = this.addChild(new Sprite(Assets.get("招财猫_底.png")));
...@@ -41,10 +42,21 @@ export class Game extends Base { ...@@ -41,10 +42,21 @@ export class Game extends Base {
top.position.set(168, 332); top.position.set(168, 332);
// top.alpha = 0.7; // top.alpha = 0.7;
const smile = this.addChild(new Sprite(Assets.get("表情_微笑.png"))); // const smile = this.addChild(new Sprite(Assets.get("表情_微笑.png")));
smile.anchor.set(0.5); // smile.anchor.set(0.5);
smile.scale.set(0.66); // smile.scale.set(0.66);
smile.position.set(378, 564); // 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()); this.bubbleMgr = this.addChild(new BubbleMgr());
......
import { makeAutoObservable, } from 'mobx'; import { makeAutoObservable, toJS, } from 'mobx';
import API from '../api/index'; import API from '../api/index';
import { Toast } from "@grace/ui"; import { Toast } from "@grace/ui";
import { initWx, IWxShareInfo } from "@/built-in/share/weixin/weixin.ts"; import { initWx, IWxShareInfo } from "@/built-in/share/weixin/weixin.ts";
...@@ -33,6 +33,7 @@ class Store { ...@@ -33,6 +33,7 @@ class Store {
/** 前端开发配置 */ /** 前端开发配置 */
frontVariable: { frontVariable: {
homeTip: any;
shareInfo: any, shareInfo: any,
ruleImg?: string, ruleImg?: string,
} = { } = {
...@@ -41,6 +42,7 @@ class Store { ...@@ -41,6 +42,7 @@ class Store {
desc: "", desc: "",
imgUrl: "", imgUrl: "",
}, },
homeTip: ''
}; };
ruleInfo = ''; ruleInfo = '';
...@@ -55,12 +57,29 @@ class Store { ...@@ -55,12 +57,29 @@ class Store {
this.ruleInfo = data; 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() { async getFrontVariable() {
// 获取前端开发配置 // 获取前端开发配置
const { data } = await API.getFrontVariable(); const { data } = await API.getFrontVariable();
this.frontVariable = data || {}; this.frontVariable = data || {};
console.log('前端开发配置', data) console.log('前端开发配置', data)
if (data.homeTip?.length > 0) {
this.changeHomeTip()
}
} }
indexData: { 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