Commit 94896913 authored by haiyoucuv's avatar haiyoucuv

init

parent 6ea3effa
...@@ -14,6 +14,7 @@ export default [ ...@@ -14,6 +14,7 @@ export default [
marketValue: Math.random() * 10000000 >> 0, marketValue: Math.random() * 10000000 >> 0,
yesterdayProfit: Math.random() * 10000 >> 0, yesterdayProfit: Math.random() * 10000 >> 0,
availableFunds: Math.random() * 10000000 >> 0, availableFunds: Math.random() * 10000000 >> 0,
minBuyLimit: 100,
} }
} }
}, },
......
...@@ -263,6 +263,14 @@ ...@@ -263,6 +263,14 @@
font-weight: bold; font-weight: bold;
} }
.reallyBuy {
margin-top: 29px;
background-color: white;
color: #bc251c;
border: 1px solid #bc251c;
}
.simulateSell { .simulateSell {
margin-top: 30px; margin-top: 30px;
background-color: rgb(188, 37, 28); background-color: rgb(188, 37, 28);
......
...@@ -77,7 +77,9 @@ class DetailPage extends React.Component<any, any> { ...@@ -77,7 +77,9 @@ class DetailPage extends React.Component<any, any> {
clickSimulateBuy = _asyncThrottle(async () => { clickSimulateBuy = _asyncThrottle(async () => {
const { buyInput } = this.state; const { buyInput } = this.state;
if (!buyInput || buyInput.toString().trim() === "") { console.log(buyInput);
if (!+buyInput || buyInput.toString().trim() === "") {
Toast.show("请输入买入金额"); Toast.show("请输入买入金额");
return; return;
} }
...@@ -122,7 +124,9 @@ class DetailPage extends React.Component<any, any> { ...@@ -122,7 +124,9 @@ class DetailPage extends React.Component<any, any> {
clickSimulateSell = _asyncThrottle(async () => { clickSimulateSell = _asyncThrottle(async () => {
const { sellInput } = this.state; const { sellInput } = this.state;
if (!sellInput || sellInput.toString().trim() === "") { console.log(sellInput);
if (!+sellInput || sellInput.toString().trim() === "") {
Toast.show("请输入赎回份额"); Toast.show("请输入赎回份额");
return; return;
} }
...@@ -186,7 +190,7 @@ class DetailPage extends React.Component<any, any> { ...@@ -186,7 +190,7 @@ class DetailPage extends React.Component<any, any> {
<motion.div <motion.div
className={styles.options} className={styles.options}
initial={{ height: 570 * remScale }} initial={{ height: 570 * remScale }}
animate={{ height: (isBuy ? 570 : 400) * remScale }} // animate={{ height: (isBuy ? 570 : 400) * remScale }}
> >
<div className={styles.tab}> <div className={styles.tab}>
<div <div
...@@ -206,6 +210,7 @@ class DetailPage extends React.Component<any, any> { ...@@ -206,6 +210,7 @@ class DetailPage extends React.Component<any, any> {
</div> </div>
<motion.div <motion.div
className={styles.buy} className={styles.buy}
transition={{ type: "tween" }}
initial={{ x: 0 }} initial={{ x: 0 }}
animate={{ x: isBuy ? 0 : 750 * remScale }} animate={{ x: isBuy ? 0 : 750 * remScale }}
> >
...@@ -234,6 +239,7 @@ class DetailPage extends React.Component<any, any> { ...@@ -234,6 +239,7 @@ class DetailPage extends React.Component<any, any> {
</motion.div> </motion.div>
<motion.div <motion.div
className={styles.sell} className={styles.sell}
transition={{ type: "tween" }}
initial={{ x: 750 * remScale }} initial={{ x: 750 * remScale }}
animate={{ x: isBuy ? 750 * remScale : 0 }} animate={{ x: isBuy ? 750 * remScale : 0 }}
> >
...@@ -259,6 +265,10 @@ class DetailPage extends React.Component<any, any> { ...@@ -259,6 +265,10 @@ class DetailPage extends React.Component<any, any> {
className={classNames(styles.sellBtn, styles.simulateSell, "md13")} className={classNames(styles.sellBtn, styles.simulateSell, "md13")}
onClick={this.clickSimulateSell} onClick={this.clickSimulateSell}
>模拟赎回</Button> >模拟赎回</Button>
<Button
className={classNames(styles.sellBtn, styles.reallyBuy, "md10")}
onClick={this.clickReallyBuy}
>真实买入</Button>
</motion.div> </motion.div>
</motion.div> </motion.div>
<Button <Button
......
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