index.js 5.12 KB
Newer Older
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
1 2 3 4 5
import React from 'react';
import styles from './index.less';
import { List } from 'antd-mobile';
import Icon from 'components/Icon';
import router from 'umi/router';
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
6

duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
7 8 9 10
const Item = List.Item;
const iconOpt = {
  color: '#555661',
};
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
11
const Index = () => {
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
  return (
    <div className={styles.root}>
      <div className={styles.header}>
        <div className={styles.dashboard}>
          <div className={styles.top}>
            <img className={styles.avatar} src={'./images/profile/avatar.png'} alt="" />
            <div className={styles.basic}>
              <div className={styles.name}>彭于晏</div>
              <div className={styles.phone}>18236347568</div>
            </div>
            <div className={styles.action}>
              <div className={styles.vip}>购买VIP</div>
            </div>
          </div>
          <div className={styles.bottom}>
            <div className={styles.item}>
              <div className={styles.title}>我的余额</div>
              <div className={styles.count}>
              <span>1000</span>
                <img src={"./images/profile/right.svg"} alt=""/>
              </div>
            </div>
            <div className={styles.item}>
              <div className={styles.title}>我的积分</div>
              <div className={styles.count}>
                <span>5000</span>
                <img src={"./images/profile/right.svg"} alt=""/>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div className={styles.content}>
        <div className={styles.list}>
          <List>
            <Item arrow="horizontal" onClick={() => {router.push('/list');}}>
              <div className={styles.item}>
                <Icon
                  {...iconOpt}
                  onClick={() => {}}
                  type={require('public/images/profile/signup.svg')}
                />
                <div className={styles.label}>签到</div>
              </div>
            </Item>
            <Item arrow="horizontal" onClick={() => {}}>
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/join-vip.svg')}
                />
                <div className={styles.label}>加入会员</div>
              </div>
            </Item>
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
67
            <Item arrow="horizontal" onClick={() => {router.push('/profile/order');}}>
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
              <div className={styles.item}>
                <Icon
                  {...iconOpt}
                  type={require('public/images/profile/my-order.svg')}
                />
                <div className={styles.label}>我的订单</div>
              </div>
            </Item>
            <Item arrow="horizontal" onClick={() => {}}>
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/error-question.svg')}
                />
                <div className={styles.label}>错题集</div>
              </div>
            </Item>
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
86
            <Item arrow="horizontal" onClick={() => {router.push('/profile/course');}}>
duanledexianxianxian's avatar
sync  
duanledexianxianxian committed
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/my-course.svg')}
                />
                <div className={styles.label}>我的课程</div>
              </div>
            </Item>
            <Item arrow="horizontal" onClick={() => {}}>
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/my-start.svg')}
                />
                <div className={styles.label}>我的收藏</div>
              </div>
            </Item>
            <Item arrow="horizontal" onClick={() => {}}>
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/refueling-card.svg')}
                />
                <div className={styles.label}>学习加油卡</div>
              </div>
            </Item>
            <Item arrow="horizontal" onClick={() => {}}>
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/link-me.svg')}
                />
                <div className={styles.label}>联系我们(微信)</div>
              </div>
            </Item>
            <Item arrow="horizontal" onClick={() => {router.push('/profile/notice');}}>
              <div className={styles.item}>
                <Icon
                  onClick={() => {}}
                  {...iconOpt}
                  type={require('public/images/profile/notice.svg')}
                />
                <div className={styles.label}>通知公告</div>
              </div>
            </Item>
          </List>
        </div>
      </div>
    </div>
  );
duanledexianxianxian's avatar
init  
duanledexianxianxian committed
141 142 143
};

export default Index;