瀏覽代碼

Merge remote-tracking branch 'origin/master'

Csy817 7 年之前
父節點
當前提交
d94cd609cc

+ 8 - 0
src/case/BillApp/src/App.css

@@ -84,6 +84,14 @@
     text-align: center;
 }
 
+.myWrap .extra{
+    padding-top: 30px;
+}
+
+.myWrap .am-list{
+    margin: 3px 0;
+}
+
 
 
 

+ 35 - 1
src/case/BillApp/src/components/My/My.jsx

@@ -2,6 +2,8 @@ import React, { Component } from 'react'
 
 
 import NavBars from '../common/NavBar'
+import Head from '../common/Head'
+import Lists from '../common/List'
 
 export default class My extends Component {
   constructor(props){
@@ -9,15 +11,47 @@ export default class My extends Component {
     this.state={
       navBarText:'我的'
     }
+    this.myAccount=this.myAccount.bind(this)
+    this.myAssets=this.myAssets.bind(this)
+    this.contactServer=this.contactServer.bind(this)
+    this.feedback=this.feedback.bind(this)
   }
   componentWillMount(){
     
   }
+
+  myAccount(){
+
+  }
+
+  myAssets(){
+
+  }
+
+    
+  contactServer(){
+    
+  }
+  feedback(){
+
+  }
+
+
+
+
   render() {
     return (
       <div>
         <NavBars navBarText={this.state.navBarText} changePage={this.props.changePage}/>
-        my
+        <div className="myWrap">
+          <Head name="王刘永" icon="https://wx.qlogo.cn/mmopen/vi_32/WVmxTicpGCIAM13MBzSQTbqicMaWJNVpDqKHO9aC3SAdrSACCBcwOhIFSOeUY99iay8xlEkibhK0TaHElgtoBF1gzg/132"/>
+          <Lists callback={this.myAccount} text="我的账户" icon="https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/bill.svg"/>
+          <Lists callback={this.myAssets} text="资产管理" icon="https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/assets.svg"/>
+          <div className="extra">
+            <Lists callback={this.contactServer} text="联系客服"/>
+            <Lists callback={this.feedback} text="意见反馈"/>
+          </div>
+        </div>
       </div>
     )
   }

+ 0 - 2
src/case/BillApp/src/components/common/Button.jsx

@@ -12,8 +12,6 @@ export default class Buttons extends Component{
             }
         }
     }
-   
-
     render(){
         return (
             <WingBlank>

+ 15 - 0
src/case/BillApp/src/components/common/Head.css

@@ -0,0 +1,15 @@
+.head{
+    height: 100px;
+    display: flex;
+    flex-direction: column;
+    justify-content: center;
+    align-items: center;
+}
+
+.head .avatar{
+    border-radius: 50%;
+}
+
+.nickName{
+    font-weight: bold;
+}

+ 14 - 0
src/case/BillApp/src/components/common/Head.jsx

@@ -0,0 +1,14 @@
+import React, { Component } from 'react'
+import './Head.css'
+
+export default class Head extends Component {
+  render() {
+    return (
+      <div className="head">
+        <img className="avatar" src={this.props.icon||'https://wly-1254337200.cos.ap-guangzhou.myqcloud.com/user_s.svg'} alt="head" width="50px" height="50px"/>
+        <div className="nickName">{this.props.name||'旺仔小馒头'}</div>
+      </div>
+    )
+  }
+}
+

+ 29 - 0
src/case/BillApp/src/components/common/List.jsx

@@ -0,0 +1,29 @@
+import React, { Component } from 'react'
+import { List } from 'antd-mobile';
+const Item = List.Item;
+
+export default class Lists extends Component {
+  render() {
+    return (
+        <List >
+            {
+                this.props.icon ?
+                <Item
+                thumb={this.props.icon}
+                arrow="horizontal"
+                onClick={() => {this.props.callback()}}
+                >{this.props.text}</Item>
+                :
+                <Item
+                arrow="horizontal"
+                onClick={() => {this.props.callback()}}
+                >{this.props.text}</Item>
+            }
+        </List>
+    )
+  }
+}
+
+
+
+