Commit b3a3612c authored by 俞嘉婷's avatar 俞嘉婷

feat: 领奖banner

parent 72fbaab1
......@@ -51,7 +51,7 @@ export default [
data: {
actStartTime: Date.now() - 1 * 24 * 60 * 60 * 1000,
actEndTime: Date.now() + 3 * 24 * 60 * 60 * 1000,
myEndTime: Date.now() + 1 * 24 * 60 * 60 * 1000,
myEndTime: Date.now() - 1 * 24 * 60 * 60 * 1000,
endPop: false,
uid: '234234',
ruleText: 'rulerulerulerulerulerulerule',
......
......@@ -30,7 +30,7 @@ class App extends Component {
const defaultPage = {
myPrize: MyPrize, // TODO 举例子 新宿台奖品页
index: HomePage,
}[skinId] || ResPage;
}[skinId] || HomePage;
PageCtrl.changePage(defaultPage);
}
......
......@@ -73,6 +73,22 @@
}
}
}
.prize_banner {
width: 707px;
height: 316px;
left: 22px;
// top: 1060px;
position: relative;
.sparkBg("homePage/prize_banner.png");
.prize_btn {
width: 270px;
height: 98px;
left: 218px;
top: 210px;
position: absolute;
.sparkBg("homePage/prize_btn.png");
}
}
.virtual_assets {
width: 712px;
height: 440px;
......
......@@ -12,6 +12,7 @@ import RecordPage from '../RecordPage/RecordPage';
import { diffJump } from '@/AppTools';
import API from '@/api';
import DetailPage from '../DetailPage/DetailPage';
import ResPage from '../ResPage/ResPage';
@observer
class HomePage extends React.Component<any, any> {
......@@ -61,6 +62,12 @@ class HomePage extends React.Component<any, any> {
ModalCtrl.showModal(Rulepop)
})
/** 跳转结果页 */
prizeHandle = _asyncThrottle(() => {
if (!store.judgeActTime(true, false)) return
PageCtrl.changePage(ResPage)
})
/** 已签到 */
signedHandle = _asyncThrottle(async () => {
if (!store.judgeActTime()) return
......@@ -107,14 +114,15 @@ class HomePage extends React.Component<any, any> {
}
render() {
const { curTab } = this.state;
const { bigStartConfig, virtualAssets, checkIn, recommendProductConfig } = store.indexData
const { bigStartConfig, virtualAssets, checkIn, recommendProductConfig, myEndTime, currentTime } = store.indexData
const isReachEndT = myEndTime <= currentTime
return (
<div className="com_Container" ref={(el) => this.root = el}>
<div className="homePage">
<span className="bg"></span>
<span className="title"></span>
{/* 理财大明星 */}
<div className="lc_bigstar">
{isReachEndT ? null : <div className="lc_bigstar">
<span className="lc_bigstar_bg"></span>
<div className="hongBao">
{bigStartConfig?.map((item, index) => (
......@@ -124,7 +132,11 @@ class HomePage extends React.Component<any, any> {
</div>
))}
</div>
</div>
</div>}
{/* 领奖banner */}
{isReachEndT &&<div className="prize_banner">
<span className="prize_btn" onClick={this.prizeHandle}></span>
</div>}
{/* 模拟资产 */}
<div className={`virtual_assets ${!virtualAssets?.realBuyJumpUrl ? 'short_height' : ''}`}>
<span className="yesterday_label">昨日收益(元)</span>
......@@ -154,7 +166,7 @@ class HomePage extends React.Component<any, any> {
{!!virtualAssets?.realBuyJumpUrl && <Button className="realbuy_btn" onClick={this.realBuyHandle}>真实买入</Button>}
</div>
{/* 签到区 */}
<div className="sign_section">
{isReachEndT ? null : <div className="sign_section">
<span className="sign_section_bg"></span>
<span className="sign_tips">累计签到,最高可得{((checkIn?.totalExperienceNum || 0) / 10000).toFixed(0)}万资金</span>
{checkIn?.todayCheckIn
......@@ -181,7 +193,8 @@ class HomePage extends React.Component<any, any> {
)
})}
</div>
</div>
</div>}
{/* 推荐产品 */}
<div className="recommend_products">
<span className="r_products_title"></span>
<div className="r_products_list">
......
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