Commit 94896913 authored by haiyoucuv's avatar haiyoucuv

init

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