Commit 128d18a9 authored by jtwu's avatar jtwu

bug修改

parent 9a4fbe21
...@@ -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/1750672395741/assets/index-Da53GGDG.js"></script> <script type="module" crossorigin src="https://yun.duiba.com.cn/db_games/spark/v3/1750678140422/assets/index-ClfQEFna.js"></script>
<link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750672395741/assets/vendor-CmUKH_wJ.js"> <link rel="modulepreload" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750678140422/assets/vendor-CD2SF7f7.js">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750672395741/assets/vendor-DhjHFO43.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750678140422/assets/vendor-DhjHFO43.css">
<link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750672395741/assets/index-BwMD9UAe.css"> <link rel="stylesheet" crossorigin href="https://yun.duiba.com.cn/db_games/spark/v3/1750678140422/assets/index-gto4oYDi.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/1750672395741/assets/polyfills-legacy-C2MhNPfJ.js"></script> <script nomodule crossorigin id="vite-legacy-polyfill" src="https://yun.duiba.com.cn/db_games/spark/v3/1750678140422/assets/polyfills-legacy-C2MhNPfJ.js"></script>
<script nomodule crossorigin id="vite-legacy-entry" data-src="https://yun.duiba.com.cn/db_games/spark/v3/1750672395741/assets/index-legacy-DSRgvd5T.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/1750678140422/assets/index-legacy-BhduzI5B.js">System.import(document.getElementById('vite-legacy-entry').getAttribute('data-src'))</script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -55,7 +55,7 @@ class CodePop extends React.Component { ...@@ -55,7 +55,7 @@ class CodePop extends React.Component {
<div className="bg"> <div className="bg">
<img className="code" src={codeImg}/> <img className="code" src={codeImg}/>
</div> </div>
<Button className="close" onClick={this.clickClose}/> <Button className="close md17" onClick={this.clickClose}/>
</div>; </div>;
} }
} }
......
...@@ -13,6 +13,8 @@ import { handleLogClick, handleLogExposure } from "../../MD.js"; ...@@ -13,6 +13,8 @@ import { handleLogClick, handleLogExposure } from "../../MD.js";
import { LOG_KEY, MatterViewDuration, MatterViewOpt, sensorLog } from "../../utils/sensors.js"; import { LOG_KEY, MatterViewDuration, MatterViewOpt, sensorLog } from "../../utils/sensors.js";
import { _throttle } from "@/utils/utils.js"; import { _throttle } from "@/utils/utils.js";
import { Button, Toast } from "@grace/ui"; import { Button, Toast } from "@grace/ui";
import { ModalCtrl } from "@/core/ctrls/ModalCtrl";
import MapInfoPopup from '@/panels/MapInfoPopup/index.jsx'
//研学地图页面+地图详情 //研学地图页面+地图详情
const cities = [ const cities = [
...@@ -28,7 +30,6 @@ class Mappage extends React.Component { ...@@ -28,7 +30,6 @@ class Mappage extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
curIndex: '',
spInfoList: [] spInfoList: []
}; };
} }
...@@ -92,31 +93,22 @@ class Mappage extends React.Component { ...@@ -92,31 +93,22 @@ class Mappage extends React.Component {
} }
onSee = (spId) => { onSee = (spId) => {
const { curIndex, spInfoList } = this.state; const { spInfoList } = this.state;
const targetCity = spInfoList.find(city => city.spId === spId); const targetCity = spInfoList.find(city => city.spId === spId);
if (!targetCity.unlockFlag) { if (!targetCity.unlockFlag) {
Toast.show("当前城市未解锁,快去参与游戏解锁吧~"); Toast.show("当前城市未解锁,快去参与游戏解锁吧~");
return; return;
} }
this.setState({
curIndex: spId
})
console.log('查看:', spId) console.log('查看:', spId)
} ModalCtrl.showModal(MapInfoPopup, {spId: spId});
onInfoClose = () => {
this.setState({
curIndex: ''
})
console.log('关闭')
} }
render() { render() {
const { curIndex, spInfoList } = this.state; const { spInfoList } = this.state;
return ( return (
<div className="Mappage"> <div className="Mappage">
<div className="map_bg"> <div className="map_bg">
<div className="back_btn" onClick={this.onBack}></div> <div className="back_btn md28" onClick={this.onBack}></div>
<div className="map_title"></div> <div className="map_title"></div>
<div className="city_box"> <div className="city_box">
{spInfoList.map((city, index) => ( {spInfoList.map((city, index) => (
...@@ -125,17 +117,12 @@ class Mappage extends React.Component { ...@@ -125,17 +117,12 @@ class Mappage extends React.Component {
</div> </div>
<div className="city_overlay"> <div className="city_overlay">
<div className="city_name">{city.name}</div> <div className="city_name">{city.name}</div>
<div className={city.unlockFlag ? 'see_btn' : 'lock_see_btn'} onClick={() => this.onSee(city.spId)}></div> <div className={city.unlockFlag ? 'see_btn md29' : 'lock_see_btn md29'} onClick={() => this.onSee(city.spId)}></div>
</div> </div>
</div> </div>
))} ))}
</div> </div>
</div> </div>
<div className="info_box" style={{ 'display': curIndex != '' ? 'block' : 'none' }}>
<div className="info_mask"></div>
<div className={"info_img info_img_" + curIndex}></div>
<div className="close_btn" onClick={this.onInfoClose}></div>
</div>
</div > </div >
); );
} }
......
...@@ -3,11 +3,12 @@ ...@@ -3,11 +3,12 @@
.Mappage { .Mappage {
position: absolute; position: absolute;
width: 100vw; width: 100vw;
height: 100vh; height: 1624px;
overflow-y: scroll; overflow-y: scroll;
.map_bg { .map_bg {
position: absolute; position: absolute;
overflow-y: scroll;
width: 750px; width: 750px;
height: 1624px; height: 1624px;
top: 0px; top: 0px;
...@@ -163,7 +164,7 @@ ...@@ -163,7 +164,7 @@
height: 66px; height: 66px;
left: 342px; left: 342px;
top: 1342px; top: 1342px;
.sparkBg("awardPopup/close.png"); .sparkBg("mapPage/close.png");
} }
} }
......
...@@ -31,6 +31,12 @@ class AwardPopup extends React.Component { ...@@ -31,6 +31,12 @@ class AwardPopup extends React.Component {
PageCtrl.changePage(HomePage); PageCtrl.changePage(HomePage);
} }
setOptionName = (str, maxLength = 10) => {
return str.length > maxLength
? str.substring(0, maxLength) + '...'
: str;
}
render() { render() {
const { prize } = this.state; const { prize } = this.state;
return ( return (
...@@ -39,8 +45,8 @@ class AwardPopup extends React.Component { ...@@ -39,8 +45,8 @@ class AwardPopup extends React.Component {
<div className='ap_bg'> <div className='ap_bg'>
<div className='ap_txt'>成功获得奖品</div> <div className='ap_txt'>成功获得奖品</div>
<div className='ap_icon' style={{ backgroundImage: `url(${prize.optionImg})` }}></div> <div className='ap_icon' style={{ backgroundImage: `url(${prize.optionImg})` }}></div>
<div className='ap_award_name'>{prize.optionName}</div> <div className='ap_award_name'>{this.setOptionName(prize.optionName, 15)}</div>
<div className='ap_btn' onClick={() => this.onReceive()}></div> <div className='ap_btn md18' onClick={() => this.onReceive()}></div>
</div> </div>
<div className='ap_close' onClick={() => this.onClose()}></div> <div className='ap_close' onClick={() => this.onClose()}></div>
</div > </div >
......
...@@ -53,7 +53,7 @@ class FailPopup extends React.Component { ...@@ -53,7 +53,7 @@ class FailPopup extends React.Component {
<div className='fp_mb_1'>还差{gameData?.targetTravel}</div> <div className='fp_mb_1'>还差{gameData?.targetTravel}</div>
<div className='fp_mb_2'>还差{gameData?.targetStudy}</div> <div className='fp_mb_2'>还差{gameData?.targetStudy}</div>
</div> </div>
<div className='fp_btn' onClick={() => this.onReceive()}> <div className='fp_btn md20' onClick={() => this.onReceive()}>
<div className='fp_btn_txt'>剩余次数:{data.leftGameTimes}</div> <div className='fp_btn_txt'>剩余次数:{data.leftGameTimes}</div>
</div> </div>
</div> </div>
......
...@@ -27,15 +27,15 @@ class GiftPackPopup extends React.Component { ...@@ -27,15 +27,15 @@ class GiftPackPopup extends React.Component {
// 开始抽奖 // 开始抽奖
lottteryHandle = _asyncThrottle(async () => { lottteryHandle = _asyncThrottle(async () => {
const { success, data } = await API.drawJoin(); const { success, data } = await API.drawJoin();
if (success && data) {//中奖 if (success && data && data.prize && data.prize.prizeType != 0) {//中奖
setTimeout(() => { setTimeout(() => {
ModalCtrl.closeModal(); ModalCtrl.closeModal();
ModalCtrl.showModal(AwardPopup, data); ModalCtrl.showModal(AwardPopup, data);
}, 3000); }, 2000);
} else {//未中奖 } else {//未中奖
setTimeout(() => { setTimeout(() => {
ModalCtrl.showModal(NotWinPopup); ModalCtrl.showModal(NotWinPopup);
}, 3000); }, 2000);
} }
}); });
//关闭 //关闭
......
'use strict';
import React from 'react';
import { observer } from 'mobx-react';
import './index.less';
import { _asyncThrottle, _throttle } from '../../utils/utils.ts';
import { ModalCtrl } from '@/core/ctrls/ModalCtrl';
import store from "@/store/store.js";
import { PageCtrl } from "@/core/ctrls/PageCtrl";
import HomePage from '@/pages/HomePage/HomePage.tsx';
const cities = [
{ spId: 'sp_landmark1', name: '北京', md: 'md30' },
{ spId: 'sp_landmark2', name: '西安', md: 'md31' },
{ spId: 'sp_landmark3', name: '上海', md: 'md32' },
{ spId: 'sp_landmark4', name: '杭州', md: 'md33' },
{ spId: 'sp_landmark5', name: '成都', md: 'md34' }
];
@observer
class MapInfoPopup extends React.Component {
constructor(props) {
super(props);
this.state = {
spId: props.spId,
md: cities.find(city=>city.spId === props.spId)?.md
}
}
//关闭
onClose = () => {
ModalCtrl.closeModal();
}
render() {
const { spId, md } = this.state;
return (
<div className="MapInfoPopup">
<div className="mip_mask"></div>
<div className={'mip_bg mip_bg_' + spId}>
</div>
<div className={'mip_close ' + md} onClick={() => this.onClose()}></div>
</div>
);
}
};
export default MapInfoPopup;
\ No newline at end of file
@import "../../res.less";
.MapInfoPopup {
width: 100vw;
height: 100vh;
overflow-y: scroll;
.mip_mask {
width: 100%;
height: 100%;
background: #000;
opacity: 0.5;
}
.mip_bg {
position: absolute;
width: 702px;
height: 993px;
top: 170px;
left: 25px;
}
.mip_bg_sp_landmark1 {
.sparkBg('mapPage/map_info_sp_landmark1.png')
}
.mip_bg_sp_landmark2 {
.sparkBg('mapPage/map_info_sp_landmark2.png')
}
.mip_bg_sp_landmark3 {
.sparkBg('mapPage/map_info_sp_landmark3.png')
}
.mip_bg_sp_landmark4 {
.sparkBg('mapPage/map_info_sp_landmark4.png')
}
.mip_bg_sp_landmark5 {
.sparkBg('mapPage/map_info_sp_landmark5.png')
}
.mip_close {
position: absolute;
width: 66px;
height: 66px;
left: 342px;
top: 1230px;
.sparkBg("mapPage/close.png");
}
}
\ No newline at end of file
...@@ -30,7 +30,7 @@ class NotWinPopup extends React.Component { ...@@ -30,7 +30,7 @@ class NotWinPopup extends React.Component {
<div className="NotWinPopup"> <div className="NotWinPopup">
<div className="nwp_mask"></div> <div className="nwp_mask"></div>
<div className='nwp_bg'> <div className='nwp_bg'>
<div className='nwp_btn' onClick={()=>this.onKnow()}></div> <div className='nwp_btn md19' onClick={()=>this.onKnow()}></div>
</div> </div>
<div className='nwp_close' onClick={()=>this.onClose()}></div> <div className='nwp_close' onClick={()=>this.onClose()}></div>
</div> </div>
......
...@@ -59,8 +59,8 @@ class VictoryPopup extends React.Component { ...@@ -59,8 +59,8 @@ class VictoryPopup extends React.Component {
<div className='vp_cjjh_tips'> <div className='vp_cjjh_tips'>
<div>抽奖机会+{rewardDrawTimes}</div> <div>抽奖机会+{rewardDrawTimes}</div>
</div> </div>
<div className='vp_btn' onClick={() => this.onDraw()}></div> <div className='vp_btn md15' onClick={() => this.onDraw()}></div>
<div className='vp_close' onClick={() => this.onClose()}></div> <div className='vp_close md16' onClick={() => this.onClose()}></div>
</div> </div>
</div> </div>
); );
......
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