wly 7 лет назад
Родитель
Сommit
a8d8bcd45f

+ 30 - 1
src/case/BillApp/src/App.css

@@ -40,7 +40,7 @@
 
 .billWrap .row{
     width: 283px;
-    padding: 7px 20px;
+    padding: 19px;
     font-size: 10px;
     border-bottom: 1px solid #ddd;
 } 
@@ -58,3 +58,32 @@
     border-radius: 3px;
     padding: 11px 93px;
 }
+
+.billWrap .assetsWrap{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    
+}
+
+
+
+.assetsWrap .collect{
+    text-align: center;
+    margin-top: 150px;
+}
+
+.assetsWrap .buttonWrap{
+    margin-top: 30px;
+}
+
+.assetsWrap .tips{
+    margin-top: 5px;
+    color: #ddd;
+    font-size: 8px;
+    text-align: center;
+}
+
+
+
+

+ 8 - 2
src/case/BillApp/src/components/Assets/Assets.jsx

@@ -1,12 +1,14 @@
 import React, { Component } from 'react'
 
 import NavBars from '../common/NavBar'
+import Buttons from '../common/Button'
 
 export default class Assets extends Component {
   constructor(props){
     super(props)
     this.state={
-      navBarText:'资产统计'
+      navBarText:'资产统计',
+      collect:'0.00'
     }
   }
   componentWillMount(){
@@ -16,7 +18,11 @@ export default class Assets extends Component {
     return (
       <div>
        <NavBars navBarText={this.state.navBarText} changePage={this.props.changePage}/>
-       资产
+       <div className="assetsWrap">
+        <div className="collect">¥<span>{this.state.collect}</span>元</div>
+        <div className="buttonWrap"><Buttons changePage={this.props.changePage} toPage='assets' buttonText='去统计资产'/></div>
+        <div className="tips">tip:总资产使用统计自己每个月内的消费的情况</div>
+       </div>
       </div>
     )
   }

+ 0 - 3
src/case/BillApp/src/components/Bill/Bill.jsx

@@ -93,9 +93,6 @@ export default class Bill extends Component {
     }else{
         failToast('所有选项不能为空',1)
     }
-  
-    
-    
   }
 
 

+ 2 - 2
src/case/BillApp/src/components/HomePage/HomePage.jsx

@@ -3,7 +3,7 @@ import React, { Component } from 'react';
 
 import NavBars from '../common/NavBar'
 import Lists from './List'
-import Buttons from './Button'
+import Buttons from '../common/Button'
 import IconList from './IconList'
 
 
@@ -71,7 +71,7 @@ class HomePage  extends Component{
                 <div className="dateWrap"><span className="month"> {this.state.month} </span> / {this.state.year}</div>
                     <Lists bills={this.state.bills} year={this.state.year} month={this.state.month}/>
                     <div className="buttonWrap">
-                    <Buttons changePage={this.props.changePage}/>
+                    <Buttons changePage={this.props.changePage} toPage='bill' buttonText='+ 记一笔'/>
                 </div>
                 <IconList bills={this.state.bills} week={{weekTop,weekBottom}}/>
             </div>

+ 1 - 1
src/case/BillApp/src/components/HomePage/Button.jsx → src/case/BillApp/src/components/common/Button.jsx

@@ -17,7 +17,7 @@ export default class Buttons extends Component{
     render(){
         return (
             <WingBlank>
-                <Button type="primary" style={this.state.buttonStyle} onClick={()=>this.props.changePage('bill')}>+记一笔</Button><WhiteSpace />
+                <Button type="primary" style={this.state.buttonStyle} onClick={()=>this.props.changePage(this.props.toPage)}>{this.props.buttonText}</Button><WhiteSpace />
             </WingBlank>
         )
     }