Commit c836a912 authored by haiyoucuv's avatar haiyoucuv

init

parent d521ba70
...@@ -12,6 +12,7 @@ import shareStore from '@src/store/share'; ...@@ -12,6 +12,7 @@ import shareStore from '@src/store/share';
import {sensorMdClick, sensorMdExpouse} from '@src/utils/sensorMd'; import {sensorMdClick, sensorMdExpouse} from '@src/utils/sensorMd';
import {hideLoading, showLoading} from '@spark/ui'; import {hideLoading, showLoading} from '@spark/ui';
import {htmlShot} from '@spark/utils'; import {htmlShot} from '@spark/utils';
import {RES_PATH} from "../../../sparkrc";
@observer @observer
class Resultpage extends React.Component { class Resultpage extends React.Component {
...@@ -61,15 +62,41 @@ class Resultpage extends React.Component { ...@@ -61,15 +62,41 @@ class Resultpage extends React.Component {
render() { render() {
const {poster} = this.state; const {poster} = this.state;
const {score} = this.props; const {score, funds} = this.props;
const info = {
1: {
bg: RES_PATH + "resultPage/负债.jpg",
color: "#0075f5",
},
2: {
bg: RES_PATH + "resultPage/小康.jpg",
color: "#ed4300",
},
3: {
bg: RES_PATH + "resultPage/中产.jpg",
color: "#7c28ec",
},
4: {
bg: RES_PATH + "resultPage/富有.jpg",
color: "#f58400",
},
}[score]
return <div className="Resultpage" ref={r => this.pageRef = r}> return <div className="Resultpage" ref={r => this.pageRef = r}>
<div className="bg"/> <div className="bg" style={{backgroundImage: `url(${info.bg})`}}/>
<div className="poster" ref={r => this.shotRef = r}> <div className="poster" ref={r => this.shotRef = r}>
<span className="posterBg"></span> <span className="posterBg"></span>
</div> </div>
{poster && <img className="poster_img" src={poster} style={{opacity: 0}} alt=""/>} {poster && <img className="poster_img" src={poster} style={{opacity: 0}} alt=""/>}
<div
className="funds"
style={{color: info.color}}
>
{funds * 10000}<span></span>
</div>
<Button className="product_btn" onClick={this.openProduct}></Button> <Button className="product_btn" onClick={this.openProduct}></Button>
<span className="tips">长按保存海报分享</span> <span className="tips">长按保存海报分享</span>
......
...@@ -52,9 +52,24 @@ ...@@ -52,9 +52,24 @@
.poster_img { .poster_img {
width: 750px; width: 750px;
height: 1624px; height: 1624px;
left: 0px; left: 0;
top: 0px; top: 0;
position: absolute;
}
.funds {
position: absolute; position: absolute;
left: 310px;
top: 347px;
font-size: 56px;
font-weight: bold;
color: #f58400;
span {
margin-left: 5px;
color: black;
font-size: 30px;
}
} }
......
...@@ -121,6 +121,7 @@ const store = makeAutoObservable({ ...@@ -121,6 +121,7 @@ const store = makeAutoObservable({
if (success) { if (success) {
this.changePage(PAGE_MAP.RESU_PAGE, { this.changePage(PAGE_MAP.RESU_PAGE, {
...data, ...data,
funds: param.resultAmount,
score: param.score, score: param.score,
}); });
} }
......
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